Position Spaces

Fibonacci quasicrystal

Fibonacci chains use a projected Zeckendorf position space: H.N = F_(L+2) physical positions are embedded in an ambient 2^L qubit register. The physical identity is therefore physical_projector(H), not the ambient identity.

H = TensorBinding.fibonacci_hamiltonian(
    8; A=1.0, B=2.0,
    model=:hopping,
    boundary=:periodic,
)

# Equivalent generic constructor
H = TensorBinding.get_Hamiltonian(
    "fibonacci", (A=1.0, B=2.0);
    L=8, model=:hopping, boundary=:periodic,
)

model=:onsite uses A and B as onsite energies with uniform hopping t. model=:hopping uses them as bond amplitudes with uniform onsite. Periodic boundaries close the physical Fibonacci approximant; they do not wrap at the last ambient binary state.

CPU KPM construction, cached/online LDOS, spatial LDOS, stochastic DOS, deterministic trace DOS, and KPM density construction are projector-aware. Binary-only modifiers, QFT/bands, GPU, purification, topology, SCF, exciton, and non-Hermitian APIs currently reject projected position spaces explicitly.

energies = range(-4, 4; length=400)

dos = TensorBinding.get_dos_trace(H, 200, energies)
ldos = TensorBinding.get_ldos_spatial(
    H, 200, energies;
    ordering=:conumber,
    conumber_orientation=:standard,
    conumber_centered=true,
    conumber_alignment=:atomic,
)
conumbers = TensorBinding.site_axis(H; ordering=:conumber)

The two multipliers are reflections because F_(n-1) = F_n - F_(n-2) modulo F_n; changing orientation cannot repair a wrong cyclic phase. The raw modular formula alone does not choose where the periodic perpendicular- space interval is cut. The default alignment=:atomic chooses that cut to give three contiguous blocks of sizes F_L | F_(L-1) | F_L: molecular, atomic (AA), molecular. centered=true then labels this ordered axis around zero; it does not rotate it again. Set alignment=:raw to inspect unshifted residues, or use orientation=:reversed for the reflected perpendicular-space direction.

Pointwise helpers avoid allocating a full permutation for very large systems:

c = TensorBinding.fibonacci_conumber(43, site)
site_again = TensorBinding.fibonacci_site_from_conumber(43, c)
kind = TensorBinding.fibonacci_site_environment(43, site)
depth = TensorBinding.fibonacci_atomic_depth(43, site)

