API Reference

This page provides a complete reference for all exported functions in FibonacciChain.jl.

Basis and Hamiltonian Functions

FibonacciChain.anyon_basisFunction
anyon_basis(::Type{T}, pbc::Bool=true; Y=nothing, anyon_type::Symbol=:Fibo) where {N, T <: BitStr{N}}

Generate basis states for 1D anyon chain.

Arguments

  • T::Type: BitStr type specifying chain length N
  • pbc::Bool=true: Periodic boundary conditions
  • Y: Topological charge filter (:tau, :trivial, 0, 1, or nothing)
  • anyon_type::Symbol=:Fibo: anyon type (:Fibo, :resetFibo, :IsingX, :IsingZZ, :IsingZ, :reset)

Returns

  • Vector{T}: Sorted basis states satisfying constraints

Supports Fibonacci anyons, Ising anyons/Majorana fermions, and spin-1/2 systems.

Examples

julia> using FibonacciChain, BitBasis

julia> # Generate Fibonacci basis for N=4 with PBC
       N = 4; T = BitStr{N, Int};

julia> basis_fibo = anyon_basis(T, true, anyon_type=:Fibo);

julia> length(basis_fibo)  # Fibonacci numbers give the dimension
7

julia> basis_fibo[1]  # First basis state (vacuum)
0000 ₍₂₎

julia> # Generate Ising basis for comparison
       basis_ising = anyon_basis(T, true, anyon_type=:IsingX);

julia> length(basis_ising)  # All 2^N states for Ising
16
source
anyon_basis(::Type{T}, k::Int64; Y=nothing, anyon_type::Symbol=:Fibo) where {N, T <: BitStr{N}}

Generate basis states in specific momentum sector k and topological sector Y.

Arguments

  • T::Type: BitStr type specifying chain length N
  • k::Int64: Momentum sector (0 ≤ k ≤ N-1)
  • Y: Topological charge sector
  • anyon_type::Symbol=:Fibo: anyon type

Returns

  • Vector{T}: Basis states in momentum sector k
  • Dict{T, Vector{T}}: Representative mapping for translation equivalence classes
source
FibonacciChain.anyon_hamFunction
anyon_ham(::Type{T}, pbc::Bool=true; anyon_type::Symbol=:Fibo, kwargs...) where {N, T <: BitStr{N}}

Construct Hamiltonian matrix for 1D anyon chain.

Arguments

  • T::Type: BitStr type specifying chain length N
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: anyon type
  • kwargs...: Additional model parameters, e.g., J, h for Ising model.

Returns

  • Matrix{Float64}: Hamiltonian matrix in chosen basis

Supports various anyon models including Fibonacci and Ising anyons.

Examples

julia> using FibonacciChain, BitBasis

julia> N = 4; T = BitStr{N,Int};

julia> H_fibo = anyon_ham(T, true, anyon_type=:Fibo);

julia> size(H_fibo)       # Hamiltonian dimension matches basis size
(7, 7)

julia> H_Ising = anyon_ham(T, true, anyon_type=:IsingX, J=1.0, h=1.0);

julia> size(H_Ising)      # full Hilbert space for Ising model
(16, 16)
source
anyon_ham(::Type{T}, k::Int; Y=nothing, anyon_type::Symbol=:Fibo, kwargs...) where {N, T <: BitStr{N}}

Construct Hamiltonian matrix in specific symmetry sector for 1D anyon chain.

Arguments

  • T::Type: BitStr type specifying chain length N
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: anyon type
  • kwargs...: Additional model parameters, e.g., J, h for Ising model.

Returns

  • Matrix{Float64}: Hamiltonian matrix in chosen basis
source
FibonacciChain.anyon_ham_sparseFunction
anyon_ham_sparse(::Type{T}, pbc::Bool=true; anyon_type::Symbol=:Fibo) where {N, T <: BitStr{N}}

Construct anyon chain Hamiltonian as sparse matrix.

Arguments

  • T::Type: BitStr type specifying chain length N
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: Model type
  • kwargs...: Additional keyword arguments passed to actingHam, e.g. J, h.

Returns

  • SparseMatrixCSC{Float64, Int}: Sparse Hamiltonian matrix in anyon basis

Examples

julia> using FibonacciChain, BitBasis, SparseArrays, LinearAlgebra

julia> N = 6; T = BitStr{N, Int};

