[ANN] TensorMixedStates.jl 2.0: closed and open quantum systems with matrix product states

I am happy to announce version 2.0 of TensorMixedStates.jl (TMS), a Julia library to simulate closed and open quantum systems, pure and mixed states, using matrix product states.

TMS can represent the density matrix itself as a matrix product state, so dissipation is written directly into a Lindblad equation instead of being sampled with quantum trajectories. It is built on ITensor, which makes it fast and parallel.

Here six qubits evolve under a transverse field Ising Hamiltonian while each of them decays from up to down:

using TensorMixedStates, .Qubits

runTMS(SimData(
    name = "dissipative_ising",
    phases = [
        CreateState{Mixed}(6, Qubit(), "Up"),
        Evolve(
            duration = 2.0,
            time_step = 0.1,
            algo = Tdvp(),
            limits = Limits(maxdim = 64),
            evolver = -im * (-sum(Z(i)Z(i + 1) for i in 1:5) - sum(X(i) for i in 1:6))
                      + sum(Dissipator(sqrt(0.2) * Sm)(i) for i in 1:6),
            measurements = "data" => [Z, Purity],
        ),
    ],
))

Mixed makes the state a density matrix, and the Dissipator terms turn the evolution into a Lindblad equation. The run writes the magnetizations and the purity at each time step to a table, along with a log and a copy of the script.

Features

  • Sites: qubits, qudits, spins, bosons, fermions, electrons, t-J sites, and sites of one’s own.
  • Symmetries: conserved quantities, such as Fermion(conserve = N), weak or strong for open systems.
  • Operators: written as Julia expressions, such as -sum(Z(i)Z(i + 1) for i in 1:n-1), Dissipator(Sm)(i) or exp(-im * t * X ⊗ X), and compressed into the smallest triangular MPO: bond dimension 3 for the all-to-all Ising coupling on 40 sites.
  • Algorithms: ground and excited states by DMRG; time evolution by TDVP or the WI and WII approximations, under Hamiltonians and Lindbladians that may depend on time; steady states; thermal states by imaginary time evolution; circuits of gates and quantum channels, noisy gates included.
  • Prepared states: GHZ, W and Dicke states, graph states, the AKLT state, Slater determinants, Fermi seas, and the fully mixed state of a sector.
  • Measurements: expectation values and correlations, variances, entanglement entropies and spectra, purities, fidelities, reduced density matrices, logarithmic negativity, and projective measurements with their probabilities, samples and collapse.
  • Simulations: a run is written in a few lines as a list of phases, which writes its measurements to text or JSON files or keeps them as Tables.jl tables, with a log and checkpoints from which a stopped run resumes. Plain functions do the same in one’s own code: build a State, call ground_state or evolve on it, and measure it.
  • Tests: comparisons with exact diagonalization and exact solutions, run on Linux for several Julia versions, and on Windows and Apple Silicon.

Users of 1.x: version 2.0 is a rewrite with a smaller and uniform interface. Programs need edits, mostly mechanical, listed on the upgrading page; states saved by 1.x can still be read.

Links

Questions, feedback and feature requests are very welcome, here or in the GitHub issues.

1 Like