Skip to main content

Quantum Toolkit

Our Quantum Toolkit enables high-performance algorithms used in quantum many-body physics to be called natively in Aleph.

Global Constants

NameDescription
as_abstractConstant object representing the StateInfo option as_abstract.
as_basisstateConstant object representing the StateInfo option as_basisstate.
as_completeConstant object representing the StateInfo option as_complete.
as_denseConstant object representing the StateInfo option as_dense.
as_fermionConstant object representing the StateInfo option as_fermion.
as_heterogenous_qditConstant object representing the StateInfo option as_heterogenous_qdit.
as_inversionConstant object representing the StateInfo option as_inversion.
as_magnetizationConstant object representing the StateInfo option as_magnetization.
as_magnetization | as_spin_flip | as_translationConstant object representing the StateInfo option as_magnetization | as_spin_flip | as_translation.
as_magnetization | as_translationConstant object representing the StateInfo option as_magnetization | as_translation.
as_numberConstant object representing the StateInfo option as_number.
as_parityConstant object representing the StateInfo option as_parity.
as_qditConstant object representing the StateInfo option as_qdit.
as_singleparticleConstant object representing the StateInfo option as_singleparticle.
as_sparseConstant object representing the StateInfo option as_sparse.
as_spin_flipConstant object representing the StateInfo option as_spin_flip.
as_spinhalfConstant object representing the StateInfo option as_spinhalf.
as_statevectorConstant object representing the StateInfo option as_statevector.
as_translationConstant object representing the StateInfo option as_translation.
as_unknownConstant object representing the StateInfo option as_unknown.
as_unspecifiedConstant object representing an unspecified StateInfo option.
spectrumThe spectrum selector has methods that return SpectrumItem objects that are used in the context of iterative eigensolvers. These SpectrumItem objects specify which part of the spectrum to target. For instance, one can create a SpectrumItem that targets the largest absolute eigenvalues by calling spectrum.largest_abs. Similarly, spectrum.smallest_real returns a SpectrumItem that targets the smallest real eigenvalues.

Factories

NameDescription
EigsArnoldiConstructs a EigsArnoldi eigensolver.
EigsLanczosConstructs a EigsLanczos eigensolver.
Heisenberg_1dGenerate the Hamiltonian Matrix Product Operator (MPO) for the 1D Heisenberg model with Real values.
Ising_1dGenerate the Hamiltonian Matrix Product Operator (MPO) for the 1D transverse-field Ising model with Complex values.
LinearOperatorConstructs an LinearOperator from an Operator.
PairingSumThe PairingSum operator is parametrized by a sparse matrix P(i,j)P(i,j) of size L×LL \times L. Each entry P(i,j)P(i,j) for i<ji < j corresponds to the operator P(i,j)fifjP(i,j) f_i^\dagger f_j^\dagger, whilst each entry P(i,j)P(i,j) for i>ji > j corresponds to the operator P(i,j)fifjP(i,j) f_i f_j. The PairingSum operator represents the sum i<jPi,jfifj+i>jPi,jfifj\sum_{i<j}P_{i,j}f_i^{\dagger}f_j^{\dagger} + \sum_{i>j}P_{i,j}f_if_j
QuadraticSumThe QuadraticSum operator is parametrized by a sparse matrix S(i,j)S(i,j) of size 2L×2L2L \times 2L . The operator represents the sum i,jSi,j+,fifj+Si,j,+fifj+Si,j+,+fifj+Si,j,fifj\sum_{i,j}S_{i,j}^{+,-}f_i^{\dagger}f_j + S_{i,j}^{-,+}f_if_j^{\dagger} + S_{i,j}^{+,+}f_i^{\dagger}f_j^{\dagger} + S_{i,j}^{-,-}f_if_j with S=(S+,,S+,+S,,S,+)S =\begin{pmatrix}S^{+,-}, S^{+,+} \\ S^{-,-}, S^{-,+} \end{pmatrix}
TransferReturns the directed fermionic transfer operator fifjf_{i}^\dagger f_{j} with support on the specified sites.
TransferSumThe TransferSum operator is parametrized by a sparse matrix A(i,j) A(i,j) of size L×LL \times L. Each entry A(i,j) A(i,j) corresponds to the operator A(i,j)fifjA(i,j) f_i^\dagger f_j. The TransferSum operator represents the sum i,jAi,jfifj\sum_{i,j}A_{i,j}f_i^{\dagger}f_j.
accumulatorFactory for constructing accumulators.
coefficientCreates a Coefficient that can be added to a Model.
identity_mpoGenerate an identity Matrix Product Operator (MPO) with Complex values.
interactionConstructs an interaction that can be added to a model.
latticeConstructor for lattice.
lattice_coordinateConstructor for lattice coordinate.
matrixConverts the operator to its matrix representation.
modelConstructs a model from a .lattice_model file.
mpoConvert the supplied Operator to a Matrix Product Operator (MPO) with Complex values.
neighbourhood_ruleConstructor for a neighbourhood rule.
operator_freeGenerates an operator that represents the hopping terms of the input matrix.
operator_functionApproximates a matrix function using the Krylov subspace method.
operator_prodCreates an empty OperatorProduct.
operator_stencilConverts a model to a free fermion stencil operator.
operator_sumCreates an empty ComplexOperatorSum with complex coefficients (default behavior).
qbit_rangeCreates a range of Qbit objects with the specified number of sites.
random_mpoGenerate a random Matrix Product Operator (MPO) with Complex values.
random_mpsGenerate a random Matrix Product State (MPS) with Complex values.
sse_order_estimatorConstructs the estimator for the order in an SSE simulation.
sse_simulationConstructs an SSE simulation instance.
state_rangeCreates an iterator for a range of state objects matching the provided option.
state_vectorState vector factory.
support_tableConstructs a SupportTable from a vector of NeighbourhoodRule and a Lattice.

