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

sites = pauli_siteinds(3)
rho = pauli_basis_state(sites, [:I, :Z, :I])
source
MPSToolkit.pauli_total_sz_stateFunction
pauli_total_sz_state(sites; coefficient=0.5)

Build the Pauli-basis MPS representing coefficient * sum_j σ_j^z. With the default coefficient=0.5, this is the total spin operator ∑_j S_j^z.

Arguments

  • sites: Pauli-space site indices.

Keyword Arguments

  • coefficient: Scalar multiplying each local σ^z contribution.

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> pauli_matrices().Z
2x2 Matrix{ComplexF64}:
 1+0im   0+0im
 0+0im  -1+0im
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)).
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

  • Internally the map is built as kron(conj(unitary), unitary) and then rotated into the normalized Pauli basis.
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

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.