ITensor Reference

These APIs connect EDKit models and states with ITensor and Pauli-space workflows.

EDKit.vec2mpsFunction
vec2mps(v::AbstractVector, s)

Convert a state vector v into an MPS on the ITensor site indices s.

The vector is interpreted in EDKit's row-major site ordering convention, then reshaped into a tensor and wrapped as an MPS.

source
EDKit.mps2vecFunction
mps2vec(psi::MPS)

Convert an MPS to a dense state vector.

Returns:

  • A vector in EDKit's row-major site-order convention.
source
mps2vec(psi::MPS, B)

Convert an MPS to coordinates in the symmetry-reduced basis B.

This routine is exact when psi already lies in the symmetry sector described by B. In that case it reconstructs the sector amplitudes from the amplitude on each representative product state together with the normalization/orbit data of B.

It is not a generic orthogonal projector for arbitrary MPS outside the sector: for a general state, use an explicit projection constructed from the basis if you need the true projected coefficients.

source
EDKit.mat2opFunction

Convert a matrix to an ITensor operator

Arguments:

  • mat: dense local operator matrix.
  • s...: ITensor site indices describing the target Hilbert spaces.

Returns:

  • An ITensor operator with bra/ket site structure compatible with op.
source
EDKit.op2matFunction

Convert a ITensor operator to a matrix

Returns:

  • The dense matrix representation of o in the site ordering supplied by s....
source
EDKit.pbcmpsFunction
pbcmps(sites, tensors)

Construct an MPS from a list of tensor.

Arguments:

  • sites: physical site indices.
  • tensors: local array data for a periodic-boundary-style construction.

Returns:

  • An MPS normalized after summing over the boundary-sector contributions.
source
EDKit.productstateFunction
productstate(v::AbstractVector{<:Integer}, B::AbstractBasis)

Construct the basis vector corresponding to the product configuration v.

v is a digit representation of local states in base B.B, for example [0, 1, 0, 1] for a spin-1/2 chain. The returned vector lives in the Hilbert space defined by B, so this works for tensor-product, projected, and symmetry-reduced bases alike.

source

productstate(s, states)

Return a product MPS

Arguments:

  • s : Vector of indices
  • states: Vector of vector representing local states

Returns:

  • A product-state MPS with bond dimension 1.
source
EDKit.pauliFunction
pauli(i, L=1)

Return ith (size-L) Pauli matrices.

Arguments:

  • i: 1-based Pauli-string index in base-4 ordering.
  • L: number of physical qubits/sites.

Returns:

  • The dense matrix for the corresponding Pauli string.
source

pauli(Is::AbstractVector{<:Real})

Return a matrix from Pauli coefficients

Arguments:

  • Is: coefficient vector in the Pauli-product basis.

Returns:

  • The dense operator reconstructed from those coefficients.
source
EDKit.pauli_listFunction
pauli_list(A)

Return pauli components of a 2×2 matrix A.

More generally, A may act on n qubits as long as its dimension is 2^n.

Returns:

  • The coefficient vector of A in the normalized Pauli-product basis.
source
EDKit.commutation_matFunction
commutation_mat(L)

Matrix representation for -i[H,⋅].

Returns:

  • The Pauli-basis matrix of the commutator superoperator generated by H.
source
EDKit.dissipation_matFunction
dissipation_mat(L)

Matrix representation for D[L].

Returns:

  • The Pauli-basis matrix of the dissipator generated by jump operator L.
source
EDKit.mps2pmpsFunction

Convert a pure-state MPS to a Pauli-basis MPS representation of the corresponding operator-space object.

Arguments:

  • ψ: input MPS.
  • S: Pauli site indices.

Returns:

  • A Pauli-space MPS.
source
EDKit.mpo2pmpoFunction

Convert MPO to Pauli MPO

Returns:

  • The Pauli-basis MPO corresponding to the ordinary MPO H.
source
EDKit.tebd_n!Function
tebd_n!(ψ, G1, G2; cutoff=1e-14, maxdim=30)

Apply one n-site TEBD sweep to ψ.

Arguments:

  • ψ: MPS to update in place.
  • G1, G2: forward and backward gate layers.
  • cutoff, maxdim: truncation controls passed to svd.

Returns:

  • The mutated and normalized ψ.

This is a low-level routine intended for already-constructed gate sequences.

source
EDKit.tebd4Function
tebd4(h, s, τ)

Construct a fourth-order Trotter gate sequence for local Hamiltonian terms h acting on the ITensor site indices s.

The output is a vector of ITensor gates that can be applied in order to perform one fourth-order TEBD time step of size τ.

Arguments:

  • h: local Hamiltonian matrices placed along the chain.
  • s: ITensor site indices.
  • τ: physical time step.

Returns:

  • A vector of gate ITensors ordered according to the fourth-order decomposition.
source