Operator Space

MPSToolkit.jl includes a Pauli-basis operator-space layer for dynamics and open-system workflows.

Basis Helpers

The core basis and state helpers are:

  • pauli_siteinds
  • pauli_basis_state
  • pauli_total_sz_state
  • pauli_matrices
  • pauli_basis
  • pauli_components

The Pauli basis is the shared foundation for operator-space TEBD, DMT, Lindblad evolution, and DAOE-style projectors. In practice, a typical workflow is:

  1. build Pauli-basis site indices with pauli_siteinds
  2. prepare an operator-state MPS
  3. map local Hamiltonians or Lindbladians into Pauli-space gates
  4. run scheduled evolution or projection

Minimal Example

using MPSToolkit
using ITensors
using ITensorMPS

nsites = 6
sites = pauli_siteinds(nsites)
state = pauli_basis_state(sites, ["Z", "I", "I", "I", "I", "I"])

evolution = tebd_strang_evolution(
  nsites,
  0.05;
  local_hamiltonian=(bond, weight) -> weight * spinhalf_tfim_bond_hamiltonian(nsites, bond; J=1.0, g=0.8),
  map_hamiltonian=pauli_gate_from_hamiltonian,
  maxdim=64,
  cutoff=1e-12,
)

evolve!(state, evolution)

The helper notebooks operatortebdhelper_apis.ipynb and dmt_scheduler.ipynb show the fuller scheduler-driven workflow.

Basis And Mapping API

MPSToolkit.pauli_siteindsFunction
pauli_siteinds(nsites; tagprefix="PauliSpace")

Construct a vector of dimension-4 site indices suitable for vectorized local Pauli bases. The basis ordering is (I, X, Y, Z).

Arguments

  • nsites: Number of operator-space sites.

Keyword Arguments

  • tagprefix: Prefix used when naming the generated Index tags.

Returns

  • A vector of length nsites containing dimension-4 Index objects.
source
MPSToolkit.pauli_basis_stateFunction
pauli_basis_state(sites, labels; coefficient=1.0)

Build a Pauli-basis product MPS in the default local ordering (I, X, Y, Z). Each entry of labels may be an integer basis index or one of "I", "X", "Y", "Z" (or the corresponding symbols).

Arguments

  • sites: Pauli-space site indices, typically created by pauli_siteinds.
  • labels: One local basis label per site.

Keyword Arguments

  • coefficient: Overall scalar prefactor stored on the first tensor.

Returns

  • A product-state MPS in operator space.

Examples

julia> sites = pauli_siteinds(3);

julia> rho = pauli_basis_state(sites, [:I, :Z, :I]);

julia> length(rho)
3
source
MPSToolkit.pauli_total_sz_stateFunction
pauli_total_sz_state(sites; coefficient=nothing)

Build the Pauli-basis MPS representing the total spin operator ∑_j S_j^z. The local Pauli basis is normalized as σ / sqrt(2), so the default coefficient inserted for each single-Z string is 2^(N / 2 - 1) for N sites.

Arguments

  • sites: Pauli-space site indices.

Keyword Arguments

  • coefficient: Optional scalar coefficient inserted directly for each single-Z string in the normalized Pauli-basis MPS.

Returns

  • An MPS representation of the summed operator in Pauli space.

Notes

  • The returned state is not a simple product state; it uses bond dimension 2 to encode the operator sum compactly.
source
MPSToolkit.pauli_matricesFunction
pauli_matrices(; include_identity=true)

Return the dense spin-1/2 Pauli matrices.

Keyword Arguments

  • include_identity: If true, include the identity matrix as field I.

Returns

  • A named tuple whose fields follow the ordering (I, X, Y, Z) when the identity is included, and (X, Y, Z) otherwise.

Examples

julia> Z = pauli_matrices().Z;

julia> Z == [1 0; 0 -1]
true

julia> keys(pauli_matrices(; include_identity=false))
(:X, :Y, :Z)
source
MPSToolkit.pauli_basisFunction
pauli_basis(; include_identity=true)

Return the spin-1/2 Pauli basis as labeled dense matrices.

Keyword Arguments

Returns

  • A vector of Pair{Symbol, Matrix} entries in the same local ordering used throughout the operator-space code.