julia> H_sparse = anyon_ham_sparse(T, true, anyon_type=:Fibo);

julia> H_sparse isa SparseMatrixCSC # Check it's a sparse matrix
true

julia> ishermitian(H_sparse) # Should be Hermitian
true

julia> H_dense = anyon_ham(N, true); # Compare with dense version for small system

julia> norm(Matrix(H_sparse) - H_dense) < 1e-10
true
source
anyon_ham_sparse(::Type{T}, k::Int, Y=nothing; anyon_type::Symbol=:Fibo) where {N, T <: BitStr{N}}

Construct Hamiltonian in momentum-topological sector as sparse matrix.

Arguments

  • T::Type: BitStr type specifying chain length N
  • k::Int: Momentum quantum number (0 ≤ k ≤ N-1)
  • Y: Topological charge sector
  • anyon_type::Symbol=:Fibo: Model type
  • kwargs...: Additional keyword arguments passed to actingHam, e.g. J, h.

Returns

  • SparseMatrixCSC{ComplexF64, Int}: Sparse Hamiltonian in symmetric sector
source

Reduced Density Matrices

FibonacciChain.anyon_rdmFunction
anyon_rdm(::Type{T}, subsystems::Vector{Int64}, state::Union{Vector{ET}, Matrix{ET}}, pbc::Bool=true; anyon_type::Symbol=:Fibo) where {N,T <: BitStr{N}, ET}

Compute reduced density matrix for specified subsystems from quantum state or density matrix.

Arguments

  • T::Type: BitStr type specifying chain length N
  • subsystems::Vector{Int64}: Indices of subsystem sites to keep
  • state::Union{Vector{ET}, Matrix{ET}}: Quantum state vector or density matrix
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: Model type

Returns

  • Matrix{ET}: Reduced density matrix for specified subsystems

Subsystem indices are counted from right in binary representation.

Examples

julia> using FibonacciChain, BitBasis, LinearAlgebra

julia> N = 4; T = BitStr{N, Int};

julia> basis = anyon_basis(T, true, anyon_type=:Fibo);

julia> state = randn(ComplexF64, length(basis)); state ./= norm(state);  

julia> rdm = anyon_rdm(T, [1, 2], state, true, anyon_type=:Fibo);

julia> size(rdm)  # Reduced density matrix dimension
(3, 3)

julia> ishermitian(rdm)  # RDM should be Hermitian
true

julia> tr(rdm) ≈ 1.0 + 0.0im  # Trace should be 1
true
source
FibonacciChain.anyon_rdm_secFunction
anyon_rdm_sec(::Type{T}, subsystems::Vector{Int64}, kstate::Vector{ET}, k::Int64) where {N,T <: BitStr{N}, ET}

Compute reduced density matrix for specified subsystems from quantum state or density matrix in specific symmetry sector.

Arguments

  • T::Type: BitStr type specifying chain length N
  • subsystems::Vector{Int64}: Indices of subsystem sites to keep
  • kstate::Vector{ET}: State vector in symmetric sector Hilbert space
  • k::Int64: Momentum sector (0 ≤ k ≤ N-1)
  • anyon_type::Symbol=:Fibo: anyon type

Returns

  • Matrix{ET}: Reduced density matrix in total Hilbert basis
source
FibonacciChain.disjoint_rdmFunction
disjoint_rdm(::Type{T1}, ::Type{T2}, subsystemsA::Vector{Int64}, subsystemsB::Vector{Int64}, state::Vector{ET}, pbc::Bool=true; totalsubApbc::Bool=false, totalsubBpbc::Bool=false, anyon_typeA::Symbol=:Fibo, anyon_typeB::Symbol=:Fibo) where {N1, N2,T1 <: BitStr{N1},T2 <: BitStr{N2}, ET}

Compute reduced density matrix for two joint different systems, or two parallel chains. Where specified subsystems is given, output quantum state or density matrix.

Arguments

  • T1::Type: BitStr type specifying chain length N1
  • T2::Type: BitStr type specifying chain length N2
  • subsystemsA::Vector{Int64}: Indices of subsystem sites to keep
  • subsystemsB::Vector{Int64}: Indices of subsystem sites to keep
  • state::Vector{ET}: Quantum state vector in total Hilbert space
  • pbc::Bool=true: Periodic boundary conditions
  • totalsubApbc::Bool=false: Whether the total subsystem A is periodic
  • totalsubBpbc::Bool=false: Whether the total subsystem B is periodic
  • anyon_typeA::Symbol=:Fibo: anyon type for subsystem A
  • anyon_typeB::Symbol=:Fibo: anyon type for subsystem B

