Skip to content

pmm_tools.models.kitaev_chain

Isolated quadratic Kitaev chains in Fock and real Majorana representations.

Physical convention (matching chain_matrix_dict at phi=0):

H = sum mu_j c_j^dagger c_j
+ sum [t_j c_j^dagger c_(j+1)
+ Delta_j c_j^dagger c_(j+1)^dagger + h.c.]

We use a_j = -i(c_j-c_j^dagger), b_j = -(c_j+c_j^dagger). Then H = Tr(B)/2 + i a^T B b/2, where B has diagonal mu, superdiagonal t+Delta and subdiagonal t-Delta. These axes are a local rotation of the common (c+c^dagger, -i(c-c^dagger)) convention; using that common convention instead transposes B. No physical pairing phase changes.

For gamma=(a_1,...,a_N,b_1,...,b_N), H=Tr(B)/2+i gamma^T A gamma/4, with A=[[0,B],[-B^T,0]]. Singular values of B are excitation energies. The signed gap is always E_even-E_odd, with physical occupation parity: -sign(det B) times the smallest singular value. The even/odd low Hamiltonian after subtracting its midpoint is diag(+gap/2,-gap/2), so epsilon=gap/2.

Fock-space constructors retain the superconducting pairing phase. Majorana spectra assume an isolated, real, noninteracting chain. No bridge, noise law, or projection onto an assumed edge state is built in. Absolute accuracy is floating-point limited: exponentially small gaps may not have reliable relative accuracy.

Classes

NameDescription
ChainMajoranasLowest singular pair plus gap=E_even-E_odd and diagnostics.

Functions

NameDescription
chain_basis_indicesReturn isolated-chain Fock-basis indices of one parity.
chain_ground_stateReturn an isolated-chain parity ground state in the full Fock basis.
chain_matrix_dictSparse isolated-chain terms with one-index mu_j,t_j,Delta_j and phase phi.
chain_operatorsReturn full isolated-chain coefficient matrices and physical +/-1 parity.
chain_parameter_namesReturn the parameter names for one isolated Kitaev chain.
low_energy_majoranasReturn the lowest a/b Majoranas and gap=E_even-E_odd, using one SVD.
majorana_blockBuild B with shape (..., N, N), accepting batches of chains.
majorana_matrixExpand B to the real antisymmetric 2N-by-2N matrix A.
parity_gapReturn E_even-E_odd without computing singular vectors.
symbolic_chainReturn (Hamiltonian, fermions, symbols) for a complex-phase Kitaev chain.

ChainMajoranasclassdataclass#

class ChainMajoranas(gap: np.ndarray, energies: np.ndarray, a: np.ndarray, b: np.ndarray, isolated: np.ndarray, gap_resolved: np.ndarray)

Lowest singular pair plus gap=E_even-E_odd and diagnostics.

a and b have shape (..., N), each with unit Euclidean norm. They define gamma_a=sum a_j*a_site_j and gamma_b=sum b_j*b_site_j, with B*b=E*a and B.T*a=E*b for E=energies[...,0]>=0. This positive-SVD convention does NOT encode the signed parity gap in gamma_a/gamma_b: use gap separately when labeling even and odd states.

At t=Delta>0, mu=0, a is on the right and b on the left. Away from this regime they need not be edge-localized. Interface probabilities are a[...,j]**2 and b[...,j]**2, not the combined BdG quasiparticle density.

energies are sorted ascending. isolated flags separation from the next singular value at the requested tolerance, NOT good edge localization. gap_resolved flags a gap above an estimated floating-point scale; it is only a diagnostic, not a rigorous error bound. At an exact sweet spot gap_resolved is false even though the isolated zero-mode pair is valid.

aattributeinstance attribute#

a: np.ndarray

battributeinstance attribute#

b: np.ndarray

energiesattributeinstance attribute#

energies: np.ndarray

gapattributeinstance attribute#