Operators

NameDescription
CNOTReturns a spin-1/2 OperatorNamed for the CNOT (controlled-NOT) gate, taking two individual site indices.
CoulombSumReturns a Coulomb tensor operator sum i,j,k,l,σ,σVijklaiσajσakσalσ\sum_{i,j,k,l,\sigma,\sigma'} V_{ijkl} a_{i\sigma}^\dagger a_{j\sigma'}^\dagger a_{k\sigma'} a_{l\sigma}.
CreateReturns the fermionic creation operator fif_{i}^\dagger with support on the specified site.
CreateCreateReturns the pairing term fifjf_{i}^\dagger f_{j}^\dagger with support on the specified sites.
DestroyReturns the fermionic annihilation operator fif_{i} with support on the specified site.
DestroyDestroyReturns the pairing term fifjf_{i}f_{j} with support on the specified sites.
DoubleExcitationLegacy alias for PairHop. Returns the pair hopping operator fifjfkfl+h.c.f_{i}^\dagger f_{j}^\dagger f_{k} f_{l} + \mathrm{h.c.} with support on the specified sites.
DualUnitaryReturns a spin-1/2 dual unitary operator: exp(i(π4X(i)X(j)+π4Y(i)Y(j)+JzZ(i)Z(j)))\exp(i(\frac{\pi}{4} X(i) X(j) + \frac{\pi}{4} Y(i) Y(j) + J_z Z(i) Z(j))) where i,ji, j are the site indices.
FlipCreates a spin-1/2 OperatorPermute that flips the spin at a single site.
FlipAllCreates a spin-1/2 OperatorPermute that flips all spins.
FloquetReturns a spin-1/2 Floquet(Jx,Jy,Jz)=exp(i(JxX(i)+JyY(i)+JzZ(i))Z(j))(J_x, J_y, J_z) = \exp(i(J_x X(i) + J_y Y(i) + J_z Z(i)) Z(j)) where i,ji, j are the site indices.
FourBodyLegacy alias for PairTransfer. Returns the directed pair transfer operator fifjfkflf_{i}^\dagger f_{j}^\dagger f_{k} f_{l} with support on the specified sites.
HgateReturns a spin-1/2 OperatorNamed for the Hadamard gate.
HopReturns the fermionic hopping operator fifj+fjfif_{i}^\dagger f_{j} + f_{j}^\dagger f_{i} with support on the specified sites.
HopNumberReturns the hop-number operator (fifj+fjfi)nk(f_{i}^\dagger f_{j} + f_{j}^\dagger f_{i}) n_{k} with support on the specified sites.
ModeRotationReturns the mode rotation operator exp(iθ(fifj+fjfi))\exp(i \theta (f_{i}^\dagger f_{j} + f_{j}^\dagger f_{i})) with support on the specified sites.
NearestNumberSumReturns the sum of nearest-neighbor number interactions inini+1\sum_{i} n_{i} n_{i+1} with support on the specified sites.
NextNearestNumberSumReturns the sum of next-nearest-neighbor number interactions inini+2\sum_{i} n_{i} n_{i+2} with support on the specified sites.
NumberReturns the fermionic number operator ni=fifin_{i} = f_{i}^\dagger f_{i} with support on the specified site.
NumberNLegacy alias for NumberSum. Returns the sum of fermionic number operators isitesni\sum_{i \in \mathrm{sites}} n_{i} with support on the specified sites.
NumberNumberReturns the two-site fermionic number-number interaction operator ninj=fififjfjn_{i} n_{j} = f_{i}^\dagger f_{i} f_{j}^\dagger f_{j} with support on the specified sites.
NumberNumberNNLegacy alias for NearestNumberSum. Returns the sum of nearest-neighbor number interactions inini+1\sum_{i} n_{i} n_{i+1} with support on the specified sites.
NumberNumberNNNLegacy alias for NextNearestNumberSum. Returns the sum of next-nearest-neighbor number interactions inini+2\sum_{i} n_{i} n_{i+2} with support on the specified sites.
NumberNumberPhaseReturns the two-site number-number phase operator exp(iϕninj)\exp(i \phi n_{i} n_{j}) with support on the specified sites.
NumberPhaseReturns the site number phase operator exp(iϕni)\exp(i \phi n_i) with support on the specified site.
NumberPotentialReturns an operator representing a weighted sum of number operators i=0N1αini\sum_{i=0}^{N-1} \alpha_i n_i, where the site indices are implicitly 0,1,,N10, 1, \dots, N-1. If a subset of sites or a different ordering is desired, use the factory overload that accepts an explicit list of site indices.
NumberSumReturns the sum of fermionic number operators isitesni\sum_{i \in \mathrm{sites}} n_{i} with support on the specified sites.
PairHopReturns the pair hopping operator fifjfkfl+h.c.f_{i}^\dagger f_{j}^\dagger f_{k} f_{l} + \mathrm{h.c.} with support on the specified sites.
PairHopSumReturns a generalized pair hopping tensor operator i,j,k,lVijklaiajakal\sum_{i,j,k,l} V_{ijkl} a_{i}^\dagger a_{j}^\dagger a_{k} a_{l}.
PairRotationReturns the pair rotation operator exp(iθ(fifj+fjfi))\exp(i \theta (f_{i}^\dagger f_{j}^\dagger + f_{j} f_{i})) with support on the specified sites.
PairTransferReturns the directed pair transfer operator fifjfkflf_{i}^\dagger f_{j}^\dagger f_{k} f_{l} with support on the specified sites.
PermuteCreates a spin-1/2 OperatorPermute that permutes spins according to a specified permutation.
PhaseReturns a global phase spin-1/2 operator P(ϕ)=eiϕP(\phi) = e^{-i\phi}.
PhaseHopReturns the complex phase-hop operator eiϕfifj+eiϕfjfie^{i \phi} f_{i}^\dagger f_{j} + e^{-i \phi} f_{j}^\dagger f_{i} with support on the specified sites.
PhaseShiftReturns a spin-1/2 PhaseShift(ϕ)=exp(iϕ)(\phi) = \exp(i\phi) on the 1\|1\rangle state.
Proj0Returns a spin-1/2 OperatorNamed for the projector 00\|0\rangle\langle 0\|.
Proj1Returns a spin-1/2 OperatorNamed for the projector 11\|1\rangle\langle 1\|.
ReflectCreates a spin-1/2 OperatorPermute that reflects all spins about the center.
RotEulerReturns a general spin-1/2 rotation operator RotEuler(ϕ,θ,ω)=RZ(ω)RX(θ)RZ(ϕ)=exp(iωZ/2)exp(iθX/2)exp(iϕZ/2)(\phi,\theta,\omega) = RZ(\omega)RX(\theta)RZ(\phi) = \exp(-i \omega Z/2) \exp(-i \theta X/2) \exp(-i \phi Z/2).
RotXReturns a spin-1/2 RotX(ϕ)=exp(iϕX/2)(\phi) = \exp(-i\phi X/2) rotation operator around the X-axis.
RotYReturns a spin-1/2 RotY(ϕ)=exp(iϕY/2)(\phi) = \exp(-i\phi Y/2) rotation operator around the Y-axis.
RotZReturns a spin-1/2 RotZ(ϕ)=exp(iϕZ/2)(\phi) = \exp(-i\phi Z/2) rotation operator around the Z-axis.
SWAPReturns a spin-1/2 OperatorNamed for the SWAP gate, taking two individual site indices.
SXReturns \fSx=12X\fS_x = \frac{1}{2}X\f as a scaled operator sum.
SYReturns \fSy=12Y\fS_y = \frac{1}{2}Y\f as a scaled operator sum.
SZReturns \fSz=12Z\fS_z = \frac{1}{2}Z\f as a scaled operator sum.
SgateReturns a spin-1/2 OperatorNamed for the S gate.
SminusReturns a spin-1/2 OperatorNamed for Spin-minus operator.
SplusReturns a spin-1/2 OperatorNamed for Spin-plus operator.
TgateReturns a spin-1/2 OperatorNamed for the T gate.
TransferNumberReturns the transfer-number operator fifjnkf_{i}^\dagger f_{j} n_{k} with support on the specified sites.
TranslateCreates a spin-1/2 OperatorPermute that translates spins by a specified shift.
UnitaryXYZReturns a spin-1/2 UnitaryXYZ(Jx,Jy,Jz)(J_x, J_y, J_z) operator: exp(i(JxX(i)X(j)+JyY(i)Y(j)+JzZ(i)Z(j)))\exp(i(J_x X(i) X(j) + J_y Y(i) Y(j) + J_z Z(i) Z(j))) where i,ji, j are the site indices.
XReturns a spin-1/2 OperatorNamed for Pauli-X operator.
XXReturns a spin-1/2 OperatorNamed for XiXjX_i \cdot X_j operator, taking two individual site indices.
XXPYYReturns a spin-1/2 OperatorNamed for XiXj+YiYjX_i \cdot X_j + Y_i \cdot Y_j operator, taking two individual site indices.
YReturns a spin-1/2 OperatorNamed for Pauli-Y operator.
YYReturns a spin-1/2 OperatorNamed for YiYjY_i \cdot Y_j operator, taking two individual site indices.
ZReturns a spin-1/2 OperatorNamed for Pauli-Z operator.
ZNReturns a spin-1/2 OperatorNamed for isitesZi \sum_{i \in \text{sites}} Z_i operator.
ZZReturns a spin-1/2 OperatorNamed for ZiZjZ_i \cdot Z_j operator, taking two individual site indices.
ZZNNReturns a spin-1/2 OperatorNamed for isitesZiZi+1 \sum_{i \in \text{sites}} Z_i \otimes Z_{i+1} operator.
ZZNNNReturns a spin-1/2 OperatorNamed for isitesZiZi+2 \sum_{i \in \text{sites}} Z_i \otimes Z_{i+2} operator.
operator_denseReturns a spin-1/2 OperatorDense parametrized by the given matrix.
operator_diagonalReturns a spin-1/2 diagonal operator with specified diagonal elements.
operator_genericCreates a spin-1/2 OperatorGeneric from a string representation.
operator_sparseReturns a spin-1/2 OperatorSparse parametrized by the given matrix.
pauli_stringCreates a spin-1/2 OperatorPauliString from a string representation.

Types

NameDescription
AccumulatorBase class for all accumulators.
BasisStateRepresents a quantum product state \vert s_1s_2...s_n\rangle.
BinningAccumulatorAccumulator that stores bin means.
CoefficientRepresents a coefficient in a model that multiplies a interaction. Can be either a real number of a function of a list of lattice coordinates returning a real number.
CoefficientFactoryA function of a List of LatticeCoordinate that returns a real number.
CoefficientFunctionA function taking a list of coordinates and returning a complex number.
ComplexBaseSumThe QuadraticSum operator is parametrized by a sparse matrix S(i,j)S(i,j) of size 2L×2L2L \times 2L . The operator represents the sum i,jSi,j+,fifj+Si,j,+fifj+Si,j+,+fifj+Si,j,fifj\sum_{i,j}S_{i,j}^{+,-}f_i^{\dagger}f_j + S_{i,j}^{-,+}f_if_j^{\dagger} + S_{i,j}^{+,+}f_i^{\dagger}f_j^{\dagger} + S_{i,j}^{-,-}f_if_j with S=(S+,,S+,+S,,S,+)S =\begin{pmatrix}S^{+,-}, S^{+,+} \\ S^{-,-}, S^{-,+} \end{pmatrix}
ComplexChebyshevSeriesA ComplexChebyshevSeries-valued Chebyshev series.
ComplexFreeMatrixThis operator efficiently represents a sum of fermionic hopping and number operators. It is designed to provide efficient kernels for solving single particle (free) fermionic problems.
ComplexFreeStencilThis operator is designed to provide efficient methods for calculations involving a structured free operator (single particle symmetry sector of a fermionic Hilbert space). A free operator which can be written as a stencil assumes the general form sn=0Nαnfsfs+δn\sum_{s}\sum_{n=0}^N \alpha_{n}f_{s}^{\dagger}f_{s+\delta_n} where δn\delta_nare displacement vectors, ss are lattice position vectors, the αn\alpha_n are position independent coefficients and NN is the number of such coefficients. To construct a stencil, the above parameters must be passed explicitly, together with information about the lattice dimensions and the boundary conditions. For more details, please see the operator_free factory.
ComplexMPOMatrix Product Operator (MPO) of Complex values. Compressed representation of large-dimensional tensors, well suited to the representation of quantum operators for 1D many-body physics problems.
ComplexMPSMatrix Product State (MPS) of Complex values. Compressed representation of a large-dimensional tensor, well suited for state vectors of some 1D many-body quantum mechanics problems.
ComplexOperator4DTensorRepresents a 4D tensor operator, such as CoulombSum or PairHopSum.
ComplexOperatorChebyshevSeriesA ComplexOperatorChebyshevSeries defined by applying a scalar-valued Chebyshev series to an operator. For example, a series p(x) = sum_n a_n T_n(x) becomes p(A) = sum_n a_n T_n(A) when applied to an operator A.
ComplexOperatorPolynomialA ComplexOperatorPolynomial defined by a scalar polynomial applied to an operator. For example, a polynomial p(x) = sum_n a_n x^n becomes p(A) = sum_n a_n A^n when applied to an operator A.
ComplexOperatorSumRepresents a sum of operators with complex scalar coefficients. Each term consists of a complex coefficient and an operator. Create instances using the operator_sum() factory function.
ComplexPairingSumThe PairingSum operator is parametrized by a sparse matrix P(i,j)P(i,j) of size L×LL \times L. Each entry P(i,j)P(i,j) for i<ji < j corresponds to the operator P(i,j)fifjP(i,j) f_i^\dagger f_j^\dagger, whilst each entry P(i,j)P(i,j) for i>ji > j corresponds to the operator P(i,j)fifjP(i,j) f_i f_j. The PairingSum operator represents the sum i<jPi,jfifj+i>jPi,jfifj\sum_{i<j}P_{i,j}f_i^{\dagger}f_j^{\dagger} + \sum_{i>j}P_{i,j}f_if_j
ComplexPolynomialA ComplexPolynomial-valued polynomial.
ComplexQuadraticSumThe QuadraticSum operator is parametrized by a sparse matrix S(i,j)S(i,j) of size 2L×2L2L \times 2L . The operator represents the sum i,jSi,j+,fifj+Si,j,+fifj+Si,j+,+fifj+Si,j,fifj\sum_{i,j}S_{i,j}^{+,-}f_i^{\dagger}f_j + S_{i,j}^{-,+}f_if_j^{\dagger} + S_{i,j}^{+,+}f_i^{\dagger}f_j^{\dagger} + S_{i,j}^{-,-}f_if_j with S=(S+,,S+,+S,,S,+)S =\begin{pmatrix}S^{+,-}, S^{+,+} \\ S^{-,-}, S^{-,+} \end{pmatrix}
ComplexTransferSumThe TransferSum operator is parametrized by a sparse matrix A(i,j) A(i,j) of size L×LL \times L. Each entry A(i,j) A(i,j) corresponds to the operator A(i,j)fifjA(i,j) f_i^\dagger f_j. The TransferSum operator represents the sum i,jAi,jfifj\sum_{i,j}A_{i,j}f_i^{\dagger}f_j.
ConstraintA function taking in a lattice coordinate and returning a Boolean that specifies when a given lattice coordinate is a valid reference for a neighbourhood.
EigsArnoldi<LinearOperator<complex>>EigsArnoldi iterative eigensolver.
EigsArnoldi<LinearOperator<real>>EigsArnoldi iterative eigensolver.
EigsBaseBase class for iterative eigensolvers.
EigsLanczos<LinearOperator<complex>>EigsLanczos iterative eigensolver.
EigsLanczos<LinearOperator<real>>EigsLanczos iterative eigensolver.
EigsOptionsConfiguration options stored by iterative eigensolvers.
EigsStatusRuntime status returned by an iterative eigensolver.
EstimateStatistical estimate from binned values containing value of estimate and variance on the value.
EstimatorBase class for estimators.
FbitAn object representing a product state of fermionic modes.
FbitRangeA range of Fbit objects.
FermionOperatorBaseBase class for all fermionic quantum operators.
HeterogenousQditQdit type.
HomogenousQditQdit type.
InteractionRepresents a interaction in a model storing a coefficient name, a list of functions to produce an operator product, and the name of a neighbourhood rule.
IntervalRepresents a closed interval [a, b] of real numbers.
LatticeClass that represents a crystal lattice (Bravais lattice and atomic basis)
LatticeCoordinateRepresents a lattice coordinate in terms of primitive indices and a basis index.
LatticeRangeA range of lattice coordinates used to iterate over lattice coordinates.
LinearOperator<complex>Spectra operator wrapper for complex-valued operators.
LinearOperator<real>Spectra operator wrapper for real-valued operators.
List<AlephSingleSiteOperatorFactory>A list of single site operator factories.
List<Fbit>A list of Fbit objects.
List<HeterogenousQdit>A list of HeterogenousQdit objects.
List<HomogenousQdit>A list of HomogenousQdit objects.
List<Qbit>A list of Qbit objects.
LogarithmicAccumulatorAccumulator that logarithmically bins accumulated values.
ModelStores the interactions of a lattice Hamiltonian and associated observables in interactions of lattice coordinates and neighbourhoods.
NeighbourhoodRuleA representation of a neighbourhood of a given LatticeCoordinate on a Lattice
NoBinningAccumulatorAccumulator that doesn't bin values.
OperatorBase class for all quantum operators.
OperatorFermiNamedRepresents a named fermionic operator acting on specified sites. Create instances using factory functions like Create(), Destroy(), Number(), or Hop().
OperatorProductRepresents a product of operators without scalar coefficients. For products with coefficients (e.g., 2.0*X(0)*Y(1)), use OperatorSum instead. Create instances using the operator_prod() factory function.
PauliSumObject that represents a sum of Pauli strings.
PauliTermObject that represents a numerically efficient Pauli String
QbitAn object representing a product state of qubits.
QbitRangeA range of Qbit objects.
RealBaseSumThe QuadraticSum operator is parametrized by a sparse matrix S(i,j)S(i,j) of size 2L×2L2L \times 2L . The operator represents the sum i,jSi,j+,fifj+Si,j,+fifj+Si,j+,+fifj+Si,j,fifj\sum_{i,j}S_{i,j}^{+,-}f_i^{\dagger}f_j + S_{i,j}^{-,+}f_if_j^{\dagger} + S_{i,j}^{+,+}f_i^{\dagger}f_j^{\dagger} + S_{i,j}^{-,-}f_if_j with S=(S+,,S+,+S,,S,+)S =\begin{pmatrix}S^{+,-}, S^{+,+} \\ S^{-,-}, S^{-,+} \end{pmatrix}
RealChebyshevSeriesA RealChebyshevSeries-valued Chebyshev series.
RealFreeMatrixThis operator efficiently represents a sum of fermionic hopping and number operators. It is designed to provide efficient kernels for solving single particle (free) fermionic problems.
RealFreeStencilThis operator is designed to provide efficient methods for calculations involving a structured free operator (single particle symmetry sector of a fermionic Hilbert space). A free operator which can be written as a stencil assumes the general form sn=0Nαnfsfs+δn\sum_{s}\sum_{n=0}^N \alpha_{n}f_{s}^{\dagger}f_{s+\delta_n} where δn\delta_nare displacement vectors, ss are lattice position vectors, the αn\alpha_n are position independent coefficients and NN is the number of such coefficients. To construct a stencil, the above parameters must be passed explicitly, together with information about the lattice dimensions and the boundary conditions. For more details, please see the operator_free factory.
RealMPOMatrix Product Operator (MPO) of Real values. Compressed representation of large-dimensional tensors, well suited to the representation of quantum operators for 1D many-body physics problems.
RealMPSMatrix Product State (MPS) of Real values. Compressed representation of a large-dimensional tensor, well suited for state vectors of some 1D many-body quantum mechanics problems.
RealOperator4DTensorRepresents a 4D tensor operator, such as CoulombSum or PairHopSum.
RealOperatorChebyshevSeriesA RealOperatorChebyshevSeries defined by applying a scalar-valued Chebyshev series to an operator. For example, a series p(x) = sum_n a_n T_n(x) becomes p(A) = sum_n a_n T_n(A) when applied to an operator A.
RealOperatorFermiParamRepresents a named fermionic operator acting on specified sites. Create instances using factory functions like Create(), Destroy(), Number(), or Hop().
RealOperatorPolynomialA RealOperatorPolynomial defined by a scalar polynomial applied to an operator. For example, a polynomial p(x) = sum_n a_n x^n becomes p(A) = sum_n a_n A^n when applied to an operator A.
RealOperatorSumRepresents a sum of operators with real scalar coefficients. Each term consists of a real coefficient and an operator. Create instances using the operator_sum() factory function.
RealPairingSumThe PairingSum operator is parametrized by a sparse matrix P(i,j)P(i,j) of size L×LL \times L. Each entry P(i,j)P(i,j) for i<ji < j corresponds to the operator P(i,j)fifjP(i,j) f_i^\dagger f_j^\dagger, whilst each entry P(i,j)P(i,j) for i>ji > j corresponds to the operator P(i,j)fifjP(i,j) f_i f_j. The PairingSum operator represents the sum i<jPi,jfifj+i>jPi,jfifj\sum_{i<j}P_{i,j}f_i^{\dagger}f_j^{\dagger} + \sum_{i>j}P_{i,j}f_if_j
RealPolynomialA RealPolynomial-valued polynomial.
RealQuadraticSumThe QuadraticSum operator is parametrized by a sparse matrix S(i,j)S(i,j) of size 2L×2L2L \times 2L . The operator represents the sum i,jSi,j+,fifj+Si,j,+fifj+Si,j+,+fifj+Si,j,fifj\sum_{i,j}S_{i,j}^{+,-}f_i^{\dagger}f_j + S_{i,j}^{-,+}f_if_j^{\dagger} + S_{i,j}^{+,+}f_i^{\dagger}f_j^{\dagger} + S_{i,j}^{-,-}f_if_j with S=(S+,,S+,+S,,S,+)S =\begin{pmatrix}S^{+,-}, S^{+,+} \\ S^{-,-}, S^{-,+} \end{pmatrix}
RealTransferSumThe TransferSum operator is parametrized by a sparse matrix A(i,j) A(i,j) of size L×LL \times L. Each entry A(i,j) A(i,j) corresponds to the operator A(i,j)fifjA(i,j) f_i^\dagger f_j. The TransferSum operator represents the sum i,jAi,jfifj\sum_{i,j}A_{i,j}f_i^{\dagger}f_j.
SSEOperatorStringRepresents the operator string in the SSE simulation.
SSEOperatorStringEntryRepresents a single entry in the SSE operator string.
SSEOrderEstimatorEstimator for the order of the stochastic series expansion
SSESimulationSimulation manager for the stochastic series expansion.
SSEVertexVertex used in the stochastic series expansion Monte Carlo.
SingleAccumulatorBase class for all accumulators.
SingleSiteOperatorFactoryA function taking an index corresponding to a site on a lattice and returning an Operator.
SpectrumItemTarget spectrum enumerator for iterative eigensolvers. Iterative eigensolvers target specific parts of the spectrum. The allowed values are:...
SpinHalfOperatorBase class for spin-1/2 symbolic operators.
StateBase class for all quantum state representations.
StateInfoAn object representing the combination of a set of mutually compatible options. It is used in conjunction with the state_vector factory to specify the desired state.
StateVectorBase class for all state vector representations.
StateVector<as_complex,as_dense>A class representing a state vector. The object stores a set of coefficients corresponding to the multiplicative coefficients in front of each computational basis state that for the basis of the state vector. It provides various optimized quantum routines and is compatible with any spin half operator.
StateVector<as_real,as_dense>A class representing a state vector. The object stores a set of coefficients corresponding to the multiplicative coefficients in front of each computational basis state that for the basis of the state vector. It provides various optimized quantum routines and is compatible with any spin half operator.
SupportTableStores the linear indices associated with some number of name neighbourhoods.

Module Functions

NameDescription
HeisenbergReturns a Heisenberg model Hamiltonian: H=hiF(i)+i[Jxσixσi+1x+Jyσiyσi+1y+Jzσizσi+1z]H = h\sum_i F(i) + \sum_i [J_x \sigma^x_i \sigma^x_{i+1} + J_y \sigma^y_i \sigma^y_{i+1} + J_z \sigma^z_i \sigma^z_{i+1}].
IdentityReturns the identity operator.
SupportTable Constructs a SupportTable from a vector of NeighbourhoodRule and a Lattice.
ZeroReturns the zero operator.
anticommutedCalculates the anticommutation of two named fermionic operators. For inputs A,B the function returns {A,B} - BA.
both_endsReturns the both_ends enum value.
canonicalizedOrders the operators in a product of creation and annihilation operators into canonical order.
canonicalized_by_siteOrders the operators in a product of creation and annihilation operators into site canonical order.
chebyshev_series_deltaGenerates a Chebyshev series that approximates a delta function over the specified interval.
coefficient_matrixCreates a bipartite coefficient matrix from a linear contiguous cut including La number of sites from a real vector.
commutatorComputes the commutator of two quantum operators [A,B] = AB - BA. Returns zero operator for identical operators or operators acting on disjoint sites.
convert_to_operatorsumConverts a PauliSumMap to an ComplexOperatorSum.
convert_to_paulisumConverts an Operator to a PauliSumMap. Only valid Pauli operators X,Y,Z, and I are allowed.
converted_to_create_destroyConverts a sum or product of named fermion operators to their equivalent representation in terms of creation and annihilation operators.
dmrgCompute the ground state of a quantum many-body system using the Density Matrix Renormalization Group (DMRG) algorithm.
evolve_suzuki4Evolve a complex vector state using 4th-order Suzuki-Trotter.
fbit_rangeCreates a range of Fbit objects with the specified number of sites.
fermionic_site_reorderReorders sum or products of creation and annihilation operators in place by site while preserving order on each site.
flattenFlattens any operator by expanding all expressions into a sum of products (in-place).
flattenedFlattens any operator by expanding all expressions into a sum of products (out-of-place).
fused_into_numberFuses the appropriate creation and annihilation operators into number operators.
haar_matrixGenerate a square Haar random unitary matrix of a specified size.
haar_vectorGenerates a Haar random vector of a specified size with a specified seed.
heisenberg_2qubit_unitaryCompute the 2-qubit Heisenberg unitary evolution.
integerReturns the integer representation of the fermionic product state.
intervalConstructs an interval [lower, upper].
is_disjoint_supportReturns true if operators act on non-overlapping sites (commute).
iterative_eigensolverIterative eigensolver for operators.
kronReturns the tensor product of two qubit product states.
largest_absReturns the largest_abs enum value.
largest_imagReturns the largest_imag enum value.
largest_realReturns the largest_real enum value.
lattice_rangeConstructs a LatticeRange.
mergeSimplifies an OperatorSum by combining like terms (in-place).
mergedSimplifies an OperatorSum by combining like terms (out-of-place).
neighbourhood_ruleConstructor for a neighbourhood rule.
prunePrunes operators from an OperatorSum based on their effective norm (in-place).
prunedPrunes operators from an OperatorSum based on their effective norm (out-of-place).
reduced_density_matrixCalculates the reduced density matrix for a subsystem using arbitrary subsystem cuts.
reduced_number_powerReduces powers of the number operator on the same site to at most 1.
renyi_entropyCalculates the Rényi entropy of order q for a density matrix.
reorder_by_siteReorders operators within a product by their site indices while preserving quantum commutation rules.
simplified_create_destroySimplifies and reorders a product of creation and annihilation operators by site while preserving site order. Terms are killed if there are too many creation or annihilation operators.
simplify_paulisSimplifies a sum or product of Pauli operators according to Pauli algebra rules with complex coefficients, pruning terms with a coefficient of norm equal to machine precision.Applies commutation relations: X*Y = iZ, Y*Z = iX, Z*X = iY, and P*P = I for any Pauli operator P. Handles multi-site operators and automatically combines like terms.
smallest_absReturns the smallest_abs enum value.
smallest_imagReturns the smallest_imag enum value.
smallest_realReturns the smallest_real enum value.
sse_order_estimatorConstructs the estimator for the order in an SSE simulation.
sse_simulationReads an SSE Simulation from the group at the given path.
sse_vertexConstructs a diagonal SSE vertex.
stringReturns a standardized string representation for a LatticeCoordinate.
von_neumann_entropyCalculates the von Neumann entropy of a density matrix.
writeWrites an SSE simulation and returns the file for chaining.

Module Symbols

NameDescription
!=Returns true if the lattice coordinates are not equal.
*Multiplies a constant coefficient by a quantum state.
+Adds the primitive vectors and basis indices of the given lattice coordinates.
+=Appends a PauliTerm to the PauliSum.
=Assigns a PauliSum to another PauliSum.
==Returns true if the two StateInfo options are equivalent.
[]Array access operator with Fbit states.
|Combines two compatible StateInfo options.