Returns

  • Matrix{ET}: Reduced density matrix in total Hilbert basis

Examples

julia> using FibonacciChain, BitBasis, LinearAlgebra

julia> N1, N2 = 4, 4; T1, T2 = BitStr{N1,Int}, BitStr{N2,Int};

julia> basisA = anyon_basis(T1, true, anyon_type=:Fibo);

julia> basisB = anyon_basis(T2, true, anyon_type=:Fibo);

julia> state = randn(ComplexF64, length(basisA) * length(basisB));

julia> state ./= norm(state);

julia> rdm = disjoint_rdm(T1, T2, [1,2], [1,2], state, true,
                          totalsubApbc=false, totalsubBpbc=false,
                          anyon_typeA=:Fibo, anyon_typeB=:Fibo);

julia> size(rdm)          # reduced density matrix dimension
(9, 9)

julia> ishermitian(rdm)   # should be Hermitian
true

julia> tr(rdm) ≈ 0.9999999999999999 + 0.0im  # trace should be 1
true
source
FibonacciChain.mapst_sec2totFunction
mapst_sec2tot(::Type{T}, state::Vector{ET}, k::Int64; anyon_type::Symbol=:Fibo) where {N, T <: BitStr{N}, ET}

map state in symmetric sector to total Hilbert space.

Arguments

  • T::Type: BitStr type specifying chain length N
  • state::Vector{ET}: State vector in symmetric sector Hilbert space
  • anyon_type::Symbol=:Fibo: anyon type

Returns

  • Vector{ET}: Total space state vector
source

Entanglement and Observables

FibonacciChain.eeFunction
ee(subrm::Matrix{ET}) where {ET}

Calculate entanglement entropy from reduced density matrix.

Arguments

  • subrm::Matrix{ET}: Hermitian reduced density matrix

Returns

  • Float64: von Neumann entanglement entropy

Examples

julia> using FibonacciChain, LinearAlgebra

julia> # Create a simple 2x2 density matrix
       ρ = [0.5 0.0; 0.0 0.5];  # Maximally mixed state

julia> entropy = ee(ρ);

julia> abs(entropy - log(2)) < 1e-10  # Should equal log(2) ≈ 0.693
true

julia> # Pure state has zero entropy
       ρ_pure = [1.0 0.0; 0.0 0.0];

julia> ee(ρ_pure) ≈ 0.0
true
source
FibonacciChain.anyon_eelisFunction
anyon_eelis(N::Int64, state::Union{Vector{ET}, Matrix{ET}}, pbc::Bool=true; anyon_type::Symbol=:Fibo) where {ET}

Calculate entanglement entropy profile along the chain for given quantum state or density matrix.

Arguments

  • N::Int64: System size
  • state::Union{Vector{ET}, Matrix{ET}}: Quantum state vector or density matrix in anyon basis
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: anyon type

Returns

  • Vector{Float64}: Entanglement entropy at each bipartition from left to right

Examples

julia> using FibonacciChain, LinearAlgebra

julia> N = 6;

julia> # Create ground state of Fibonacci Hamiltonian
       H = anyon_ham(N, true);

julia> eigenvals, eigenvecs = eigen(H);

julia> ground_state = eigenvecs[:, 1];

julia> # Calculate entanglement entropy profile
       ee_profile = anyon_eelis(N, ground_state, true);

julia> length(ee_profile) == N - 1  # Profile has N-1 points
true

julia> all(x -> x ≥ 0, ee_profile)  # All entropies are non-negative
true
source
FibonacciChain.ee_mpsFunction
calculate_entanglement_entropy_mps(ψ::MPS, b::Int) -> Float64

Calculate entanglement entropy of MPS state with bipartition at bond b.

source
FibonacciChain.anyon_eelis_mpsFunction
anyon_eelis_mps(N::Int64, ψ::MPS)

Calculate entanglement entropy profile along the chain for MPS state.

Arguments

  • N::Int64: System size
  • ψ::MPS: MPS state

Returns

  • Vector{Float64}: Entanglement entropy at each bipartition from left to right

Examples

