qten.topology.chern
Module reference for qten.topology.chern.
chern
Quantum geometry and first Chern number of momentum-resolved band Hamiltonians.
This module computes geometric properties of an isolated occupied-band
subspace carried by a rank-3 Tensor with dims
(MomentumSpace, HilbertSpace, HilbertSpace). The Hamiltonian is
diagonalized independently at every momentum, and the n_occupied
lowest-energy eigenvectors define the occupied projector \(P(k)\).
Core API
quantum_geometric_tensorGauge-invariant quantum geometric tensor obtained from finite differences of the occupied projector.fubini_study_metricSymmetric metric given by the real part of the quantum geometric tensor.berry_curvatureLocal Berry curvature given by its imaginary antisymmetric part.chern_numberFirst Chern number computed either with discrete FHS link variables or by integrating the finite-difference Berry curvature.FHSResult,QGTResultResult mappings returned bymethod="fhs"andmethod="qgt".
Mathematical convention
For occupied projector \(P(k)\), QTen uses
The curvature sign agrees with the oriented plaquette used by
chern_number(..., method="fhs"). Projector
derivatives make these local quantities invariant under phase changes and
general unitary rotations among occupied eigenvectors.
Momentum-grid convention
Finite differences follow every primitive quotient direction \(e_i\). Tensor
components are therefore expressed per reciprocal-grid step. Local
quantum-geometric results retain the input MomentumSpace as their first
symbolic dimension. Their data therefore use the flat momentum-space order
rather than an unlabeled rectangular reshape.
Numerical methods
The default Chern method is the gauge-invariant Fukui--Hatsugai--Suzuki (FHS) link-variable formula. It is the preferred finite-mesh topological invariant because a sufficiently resolved, isolated bundle gives an integer up to floating-point error. Integrating QGT-derived curvature exposes the connection between local quantum geometry and topology, but is a central-finite-difference estimate and generally approaches an integer only as the momentum mesh is refined.
FHSResult
Bases: TypedDict
Result of chern_number(..., method="fhs").
Discrete Fukui--Hatsugai--Suzuki Chern number on a complete 2-D
reciprocal mesh. The runtime object is a plain dict.
Attributes:
| Name | Type | Description |
|---|---|---|
chern |
float
|
Sum of oriented plaquette phases divided by \(2\pi\). |
nearest_integer |
int
|
|
direct_gap |
float
|
Minimum occupied-to-empty direct gap over the mesh. |
berry_flux |
Tensor
|
Plaquette phase in radians as a labeled
|
See Also
chern_number
Public constructor of this mapping.
chern
instance-attribute
chern: float
nearest_integer
instance-attribute
nearest_integer: int
direct_gap
instance-attribute
direct_gap: float
berry_flux
instance-attribute
berry_flux: Tensor
QGTResult
Bases: TypedDict
Result of chern_number(..., method="qgt").
Chern number from integrated projector Berry curvature, plus the local
quantum-geometric tensors. The runtime object is a plain dict.
Attributes:
| Name | Type | Description |
|---|---|---|
chern |
float
|
\((2\pi)^{-1}\sum_k\Omega_{xy}(k)\) from central finite differences. Approaches an integer only as the mesh is refined. |
nearest_integer |
int
|
|
direct_gap |
float
|
Minimum occupied-to-empty direct gap over the mesh. |
quantum_geometric_tensor |
Tensor
|
Complex QGT with dims
|
fubini_study_metric |
Tensor
|
Real part of |
berry_curvature |
Tensor
|
\(\Omega_{ij}=2\operatorname{Im}Q_{ij}\), same dims and shape. The \(xy\) orientation matches the FHS plaquette. |
See Also
quantum_geometric_tensor
Standalone QGT used to build this mapping.
chern_number
Public constructor of this mapping.
chern
instance-attribute
chern: float
nearest_integer
instance-attribute
nearest_integer: int
direct_gap
instance-attribute
direct_gap: float
quantum_geometric_tensor
instance-attribute
quantum_geometric_tensor: Tensor
fubini_study_metric
instance-attribute
fubini_study_metric: Tensor
berry_curvature
instance-attribute
berry_curvature: Tensor
quantum_geometric_tensor
quantum_geometric_tensor(
bloch_hamiltonian: Tensor,
n_occupied: int | None = None,
gap_tolerance: float = 1e-08,
) -> Tensor
Compute the occupied-subspace quantum geometric tensor on a 1-D, 2-D, or 3-D grid.
The occupied projector is built from the n_occupied lowest-energy
eigenvectors at every momentum. Central differences along every primitive
reciprocal-grid direction approximate \(\partial_iP\), after which
\(Q_{ij}=\operatorname{Tr}[P(\partial_iP)(\partial_jP)]\) is evaluated.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bloch_hamiltonian
|
Tensor
|
Rank-3 Hermitian |
required |
n_occupied
|
int | None
|
Number of lowest-energy bands included in the occupied projector. Defaults to half the Hamiltonian bands using integer division. |
None
|
gap_tolerance
|
float
|
Minimum acceptable direct gap between bands |
1e-08
|
Returns:
| Type | Description |
|---|---|
Tensor
|
Complex QGT with dims |
Raises:
| Type | Description |
|---|---|
TypeError
|
If the first tensor dimension is not a
|
ValueError
|
If the tensor is not rank 3, its Hamiltonian blocks are not square,
|
Notes
The projector formulation is invariant under arbitrary momentum-dependent unitary rotations within the occupied subspace. It therefore remains well-defined when occupied bands cross each other, provided the occupied subspace stays separated from the empty bands.
See Also
fubini_study_metric
Real part of this tensor.
berry_curvature
Imaginary antisymmetric part of this tensor.
chern_number
Brillouin-zone topological invariant.
Source code in src/qten/topology/chern.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | |
fubini_study_metric
fubini_study_metric(
bloch_hamiltonian: Tensor,
n_occupied: int | None = None,
gap_tolerance: float = 1e-08,
) -> Tensor
Compute the occupied-subspace Fubini--Study metric on a 1-D, 2-D, or 3-D grid.
This function returns \(g_{ij}(k)=\operatorname{Re}Q_{ij}(k)\), where the
QGT is computed by
quantum_geometric_tensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bloch_hamiltonian
|
Tensor
|
Rank-3 Hermitian |
required |
n_occupied
|
int | None
|
Number of lowest-energy occupied bands. Defaults to half the bands. |
None
|
gap_tolerance
|
float
|
Direct-gap warning threshold. Defaults to |
1e-08
|
Returns:
| Type | Description |
|---|---|
Tensor
|
Real metric with dims |
Raises:
| Type | Description |
|---|---|
TypeError
|
If the first tensor dimension is not a momentum space. |
ValueError
|
If the Hamiltonian, occupied-band selection, or reciprocal grid is
invalid. See
|
See Also
quantum_geometric_tensor
Complex parent tensor of the metric and curvature.
berry_curvature
Berry curvature from the imaginary part of the QGT.
Source code in src/qten/topology/chern.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | |
berry_curvature
berry_curvature(
bloch_hamiltonian: Tensor,
n_occupied: int | None = None,
gap_tolerance: float = 1e-08,
) -> Tensor
Compute occupied-subspace Berry curvature on a 1-D, 2-D, or 3-D grid.
QTen uses \(\Omega_{ij}(k)=2\operatorname{Im}Q_{ij}(k)\). In two dimensions,
the \(xy\) orientation agrees with
chern_number(..., method="fhs").
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bloch_hamiltonian
|
Tensor
|
Rank-3 Hermitian |
required |
n_occupied
|
int | None
|
Number of lowest-energy occupied bands. Defaults to half the bands. |
None
|
gap_tolerance
|
float
|
Direct-gap warning threshold. Defaults to |
1e-08
|
Returns:
| Type | Description |
|---|---|
Tensor
|
Pointwise real antisymmetric curvature tensor at every momentum, with dims
|
Raises:
| Type | Description |
|---|---|
TypeError
|
If the first tensor dimension is not a momentum space. |
ValueError
|
If the Hamiltonian, occupied-band selection, or reciprocal grid is
invalid. See
|
Notes
This is QGT-derived curvature, not the compact plaquette flux returned by
chern_number(..., method="fhs"). Its integral need not be exactly
quantized on a finite grid.
See Also
quantum_geometric_tensor
Complex tensor from which the curvature is derived.
chern_number
FHS or curvature-integral Chern number.
Source code in src/qten/topology/chern.py
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | |
chern_number
chern_number(
bloch_hamiltonian: Tensor,
n_occupied: int | None = None,
gap_tolerance: float = 1e-08,
*,
method: Literal["fhs"] = "fhs",
) -> FHSResult
chern_number(
bloch_hamiltonian: Tensor,
n_occupied: int | None = None,
gap_tolerance: float = 1e-08,
*,
method: Literal["qgt"],
) -> QGTResult
Compute the first Chern number of an occupied band subspace.
The n_occupied lowest-energy eigenstates define an occupied bundle over
a complete two-dimensional periodic momentum grid. Two numerical methods
are available:
method="fhs"computes normalized determinant link variables between neighboring occupied subspaces and sums their oriented plaquette phases. This gauge-invariant Fukui--Hatsugai--Suzuki construction is the default and the recommended finite-grid topological invariant.method="qgt"computes the projector quantum geometric tensor, takes \(\Omega_{xy}=2\operatorname{Im}Q_{xy}\), and evaluates \(C=(2\pi)^{-1}\sum_k\Omega_{xy}(k)\). It additionally returns all local quantum-geometric data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bloch_hamiltonian
|
Tensor
|
Rank-3 Hermitian |
required |
n_occupied
|
int | None
|
Number of lowest-energy bands defining the occupied subspace. It must lie strictly between zero and the total band count. Defaults to half the bands using integer division. |
None
|
gap_tolerance
|
float
|
Warning threshold for the minimum direct gap
\(\min_k[E_{n_\mathrm{occupied}}(k)-
E_{n_\mathrm{occupied}-1}(k)]\). A gap at or below this value emits a
|
1e-08
|
method
|
(fhs, qgt)
|
Numerical construction. |
"fhs"
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Result mapping. Both methods return:
For For |
Raises:
| Type | Description |
|---|---|
TypeError
|
If the first tensor dimension is not a
|
ValueError
|
If |
RuntimeError
|
For |
Warns:
| Type | Description |
|---|---|
RuntimeWarning
|
If the minimum direct gap is no larger than |
Notes
The FHS value satisfies
where \(U_i(k)\) is the phase of the determinant of the occupied-subspace overlap between \(k\) and \(k+e_i\). Determinants make the formula invariant under arbitrary unitary changes of occupied-band basis.
nearest_integer is a convenience diagnostic, not proof that the bundle
is isolated or the mesh is sufficiently resolved. Inspect direct_gap
and, when necessary, repeat the calculation on finer momentum grids.
The flux tensor is intentionally flat for every cell: its symbolic
MomentumSpace dimension preserves labels without implying rectangular
heatmap adjacency. This is especially important for sheared cells, whose
quotient-representative order is not a rectangular Brillouin-zone heatmap.
Examples:
Use the robust finite-grid method:
result = chern_number(hamiltonian, n_occupied=1)
invariant = result["nearest_integer"]
flux = result["berry_flux"]
Request the differential-geometric decomposition:
geometry = chern_number(hamiltonian, n_occupied=1, method="qgt")
metric = geometry["fubini_study_metric"]
curvature = geometry["berry_curvature"]
See Also
quantum_geometric_tensor
Gauge-invariant local quantum geometric tensor.
fubini_study_metric
Metric part of the QGT.
berry_curvature
Curvature part of the QGT.
Source code in src/qten/topology/chern.py
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 | |