gap: np.ndarray

gap_resolvedattributeinstance attribute#

gap_resolved: np.ndarray

isolatedattributeinstance attribute#

isolated: np.ndarray

chain_basis_indicesfunction#

def chain_basis_indices(n_sites: int, parity: str) -> np.ndarray

Return isolated-chain Fock-basis indices of one parity.

Parameters

NameTypeDescription
n_sitesint

Number of sites in the chain.

paritystr

Fermion-parity sector, "even" or "odd".

Returns

np.ndarray

Indices into the full chain occupation basis.

chain_ground_statefunction#

def chain_ground_state(n_sites, parameters, parity)

Return an isolated-chain parity ground state in the full Fock basis.

chain_matrix_dictfunctioncached#

def chain_matrix_dict(n_sites: int, parity: str | None = 'even')

Sparse isolated-chain terms with one-index mu_j,t_j,Delta_j and phase phi.

Pair creation has coefficient Delta_j*exp(i*phi). Select "even", "odd", or None for the full occupation basis. No low-energy projection is made.

chain_operatorsfunction#

def chain_operators(n_sites, *, phi=0.0)

Return full isolated-chain coefficient matrices and physical +/-1 parity.

Controls are named mu_1,...,mu_N,t_1,...,Delta_1,... and the phase is fixed.

chain_parameter_namesfunction#

def chain_parameter_names(n_sites: int) -> tuple[str, ...]

Return the parameter names for one isolated Kitaev chain.

Parameters

NameTypeDescription
n_sitesint

Number of sites in the chain.

Returns

tuple of str

Names of the onsite, hopping, pairing, and phase parameters.

low_energy_majoranasfunction#

def low_energy_majoranas(block, *, rtol=1e-10, atol=0.0)

Return the lowest a/b Majoranas and gap=E_even-E_odd, using one SVD.

Fix the arbitrary common sign by making the largest-magnitude component of a positive (first index wins ties); flip b by the same sign. This is reproducible locally, not a continuous gauge along parameter sweeps. At zero singular value the two vector signs are independently arbitrary. Squared interface weights are unaffected by these gauge choices.

Warn when the lowest pair is not isolated: individual vectors then depend on the chosen basis in the degenerate subspace, and a one-mode projection is not justified. A single exact zero mode is allowed. For N=1 there is no next mode. rtol/atol affect diagnostics only, never energies or vectors.

majorana_blockfunction#

def majorana_block(mu, hopping, pairing)

Build B with shape (..., N, N), accepting batches of chains.

mu has shape (..., N), N>=1. Real hopping/pairing broadcast to (..., N-1); scalars specify uniform bonds. All energies use the same caller-chosen unit. No assumption t=Delta or uniform gap is imposed.

majorana_matrixfunction#

def majorana_matrix(block)

Expand B to the real antisymmetric 2N-by-2N matrix A.

Grouped ordering is (a_1,...,a_N,b_1,...,b_N), not interleaved sites. Eigenvalues of i*A are +/- excitation energies. Gap/mode calculations can use B directly and need not allocate this larger matrix.

parity_gapfunction#

def parity_gap(block)

Return E_even-E_odd without computing singular vectors.

The determinant sign is calibrated to the empty, even vacuum for positive diagonal B, where the returned gap is negative. It includes the parity of all modes, not just the lowest mode. A singular B has zero gap. No tolerance clips small nonzero splittings. Inputs may be batched. Near numerical singularity the sign and relative gap accuracy are not certified; low_energy_majoranas provides a diagnostic.

symbolic_chainfunction#

def symbolic_chain(n_sites)

Return (Hamiltonian, fermions, symbols) for a complex-phase Kitaev chain.

Ordered modes are c_0,...,c_(N-1), with +mu_j*n_j and real hopping t_j. Pair creation has coefficient Delta_j*exp(i*phi_j), with real signed Delta_j. Energies use any common unit; phases are radians. No projection is made.