julia> using FibonacciChain, ITensorMPS, ITensors

julia> N = 6;

julia> ψ_gs, E0 = fibonacci_mps_ground_state(N, pbc=true, maxdim=10, outputlevel=0);

julia> # Calculate entanglement entropy profile
       ee_profile = anyon_eelis_mps(N, ψ_gs);

julia> length(ee_profile) == N - 1  # Profile has N-1 points
true

julia> all(x -> x ≥ 0, ee_profile)  # All entropies are non-negative
true
source

Symmetry Operations

FibonacciChain.translation_matrixFunction
translation_matrix(::Type{T}) where {N, T <: BitStr{N}}

Generate translation operator matrix for Fibonacci basis states.

Arguments

  • T::Type: BitStr type specifying chain length N

Returns

  • Matrix{Float64}: Translation matrix mapping each basis state to its translated version
source
FibonacciChain.inversion_matrixFunction
inversion_matrix(::Type{T}) where {N, T <: BitStr{N}}

Generate spatial inversion operator matrix for Fibonacci basis states.

Arguments

  • T::Type: BitStr type specifying chain length N

Returns

  • Matrix{Float64}: Inversion matrix mapping each basis state to its spatially reflected version
source
FibonacciChain.braidingsqmapFunction
braidingsqmap(::Type{T}, state::Vector{ET}, idx::Int, pbc::Bool=true; anyon_type::Symbol=:Fibo) where {N, T <: BitStr{N}, ET}

Apply braiding squared operation to quantum state at specified site.

Arguments

  • T::Type: BitStr type specifying chain length N
  • state::Vector{ET}: Quantum state vector in anyon basis
  • idx::Int: Site index for braiding operation
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: Model type

Returns

  • Vector{ET}: Transformed state after braiding operation
source
FibonacciChain.topological_symmetry_basismapFunction
topological_symmetry_basismap(state::T, pbc::Bool=true) where {N, T <: BitStr{N}}

Compute topological symmetry coefficients for all basis states relative to given state.

Arguments

  • state::T: Reference state configuration
  • pbc::Bool=true: Periodic boundary conditions

Returns

  • Vector{Float64}: Coefficients for each basis state

Examples

julia> using FibonacciChain, BitBasis

julia> N = 4; T = BitStr{N, Int};

julia> state = T(0b0000);  # Vacuum state

julia> coeffs = topological_symmetry_basismap(state, true);

julia> length(coeffs) == length(anyon_basis(T, true, anyon_type=:Fibo))
true

julia> all(x -> abs(x) > 1e-10 || abs(x) < 1e-10, coeffs)  # All coeffs are well-defined
true
source
FibonacciChain.Fsymmetry_coefFunction
Fsymmetry_coef(state::T, base::T, pbc::Bool=true, anyon_type::Symbol=:Fibo) where {N, T <: BitStr{N}}

Compute topological symmetry coefficient for state in given base configurations for Fibonacci anyon chain.

Arguments

  • state::T: Target state configuration
  • base::T: Base state configuration
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: Measurement class

Returns

  • Float64: Topological symmetry coefficient based on Fibonacci fusion rules

Examples

julia> using FibonacciChain, BitBasis

julia> N = 4; T = BitStr{N, Int};

julia> state = T(0b1010); ϕ = (1 + sqrt(5)) / 2;  # Example state configuration

julia> base = T(0b0101);   # Example base configuration

julia> coef = Fsymmetry_coef(state, base, true, :Fibo); coef ≈ 0.3819660112501051
true

julia> abs(coef - (1-1/ϕ)) < 1e-10  # Should equal φ for this configuration
true
source

Ladder System Functions

FibonacciChain.ladderChoiFunction
ladderChoi(::Type{T}, p::Float64, state::Vector{ET}, pbc::Bool=true; anyon_type::Symbol=:Fibo) where {N,T <: BitStr{N}, ET}

Apply probabilistic braiding noise channel to density matrix state in vec form.

Arguments

  • T::Type: BitStr type specifying chain length N
  • p::Float64: Braiding probability (0 ≤ p ≤ 1)
  • state::Vector{ET}: Density matrix state in vectorized form
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: Model type

Returns

  • Vector{ET}: State after applying Choi map with braiding noise

Implements noise channel: ρ → (1-p)ρ + p B(ρ) where B is braiding operation.