Successive atomic deflations map L -> L-3. To zoom without losing the induced phason/origin, retain the original conumber coordinates and slice the nested window instead of assigning the selected sites fresh indices 1:F_(L'+2):

zoom = TensorBinding.fibonacci_rg_partition(43; depth=13)
@assert zoom.effective_L == 4
@assert zoom.window_count == 8
@assert (zoom.molecular_count, zoom.atomic_count, zoom.molecular_count) == (3, 2, 3)

# Probe those original physical sites in their inherited conumber order.
zoom_sites = [
    TensorBinding.fibonacci_site_from_conumber(43, c; centered=false)
    for c in zoom.window_ranks
]
ldos_zoom = TensorBinding.get_ldos_spatial(
    H, 4000, energies;
    ordering=:physical,
    x_groups=[[site] for site in zoom_sites],
)
# Plot ldos_zoom against zoom.window_axis; do not conumber it a second time.

A periodic hopping ring with odd H.N is not bipartite and is therefore not required to have exact E -> -E chiral symmetry.

TensorBinding.FibonacciPositionSpace — Type
FibonacciPositionSpace(projector)

Zeckendorf-encoded Fibonacci position space. projector is the identity on the F_(L+2) valid strings embedded in the ambient 2^L qubit register.

source
TensorBinding.fibonacci_atomic_depth — Method
fibonacci_atomic_depth(L, site; orientation=:standard, origin=0) -> Int

Number of consecutive atomic deflations containing site. This directly tests whether a site remains inside the nested central atomic windows.

source
TensorBinding.fibonacci_bond_symbol — Method
fibonacci_bond_symbol(L, bond) -> Symbol

Return :A or :B for the 1-indexed bond beginning at bond in the canonical F_(L+2)-bond periodic approximant. Bond N joins site N to site 1 when periodic boundaries are used.

source
TensorBinding.fibonacci_conumber — Method
fibonacci_conumber(L, site; orientation=:standard, alignment=:atomic,
                    centered=true, origin=0) -> Int

Conumber of a single 1-indexed physical site, evaluated without constructing a Hamiltonian or allocating an F_(L+2)-element permutation.

alignment=:atomic makes the conumber cut compatible with TensorBinding's canonical Fibonacci bond phase: the AA sites form one central block, between the AB and BA molecular blocks. alignment=:raw exposes the unshifted modular residue. centered=true labels the ordered ranks around zero; it does not perform an additional cyclic permutation.

source
TensorBinding.fibonacci_decrement_mpo — Method
fibonacci_decrement_mpo(sites; boundary=:open) -> MPO

Physical decrement K|n> = |n-1> in the Zeckendorf basis. With periodic boundaries the only added automaton transition is |0> -> |F_(L+2)-1>; wrapping never occurs at the ambient binary state 2^L-1.

source
TensorBinding.fibonacci_hamiltonian — Method
fibonacci_hamiltonian(L; A, B, model=:hopping, t=1.0, onsite=0.0,
                      boundary=:periodic, scale=nothing, padding=1.05,
                      cutoff=1e-12, maxdim=200) -> TBHamiltonian

Construct a Fibonacci chain in the projected Zeckendorf position space.

  • model=:onsite: A and B are onsite energies and t is uniform hopping.
  • model=:hopping: A and B are bond amplitudes and onsite is uniform.

The default periodic boundary closes the physical F_(L+2)-site approximant. For odd F_(L+2), a periodic hopping chain is an odd cycle and therefore is not exactly chiral even when onsite=0.

source
TensorBinding.fibonacci_rg_partition — Method
fibonacci_rg_partition(L; depth=0, centered=true) -> NamedTuple

Return the molecular–atomic–molecular conumber intervals after depth successive atomic deflations. Each deflation maps L -> L-3. The returned ranges are embedded in the original conumber ordering, so a zoom should slice these ranges directly rather than re-conumbering the selected sites as a new canonical chain.

source
TensorBinding.fibonacci_site_environment — Method
fibonacci_site_environment(L, site; boundary=:periodic) -> Symbol

Classify a site from its adjacent bonds. :atomic means AA, while :molecular_AB and :molecular_BA retain the orientation of the molecular site. Open-chain endpoints return :boundary.

source

Metallic-mean quasicrystals

The metallic-mean chain with parameter m is the fixed point of A -> A^m B, B -> A (m = 1 Fibonacci, m = 2 silver mean, m = 3 bronze mean). Sites are labelled in the numeration system with basis q_0 = 1, q_1 = m + 1, q_(l+1) = m q_l + q_(l-1), digits in 0:m, and the rule that a digit m must be followed by 0. L digits enumerate H.N = q_L physical sites inside an ambient (m+1)^L register of Qudit sites of dimension m + 1. The letter at site n is B exactly when the least significant digit of n is m, so the word and the validity indicator are both bond-dimension-2 automaton MPS and the Hamiltonian MPO P (V + T K + h.c.) P is exact at any L.

H = TensorBinding.metallic_mean_hamiltonian(
    2, 8; A=1.0, B=2.0, model=:hopping, boundary=:periodic,
)

# Equivalent generic constructor (m is required)
H = TensorBinding.get_Hamiltonian(
    "metallic_mean", (A=1.0, B=2.0); L=8, m=2,
)

The projector-aware CPU KPM entry points work exactly as for Fibonacci (KPM_Tn, get_ldos_online, get_ldos_spatial with ordering=:physical, get_dos_stochastic, get_dos_trace), as does get_ldos_spatial_mps_gpu. Conumbering and the inherited-conumber sampling plans are currently Fibonacci-only, so ordering=:conumber throws for metallic means. m = 1 reproduces the Fibonacci chain of fibonacci_hamiltonian on dimension-2 Qudit sites.

TensorBinding.MetallicMeanPositionSpace — Type
MetallicMeanPositionSpace(m, projector)

Projected position space of the metallic-mean chain with parameter m. projector is the identity on the q_L admissible digit strings embedded in the ambient (m+1)^L Qudit register.

source
TensorBinding.metallic_mean_bond_symbol — Method
metallic_mean_bond_symbol(m, L, bond) -> Symbol

Return :A or :B for the 1-indexed bond beginning at bond in the canonical q_L-bond periodic approximant of the metallic-mean chain. Bond N joins site N to site 1 when periodic boundaries are used.

source
TensorBinding.metallic_mean_decrement_mpo — Method
metallic_mean_decrement_mpo(m, sites; boundary=:open) -> MPO

Physical decrement K|n> = |n-1> in the metallic-mean numeration system. The i-th term fires when the least significant nonzero digit sits at position i: that digit is lowered by one and the (all-zero) tail becomes m, 0, m, 0, …, which encodes q_k - 1. With periodic boundaries the only added transition is |0> -> |q_L - 1>; wrapping never occurs at an inadmissible register state.

source
TensorBinding.metallic_mean_digits — Method
metallic_mean_digits(m, n, L) -> Vector{Int}

Length-L, most-significant-first expansion of the physical site label n in 0:q_L-1 in the metallic-mean numeration system: digits in 0:m with weights q_(L-1), …, q_0, obtained greedily. The result never contains a digit m followed by a nonzero digit.

source
TensorBinding.metallic_mean_hamiltonian — Method
metallic_mean_hamiltonian(m, L; A, B, model=:hopping, t=1.0, onsite=0.0,
                          boundary=:periodic, scale=nothing, padding=1.05,
                          cutoff=1e-12, maxdim=200) -> TBHamiltonian

Construct the metallic-mean chain with parameter m (A -> A^m B, B -> A) in its projected numeration position space on L Qudit sites of dimension m + 1. The chain has H.N = q_L physical sites.

  • model=:onsite: A and B are onsite energies and t is uniform hopping.
  • model=:hopping: A and B are bond amplitudes and onsite is uniform.

The Hamiltonian is assembled as P (V + T K + h.c.) P, where P is the validity projector, T/V the diagonal word MPO, and K the decrement metallic_mean_decrement_mpo. m = 1 reproduces the Fibonacci chain of fibonacci_hamiltonian on dimension-2 Qudit sites. The default periodic boundary closes the physical q_L-site approximant.

source
TensorBinding.metallic_mean_number — Method
metallic_mean_number(m, n) -> BigInt

Return q_n for the metallic mean with parameter m, where q_0 = 1, q_1 = m + 1, and q_(n+1) = m q_n + q_(n-1). For m = 1 this is F_(n+2); for m = 2 it is the sequence 1, 3, 7, 17, 41, … of the silver-mean chain.

source

k-bonacci quasicrystals

The k-bonacci chain on the alphabet a_1, …, a_k (written A, B, C, …) is the fixed point of a_i -> a_1 a_(i+1) for i < k and a_k -> a_1 (k = 2 Fibonacci, k = 3 Tribonacci A -> AB, B -> AC, C -> A, k = 4 Tetranacci). Sites are labelled by binary strings with no k consecutive ones, read with the weights w_l = 2^l for l < k and w_l = w_(l-1) + … + w_(l-k) otherwise (Zeckendorf for k = 2, the Tribonacci numbers T_(l+3) for k = 3). L digits enumerate H.N = w_L physical sites inside the ambient 2^L Qubit register, exactly like the Fibonacci chain. The letter at site n is a_(r+1) where r is the number of trailing ones of n, so the word and the validity indicator are k-state automaton MPS (bond dimension k) and the Hamiltonian MPO P (V + T K + h.c.) P is exact at any L. The decrement K clears the least significant one and rewrites the tail with the pattern 1^(k-1) 0.

# Tribonacci hopping chain with t_A/t_B = t_B/t_C = 0.8 and t_C = 1
H = TensorBinding.kbonacci_hamiltonian(
    3, 10; values=(0.64, 0.8, 1.0), model=:hopping, boundary=:periodic,
)

# Equivalent generic constructor (k is required); letter keys or values=(…)
H = TensorBinding.get_Hamiltonian(
    "kbonacci", (A=0.64, B=0.8, C=1.0); L=10, k=3,
)

The projector-aware CPU KPM entry points and get_ldos_spatial_mps_gpu work as for Fibonacci with ordering=:physical; conumbering is Fibonacci-only, so ordering=:conumber throws. k = 2 reproduces fibonacci_hamiltonian exactly, on the same Qubit sites.

TensorBinding.KBonacciPositionSpace — Type
KBonacciPositionSpace(k, projector)

Projected position space of the k-bonacci chain of order k. projector is the identity on the w_L admissible binary strings (no k consecutive ones) embedded in the ambient 2^L Qubit register.

source
TensorBinding.kbonacci_bond_symbol — Method
kbonacci_bond_symbol(k, L, bond) -> Symbol

Return the letter (:A, :B, :C, …) of the 1-indexed bond beginning at bond in the canonical w_L-bond periodic approximant of the k-bonacci chain: the letter of physical site bond - 1, selected by its number of trailing ones. Bond N joins site N to site 1 when periodic boundaries are used.

source
TensorBinding.kbonacci_decrement_mpo — Method
kbonacci_decrement_mpo(k, sites; boundary=:open) -> MPO

Physical decrement K|n> = |n-1> in the k-bonacci numeration system. The i-th term fires when the least significant one sits at position i: that digit is cleared and the (all-zero) tail is rewritten with the repeating pattern 1, …, 1, 0 (k - 1 ones then a zero), which encodes w_j - 1 on j digits. With periodic boundaries the only added transition is |0> -> |w_L - 1>; the ambient register state 2^L - 1 is never wrapped. Uses the qubit operators FibLower, FibRaise, FibP0 of Fibonacci.jl.

source
TensorBinding.kbonacci_digits — Method
kbonacci_digits(k, n, L) -> Vector{Int}

Length-L, most-significant-first binary expansion of the physical site label n in 0:w_L-1 in the k-bonacci numeration system, with weights w_(L-1), …, w_0, obtained greedily. The result never contains k consecutive ones. For k = 2 this is fibonacci_zeckendorf_digits.

source
TensorBinding.kbonacci_hamiltonian — Method
kbonacci_hamiltonian(k, L; values, model=:hopping, t=1.0, onsite=0.0,
                     boundary=:periodic, scale=nothing, padding=1.05,
                     cutoff=1e-12, maxdim=200) -> TBHamiltonian

Construct the k-bonacci chain of order k (a_i -> a_1 a_(i+1), a_k -> a_1) in its projected numeration position space on L Qubit sites. values holds one amplitude per letter a_1, …, a_k (i.e. A, B, C, …) and the chain has H.N = w_L physical sites.

  • model=:onsite: values are onsite energies and t is uniform hopping.
  • model=:hopping: values are bond amplitudes and onsite is uniform.

The Hamiltonian is assembled as P (V + T K + h.c.) P, where P is the validity projector, T/V the diagonal word MPO, and K the decrement kbonacci_decrement_mpo. k = 2 reproduces the Fibonacci chain of fibonacci_hamiltonian with values = (A, B); k = 3 is the Tribonacci chain. The default periodic boundary closes the physical w_L-site approximant.

source
TensorBinding.kbonacci_number — Method
kbonacci_number(k, n) -> BigInt

Return w_n, the number of length-n binary strings without k consecutive ones: w_n = 2^n for n < k and w_n = w_(n-1) + … + w_(n-k) otherwise. In the usual seeding of the k-bonacci sequence (k - 1 zeros followed by a one) this is its (n + k)-th term: F_(n+2) for k = 2, the Tribonacci number T_(n+3) for k = 3 (1, 2, 4, 7, 13, 24, …), the Tetranacci number for k = 4 (1, 2, 4, 8, 15, 29, …).

source