source
MPSToolkit.pauli_componentsFunction
pauli_components(operator; include_identity=true)

Decompose a 2 x 2 operator into Pauli-basis coefficients.

Arguments

  • operator: Dense single-site operator matrix.

Keyword Arguments

  • include_identity: If true, return the coefficient of the identity alongside the Pauli components.

Returns

  • A named tuple of Hilbert-Schmidt coefficients, normalized so that operator == sum(coeffs[name] * pauli_matrices()[name] for name in keys(coeffs)).

Notes

  • These coefficients are taken against the unnormalized basis {I, X, Y, Z}. They are not the operator-space state amplitudes produced by pauli_basis_state and the other operator-space helpers, which use the normalized basis σ / √2. The two conventions differ by a factor of (√2)^L over L sites, so do not feed pauli_components output directly into the operator-space state constructors.
source
MPSToolkit.pauli_gateFunction
pauli_gate(unitary)

Convert a dense physical unitary acting on spin-1/2 sites into the corresponding dense superoperator in the default local Pauli ordering (I, X, Y, Z).

Arguments

  • unitary: Dense physical-space unitary acting on one or more spin-1/2 sites.

Returns

  • A dense matrix representing the induced operator-space map in the Pauli basis.

Notes

  • The returned matrix entry G[α_out, α_in] is tr(P_{α_out}' * U * P_{α_in} * U'), where P_α are the normalized n-site Pauli basis operators produced by _pauli_basis_operators. This convention matches pauli_basis_state, pauli_siteinds, and pauli_lindblad_generator, so the resulting super-operator can be applied to a Pauli-basis MPS via tebd_evolve! consistently.
source
MPSToolkit.pauli_gate_from_hamiltonianFunction
pauli_gate_from_hamiltonian(h, dt)

Build the Pauli-basis superoperator induced by a dense Hamiltonian over one time step.

Arguments

  • h: Dense physical-space Hamiltonian.
  • dt: Real-time step.

Returns

  • The operator-space gate corresponding to exp(-im * dt * h).
source
MPSToolkit.pauli_lindblad_generatorFunction
pauli_lindblad_generator(h, jumps)

Build the dense Pauli-basis Lindbladian generator induced by the local Hamiltonian h and the local jump operators jumps. The local operator basis is assumed to be ordered as (I, X, Y, Z) on each spin-1/2 site.

Arguments

  • h: Dense Hamiltonian acting on one or more spin-1/2 sites.
  • jumps: One jump operator or a collection of jump operators with the same dimension as h.

Returns

  • A dense generator matrix in the normalized Pauli basis.

Notes

  • The generator implements the standard Lindblad action -im[H, ρ] + Σ_j (L_j ρ L_j† - 1/2 {L_j†L_j, ρ}).
source
MPSToolkit.pauli_gate_from_lindbladianFunction
pauli_gate_from_lindbladian(h, jumps, dt)

Build the dense Pauli-basis TEBD gate generated by the local Lindbladian defined by h and jumps over one time step dt.

Arguments

  • h: Dense local Hamiltonian.
  • jumps: Jump operator or collection of jump operators.
  • dt: Time increment.

Returns

  • exp(dt * pauli_lindblad_generator(h, jumps)).
source

Local Operator And Lindblad Maps

The package exposes helpers for converting local Hamiltonians and Lindbladians into operator-space gates:

  • pauli_gate
  • pauli_gate_from_hamiltonian
  • pauli_lindblad_generator
  • pauli_gate_from_lindbladian

DMT And Projectors

Operator-space specific algorithms include:

  • dmt_step!
  • dmt_evolve!
  • DMTGateEvolution
  • pauli_daoe_projector
  • fdaoe_projector
DMT is transport-specific

The DMT functions (dmt_step!, dmt_evolve!, DMTGateEvolution) implement a truncation scheme designed specifically for transport (e.g. spin or energy diffusion). Their truncation rule preserves the identity component at every bond — an assumption that holds for transport but not for arbitrary operator-space tasks. For general operator-space TEBD evolution, use LocalGateEvolution with the Pauli-basis helpers above.

These tools are intended for explicit operator-space workflows rather than as hidden internals.

Examples

For runnable examples, see Examples, especially the operator-space and open-system notebooks.