source
FibonacciChain.ladderrdmFunction
ladderrdm(::Type{T}, subsystems::Vector{Int64}, state::Vector{ET}, pbc::Bool=true; anyon_type::Symbol=:Fibo) where {N,T <: BitStr{N}, ET}

Compute reduced density matrix for specified subsystem from vectorized density matrix.

Arguments

  • T::Type: BitStr type specifying chain length N
  • subsystems::Vector{Int64}: Indices of subsystem sites to trace out
  • state::Vector{ET}: Full density matrix state in vectorized form
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: Model type

Returns

  • Matrix{Float64}: Reduced density matrix of the subsystem

For ladder systems where both subsystems have equal dimensions.

source
FibonacciChain.ladderbraidingsqmapFunction
ladderbraidingsqmap(::Type{T}, state::Vector{ET}, idx::Int, pbc::Bool=true; anyon_type::Symbol=:Fibo) where {N, T <: BitStr{N}, ET}

Apply braiding squared operation to density matrix state in vectorized form. Effectively, it's the noise induced by inter-two layer chain braiding.

Arguments

  • T::Type: BitStr type specifying chain length N
  • state::Vector{ET}: Density matrix state in vectorized form
  • idx::Int: Site index for braiding operation
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: Model type

Returns

  • Vector{ET}: Transformed density matrix state after braiding

Operates on superposition states represented as vectorized density matrices.

Examples

julia> using FibonacciChain, LinearAlgebra, BitBasis

julia> N = 4; T = BitStr{N, Int};

julia> # Create PBC Fibonacci anyon basis 
       basis = anyon_basis(T, true, anyon_type=:Fibo);

julia> l = length(basis);

julia> ρ_vec = zeros(ComplexF64, l^2);

julia> # Initialize as identity matrix (vectorized)
       for i in 1:l
           ρ_vec[(i-1)*l + i] = 1.0/l;
       end

julia> # Apply braiding at site 2
       ρ_braided = ladderbraidingsqmap(T, ρ_vec, 2, true);

julia> norm(ρ_braided) > 0  # Should be non-zero
true
source
FibonacciChain.laddertranslationmapFunction
laddertranslationmap(::Type{T}, state::Vector{ET}) where {N, T <: BitStr{N}, ET}

Apply translation operator to vectorized density matrix state.

Arguments

  • T::Type: BitStr type specifying chain length N
  • state::Vector{ET}: Density matrix state in vectorized form

Returns

  • Vector{ET}: Translated density matrix state

Translates both bra and ket parts of the density matrix consistently.

source

Measurement Functions

FibonacciChain.measure_basismapFunction
measure_basismap(::Type{T}, τ::Float64, state::T, i::Int, sign::Int64, pbc::Bool=true; anyon_type::Symbol=:Fibo) where {N, T <: BitStr{N}}

Map single basis state under measurement operation at site i.

Arguments

  • T::Type: BitStr type specifying chain length N
  • τ::Float64: Measurement strength parameter
  • state::T: Input basis state
  • i::Int: Measurement site index (1 ≤ i ≤ N)
  • sign::Int64: Measurement outcome (0 for +, 1 for -)
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: anyon type

Returns

  • Basis-dependent output: Either (basis, coefficient) or (basis1, basis2, coeff1, coeff2)

Maps individual basis states according to measurement protocols and fusion rules. Here we choose Heisenberg-like preferring way, selecting specific fusion outcome.

Examples

julia> using FibonacciChain, BitBasis

julia> N = 4; T = BitStr{N, Int};

julia> state = T(0b0100);  # Single τ at site 2

julia> τ = 1.0;  # Measurement strength

julia> # Measure at site 2 with outcome + (sign=0)
       result = measure_basismap(T, τ, state, 2, 0, true);

julia> length(result) ∈ [2, 4]  # Returns 2 or 4 elements depending on configuration
true

julia> # The first element is always a basis state
       typeof(result[1]) == T
true
source
FibonacciChain.measurement_enumerationFunction
measurement_enumeration(::Type{T}, τ::Float64, initial_state::Vector{ET}, measurement_sites::Vector{Int}, pbc::Bool=true; anyon_type::Symbol=:Fibo) where {N, T <: BitStr{N}, ET}

Enumerating all trajectories of measurements on a given initial state.

Args:T, τ, initialstate, measurementsites, pbc

Returns: final_states, trajectories, probabilities

