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

**URL:** <https://discourse.julialang.org/t/ann-tensormixedstates-jl-2-0-closed-and-open-quantum-systems-with-matrix-product-states/140266>\
**Category:** Package Announcements\
**Created:** [October 26, 2026, 2:49pm UTC](https://discourse.julialang.org/t/ann-tensormixedstates-jl-2-0-closed-and-open-quantum-systems-with-matrix-product-states/140266 "2026-10-26T14:49:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerhoud](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jerhoud/32/224833_2.png) [@jerhoud](https://discourse.julialang.org/u/jerhoud)\
**Post date:** [October 26, 2026, 2:49pm UTC](https://discourse.julialang.org/t/ann-tensormixedstates-jl-2-0-closed-and-open-quantum-systems-with-matrix-product-states/140266/1 "2026-10-26T14:49:47Z")

</div>

I am happy to announce version 2.0 of [TensorMixedStates.jl](https://github.com/jerhoud/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:

```julia
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](https://jerhoud.github.io/TensorMixedStates.jl/stable/upgrading/); states saved by 1.x can still be read.

**Links**

- Documentation, with a quick reference, pages for users of QuTiP or ITensors, and an `llms.txt` and a skill for AI assistants: [Home · TensorMixedStates](https://jerhoud.github.io/TensorMixedStates.jl/stable/)
- Article: _TensorMixedStates: A Julia library for simulating pure and mixed quantum states using matrix product states_, [SciPost Phys. Codebases 72 (2026)](https://doi.org/10.21468/SciPostPhysCodeb.72)
- Code and 24 example scripts: [GitHub - jerhoud/TensorMixedStates.jl: A Julia library to simulate closed and open quantum systems, pure and mixed states, using matrix product states · GitHub](https://github.com/jerhoud/TensorMixedStates.jl)

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