source
FibonacciChain.Boundary_measureFunction
Boundary_measure(::Type{T}, τ::Float64, state::Vector{ET}, measurement_sites::Vector{Int}, num_samples::Int=1000, rng::MersenneTwister=MersenneTwister(), pbc::Bool=true; anyon_type::Symbol=:Fibo) where {N, T <: BitStr{N}, ET}

Generate measurement samples at boundary sites with probabilistic outcomes, i.e., without time axis evolution.

Arguments

  • T::Type: BitStr type specifying chain length N
  • τ::Float64: Measurement strength parameter
  • state::Vector{ET}: Initial quantum state vector
  • measurement_sites::Vector{Int}: Sites to perform measurements
  • num_samples::Int=1000: Number of measurement samples to generate
  • rng::MersenneTwister: Random number generator
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: anyon type

Returns

  • Tuple{Vector{Vector{Float64}}, Vector{Vector{Int64}}, Vector{Float64}}: (post-measurement states, measurement sequences, free energies)

Samples measurement outcomes probabilistically based on Born rule.

source
FibonacciChain.Boundarypost_selectionFunction
Boundarypost_selection(N::Int64, τ::Float64, state::Vector{ET}, measurement_sites::Vector{Int}, sign::Int64, pbc::Bool=true; anyon_type::Symbol=:Fibo)

Generate measurement samples at boundary sites with post_selection outcomes, i.e., given spatial evolution without time axis evolution.

Arguments

  • N::Int: Chain length N
  • τ::Float64: Measurement strength parameter
  • state::Vector{ET}: Initial quantum state vector
  • measurement_sites::Vector{Int}: Sites to perform measurements
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: anyon type

Returns

  • Tuple{Vector{Vector{Float64}}, Vector{Vector{Int64}}, Vector{Float64}}: (post-measurement states, measurement sequences, free energies)

Samples measurement outcomes with given measurement outcomes.

source
FibonacciChain.BulkmeasureFunction
Bulkmeasure(N::Int64, τ::Float64, state::Vector{ET}, D::Int64, rng::MersenneTwister=MersenneTwister(), pbc::Bool=true; anyon_type::Symbol=:Fibo)

Generate measurement samples at bulk sites with probabilistic outcomes, i.e., with time axis evolution, together with spatial evolution axis as bulk.

Arguments

  • N::Int: Chain length N
  • τ::Float64: Measurement strength parameter
  • state::Vector{ET}: Initial quantum state vector
  • D::Int64: Number of measurement layers (depth), or time step (over 2)
  • rng::MersenneTwister: Random number generator
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: anyon type

Returns

  • Tuple{Vector{Vector{Float64}}, Vector{Vector{Int64}}, Vector{Float64}}: (post-measurement states, measurement sequences, free energies)

Samples measurement outcomes probabilistically based on Born rule.

source
FibonacciChain.Bulkpost_selectionFunction
Bulkpost_selection(N::Int64, τ::Float64, state::Vector{ET}, D::Int64, sign::Int64, pbc::Bool=true; anyon_type::Symbol=:Fibo)

Generate measurement samples at bulk sites with post_selection outcomes, i.e., with time axis evolution, together with spatial evolution axis as bulk.

Arguments

  • N::Int: Chain length N
  • τ::Float64: Measurement strength parameter
  • state::Vector{ET}: Initial quantum state vector
  • D::Int64: Number of measurement layers (depth), or time step (over 2)
  • sign::Int64: Measurement sign, 0 for positive, 1 for negative
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: anyon type

Returns

  • Tuple{Vector{Vector{Float64}}, Vector{Vector{Int64}}, Vector{Float64}}: (post-measurement states, measurement sequences, free energies)

Samples measurement outcomes with given measurement outcomes.

source

MPS Functions

FibonacciChain.fibonacci_hamiltonian_mpsFunction
fibonacci_hamiltonian_mps(sites; pbc::Bool=true)

Construct Fibonacci chain Hamiltonian as Matrix Product Operator (MPO).

Arguments

  • sites: ITensor site indices
  • pbc::Bool=true: Periodic boundary conditions

Returns

  • MPO: Hamiltonian with three-body interactions based on Fibonacci fusion rules
source
FibonacciChain.measurement_operator_mpsFunction
measurement_operator_mps(sites, i::Int, τ::Float64, sign::Int64; pbc::Bool=true, anyon_type::Symbol=:Fibo)

Create local measurement operator at site i as Matrix Product Operator.

Arguments

  • sites: ITensor site indices
  • i::Int: Measurement site
  • τ::Float64: Evolution time parameter
  • sign::Int64: Measurement outcome (0 or 1)
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: Model type

Returns

  • ITensor: Local measurement operator incorporating neighboring site correlations
source
FibonacciChain.apply_measurement_mpsFunction
apply_measurement_mps(ψ::MPS, sites, i::Int, τ::Float64, sign::Int64; pbc::Bool=true, cutoff::Float64=1e-10, maxdim::Int=100, anyon_type::Symbol=:Fibo)

Apply measurement operator to MPS state and return post-measurement state.

Arguments

  • ψ::MPS: Input quantum state
  • sites: ITensor site indices
  • i::Int: Measurement site
  • τ::Float64: Evolution time parameter
  • sign::Int64: Measurement outcome
  • pbc::Bool=true: Periodic boundary conditions
  • cutoff::Float64=1e-10: MPS truncation cutoff
  • maxdim::Int=100: Maximum bond dimension
  • anyon_type::Symbol=:Fibo: Model type

Returns

  • MPS: Post-measurement quantum state
  • Float64: Measurement probability
source
FibonacciChain.initial_mpsFunction
fibonacci_mps_ground_state(N::Int; pbc::Bool=true, sweep_times=20, maxdim=50, cutoff=1e-10)

Find ground state of Fibonacci chain Hamiltonian using DMRG.

Arguments

  • N::Int: System size
  • pbc::Bool=true: Periodic boundary conditions
  • sweep_times=20: Number of DMRG sweeps
  • maxdim=50: Maximum bond dimension
  • cutoff=1e-10: Truncation cutoff

Returns

  • MPS: Ground state as Matrix Product State
  • Float64: Ground state energy

Examples

julia> using FibonacciChain, ITensorMPS, ITensors

julia> N = 8;

julia> ψ_gs, E0 = fibonacci_mps_ground_state(N, pbc=true, maxdim=10, outputlevel=0);

julia> ψ_gs isa MPS
true

julia> E0 < 0 && imag(E0) ≈ 0
true
source
FibonacciChain.mps_measurement_enumerationFunction
mps_measurement_enumeration(ψ::MPS, sites, measurement_sites::Vector{Int}, τ::Float64; 
                           pbc::Bool=true) -> Vector{MPS}, Vector{Vector{Int64}}, Vector{Float64}

Enumerate all possible measurement trajectories on MPS state.

source
FibonacciChain.mps_boundary_measureFunction
mps_boundary_measure(ψ::MPS, sites, measurement_sites::Vector{Int}, τ::Float64; 
            num_samples::Int=1000, pbc::Bool=true) -> Vector{Vector{Int64}}, Vector{Float64}

Perform boundary measurements on MPS state.

source

Reference Qubit Functions

FibonacciChain.spatial_correlationFunction
spatial_correlation(N::Int64, state::Union{Vector{ET}, Matrix{ET}}, site1::Int64, site2::Int64; pbc::Bool=true, anyon_type::Symbol=:Fibo) where {ET}

Calculate mutual information between two sites as spatial correlation measure.

Arguments

  • N::Int64: System size
  • state::Union{Vector{ET}, Matrix{ET}}: Quantum state vector or density matrix
  • site1::Int64: First site index (1 ≤ site1 ≤ N)
  • site2::Int64: Second site index (1 ≤ site2 ≤ N, site2 ≠ site1)
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: Model type

Returns

  • Float64: Mutual information I(1:2) = S(1) + S(2) - S(1,2)

Computes quantum mutual information as measure of spatial correlations.

source
FibonacciChain.temporal_correlationFunction
temporal_correlation(N::Int64, state_addref2::Vector{ET}; pbc::Bool=true, anyon_type::Symbol=:Fibo) where {ET}

Calculate temporal correlation using state with two reference qubits.

Arguments

  • N::Int64: System size
  • state_addref2::Vector{ET}: Quantum state with two reference qubits added
  • pbc::Bool=true: Periodic boundary conditions
  • anyon_type::Symbol=:Fibo: Model type

Returns

  • Float64: Temporal correlation measure between time slices

Uses reference qubit protocol to measure temporal correlations at single site.

source