Quantum States and Liouville Space
This page introduces the quantum-mechanical objects that appear throughout ProcessTensors.jl: state vectors, observables, density matrices, reduced states, Liouville-space vectorisation, and open-system dynamics.
The goal is not to replace a textbook on quantum mechanics or open quantum systems. Instead, this page gives the minimum theory needed to understand why the package moves between Hilbert-space and Liouville-space tensor-network representations.
For tensor-network vocabulary such as MPS, MPO, contraction, and bond dimension, see Tensor Networks in Physics.
Hilbert space and density matrices
Before going to the Liouville space, we shall have a quick revision of quantum mechanics in the Hilbert space. In ordinary closed-system quantum mechanics, the state of a pure quantum system is represented by a vector $|\psi\rangle$ in a Hilbert space. For a lattice of $N$ sites with local dimension $d$, a general state can be written as
\[|\psi\rangle = \sum_{s_1,\ldots,s_N} c_{s_1\cdots s_N} |s_1,\ldots,s_N\rangle.\]
The time evolution of a closed system is generated by a Hamiltonian $H$. In units where $\hbar=1$, the Schrödinger equation is
\[\frac{d}{dt}|\psi(t)\rangle = -iH|\psi(t)\rangle.\]
For a time-independent Hamiltonian,
\[|\psi(t)\rangle = U(t)|\psi(0)\rangle, \qquad U(t)=e^{-iHt}.\]
In tensor-network simulations, $|\psi\rangle$ is often represented as a matrix product state (MPS), while $H$ and other many-body operators are represented as matrix product operators (MPOs).
sites = siteinds("S=1/2", N)
ψ = MPS(sites, fill("Up", N))
H_mpo = MPO(H, sites)See MPS and MPO Basics for siteinds, OpSum, and Hamiltonian assembly.
Observables and expectation values
A physical observable is represented by an operator $O$. For a pure state, its expectation value is
\[\langle O\rangle = \langle\psi|O|\psi\rangle.\]
The variance of $O$ is
\[\operatorname{Var}(O) = \langle O^2\rangle - \langle O\rangle^2.\]
Two-point correlation functions compare observables at different sites. For example,
\[C_{AB}(i,j) = \langle A_iB_j\rangle - \langle A_i\rangle\langle B_j\rangle.\]
These are ordinary Hilbert-space quantities. They are the baseline against which density-matrix and Liouville-space formulas should be compared.
mz = expect(ψ, "Sz") # local expectations
expect_O = real(inner(ψ', O_mpo, ψ)) # operator expectationSee MPS and MPO Basics for expect, MPO insertion, and energy calculations.
In ProcessTensors.jl, Hilbert-space MPS and MPO objects provide the familiar starting point. Density-matrix and Liouville-space tools extend this language to mixed states, dissipative dynamics, and process tensors.
ρ = to_dm(ψ) # pure state → density MPO
ρ_mix = to_dm([ψ1, ψ2]; coeffs=[p, 1-p]) # statistical mixtureSee MPS and MPO Basics for pure states, density-matrix MPOs, and expectations.
Pure state vectors are not enough for open quantum systems. A subsystem interacting with an environment is generally not described by a single state vector, even if the combined system-environment state is pure.
The density matrix formalism gives a more general description of quantum states that contains these classical probabilities associated with each pure wavefunction.
For a pure state,
\[\rho = |\psi\rangle\langle\psi|.\]
For a statistical mixture of pure states,
\[\rho = \sum_i p_i |\psi_i\rangle\langle\psi_i|,\]
where
\[p_i \ge 0, \qquad \sum_i p_i = 1.\]
A valid density matrix satisfies three important properties:
\[\operatorname{Tr}(\rho)=1, \qquad \rho^\dagger=\rho, \qquad \rho \ge 0.\]
These mean that the state is normalised, Hermitian, and positive semidefinite.
Expectation values are computed as
\[\langle O\rangle = \operatorname{Tr}(O\rho).\]
For a pure state $\rho=|\psi\rangle\langle\psi|$, this reduces to the familiar expression $\langle\psi|O|\psi\rangle$.
In ProcessTensors.jl, a pure MPS can be converted into a density-matrix MPO using to_dm(ψ). Mixtures of MPS states are also supported, provided the probabilities are non-negative and sum to one.
ρ = to_dm(ψ)
ρ_mix = to_dm([ψ_a, ψ_b]; coeffs=[0.7, 0.3])See MPS and MPO Basics for pure and mixed density-matrix construction and normalization checks.
Reduced density matrices and partial traces
Open-system physics usually begins with a larger closed system made of a system $S$ and a bath or environment $B$. The joint density matrix lives on the composite Hilbert space
\[\mathcal{H}_{SB} = \mathcal{H}_S \otimes \mathcal{H}_B.\]
If the full state is $\rho_{SB}$, the reduced state of the system is obtained by tracing out the bath:
\[\rho_S = \operatorname{Tr}_B(\rho_{SB}).\]
Similarly, the reduced bath state is
\[\rho_B = \operatorname{Tr}_S(\rho_{SB}).\]
The partial trace is the mathematical operation behind the phrase “ignore the bath degrees of freedom.” It keeps all system observables correct:
\[\langle O_S\rangle = \operatorname{Tr}_{SB} \left[ (O_S\otimes I_B)\rho_{SB} \right] = \operatorname{Tr}_S \left[ O_S\rho_S \right].\]
A useful quantity derived from a reduced state is the von Neumann entropy,
\[S(\rho_S) = -\operatorname{Tr} \left( \rho_S\log\rho_S \right).\]
For a bipartite pure state, this entropy measures entanglement between $S$ and $B$. For a genuinely mixed state, it also contains classical and environmental uncertainty.
Full state:
system S bath B
┌──────────┐ ┌──────────┐
│ │ │ │
│ ρ_SB │ ---> │ trace B │
│ │ │ │
└──────────┘ └──────────┘
Reduced state:
ρ_S = Tr_B(ρ_SB)Process tensors describe reduced system dynamics while keeping track of how the bath remembers past interactions. Reduced density matrices are the first step toward that language.
ρ = to_dm(ψ) # full-chain density MPO
# trace out other sites via delta contractions on bra/ket legs (tutorial)
ρ1 = one_site_reduced_density_matrix(ρ, sites, 1)See MPS and MPO Basics for one-site reduced density matrices and entanglement diagnostics.
Liouville space and vectorisation
A density matrix is an operator on Hilbert space,
\[\rho \in \mathcal{B}(\mathcal{H}),\]
where $\mathcal{B}(\mathcal{H})$ denotes the space of linear operators on $\mathcal{H}$.
The key observation is that $\mathcal{B}(\mathcal{H})$ is itself a Hilbert space when equipped with the Hilbert–Schmidt inner product,
\[\langle\langle A | B \rangle\rangle = \operatorname{Tr}(A^\dagger B).\]
This operator Hilbert space is called Liouville space.
If $\dim(\mathcal{H})=d$, then
\[\dim\mathcal{B}(\mathcal{H}) = d^2.\]
This is why Liouville-space simulations are more expensive than pure-state Hilbert-space simulations, but also why density matrices can be treated with state-vector tensor-network tools.
In ProcessTensors.jl, a Hilbert-space density matrix is represented as an MPO{Hilbert}. After vectorisation, it becomes an MPS{Liouville}.
sites_L = liouv_sites(sites) # create once, reuse everywhere
ρL = to_liouville(ρ; sites=sites_L)
ρ_back = to_hilbert(ρL; sites=sites) # round-trip checkSee Liouville-Space Basics for vectorisation, column-major ordering, and shared sites_L.
First-level vectorisation
Choose an orthonormal basis $\{|j\rangle\}$ of $\mathcal{H}$. The basic vectorisation rule is
\[|j\rangle\langle k| \longmapsto |j\rangle\otimes|k\rangle.\]
Equivalently, for an operator
\[A = \sum_{j,k} A_{jk} |j\rangle\langle k|,\]
we define
\[|A\rangle\rangle = \sum_{j,k} A_{jk} |j\rangle\otimes|k\rangle.\]
This is the simple linear-algebra move behind Liouville space: an operator becomes a vector in a larger space.
A more invariant way to say this is
\[\mathcal{B}(\mathcal{H}) \simeq \mathcal{H}\otimes\mathcal{H}^*.\]
The second factor is the dual space. After a basis is chosen, it is often identified computationally with another copy of $\mathcal{H}$.
The bare map $|j\rangle\langle k|\mapsto |j\rangle\otimes|k\rangle$ depends on the chosen basis. This is harmless for numerical work if the convention is fixed, but it should not be mistaken for a basis-independent physical statement.
In Hilbert-space notation, a channel looks like a function acting on a matrix:
\[\rho \mapsto \Phi(\rho).\]
In Liouville space, the same channel is represented as an operator acting on a vector:
\[|\rho\rangle\rangle \mapsto \Phi |\rho\rangle\rangle.\]
Column-major vectorisation convention
Different communities use different vectorisation conventions. The convention matters because it determines the Kronecker-product formulas for left and right multiplication.
ProcessTensors.jl uses column-major vectorisation, matching Julia's native array ordering.
For a one-site density matrix
\[\rho = \begin{pmatrix} \rho_{11} & \rho_{12} \\ \rho_{21} & \rho_{22} \end{pmatrix},\]
the vectorised state is
\[|\rho\rangle\rangle = \operatorname{vec}(\rho) = \begin{pmatrix} \rho_{11} \\ \rho_{21} \\ \rho_{12} \\ \rho_{22} \end{pmatrix}.\]
Equivalently, the first matrix index changes fastest.
Matrix:
column 1 column 2
ρ₁₁ ρ₁₂
ρ₂₁ ρ₂₂
Column-major vector:
[ρ₁₁, ρ₂₁, ρ₁₂, ρ₂₂]ᵀRow-major and column-major vectorisation lead to different formulas. All left/right action rules in this documentation assume the column-major convention above.
Operators as superoperators
A superoperator is a linear map acting on operators. After vectorisation, it becomes an ordinary operator acting on Liouville-space vectors.
The central identity is
\[\operatorname{vec}(A\rho B) = (B^{\mathsf{T}}\otimes A) \operatorname{vec}(\rho).\]
Two special cases are especially important:
\[\operatorname{vec}(A\rho) = (I\otimes A) |\rho\rangle\rangle,\]
and
\[\operatorname{vec}(\rho B) = (B^{\mathsf{T}}\otimes I) |\rho\rangle\rangle.\]
So left multiplication and right multiplication are represented by different Liouville-space operators.
In package notation:
| Hilbert-space action | Liouville-space action | Package suffix |
|---|---|---|
| $A\rho$ | $(I \otimes A)\vert\rho\rangle\rangle$ | A_L |
| $\rho A$ | $(A^{\mathsf{T}} \otimes I)\vert\rho\rangle\rangle$ | A_R |
| $A\rho A^\dagger$ | $(A^* \otimes A)\vert\rho\rangle\rangle$ | A_Jump |
| $A^\dagger A\rho$ | $(I \otimes A^\dagger A)\vert\rho\rangle\rangle$ | A_LdagL_L |
| $\rho A^\dagger A$ | $((A^\dagger A)^{\mathsf{T}} \otimes I)\vert\rho\rangle\rangle$ | A_LdagL_R |
The suffixes _L and _R do not mean “left tensor leg” and “right tensor leg”. They mean multiplication of the density matrix from the left or from the right before vectorisation.
# OpSum terms use _L / _R suffixes before vectorisation
os = OpSum()
os += 1.0im, "Sx_L", 1 # Sx ρ
os += -1.0im, "Sx_R", 1 # ρ SxSee Liouville superoperators and OpSums in Liouville-Space Basics.
Channels as Liouville-space operators
A deterministic physical evolution of density matrices is described by a completely positive trace-preserving map,
\[\Phi: \mathcal{B}(\mathcal{H}_{\mathrm{in}}) \rightarrow \mathcal{B}(\mathcal{H}_{\mathrm{out}}).\]
Such maps are quantum channels.
In Hilbert-space notation, a channel is written as a map,
\[\rho_{\mathrm{in}} \longmapsto \Phi(\rho_{\mathrm{in}}).\]
After vectorisation, it becomes a matrix-like object,
\[|\rho_{\mathrm{out}}\rangle\rangle = \Phi |\rho_{\mathrm{in}}\rangle\rangle.\]
This is the computational reason for using Liouville space in this package: density matrices become MPS-like objects, while channels and generators become MPO-like objects.
ρL = to_liouville(ρ; sites=sites_L) # density matrix as Liouville MPS
L_mpo = liouvillian_mpo(H, sites_L) # channel generator as Liouville MPOSee Liouville-Space Basics for the full Hilbert ↔ Liouville workflow.
A channel is trace preserving when
\[\operatorname{Tr}[\Phi(\rho)] = \operatorname{Tr}(\rho)\]
for all density matrices $\rho$. In Liouville notation this becomes a statement about the vectorised identity:
\[\langle\langle I|\Phi = \langle\langle I|.\]
Dynamics in Liouville space
Hamiltonian dynamics
Closed-system density matrices obey the von Neumann equation
\[\frac{d\rho}{dt} = -i[H,\rho].\]
Expanding the commutator,
\[\frac{d\rho}{dt} = -iH\rho + i\rho H.\]
After vectorisation, this becomes
\[\frac{d}{dt} |\rho\rangle\rangle = \mathcal{L}_H |\rho\rangle\rangle,\]
where
\[\mathcal{L}_H = -i(I\otimes H) + i(H^{\mathsf{T}}\otimes I).\]
Using the package suffix language, this is the same structure as
\[\mathcal{L}_H = -iH_L + iH_R.\]
Here $H_L$ means “left multiplication by $H$” and $H_R$ means “right multiplication by $H$” in the Liouville-space convention used by the package.
Once the density matrix is vectorised, Hamiltonian density-matrix evolution looks like ordinary linear evolution generated by a Liouville-space operator.
L_mpo = liouvillian_mpo(H, sites_L)
ρL = tdvp(ρL, L_mpo, -1im * dt; alg=TDVP(), maxdim=32)See Liouville-Space Basics for the commutator generator and Hilbert versus Liouville evolution in Unitary Dynamics.
Open Markovian dynamics
Many Markovian open quantum systems are described by a Master equation in the GKLS form. The most commonly used version is the Local Master Equations (LME), given by
\[\frac{d\rho}{dt} = -i[H,\rho] + \sum_\mu \gamma_\mu \left( L_\mu\rho L_\mu^\dagger - \frac{1}{2} \left\{ L_\mu^\dagger L_\mu, \rho \right\} \right).\]
Here $H$ generates coherent Hamiltonian dynamics, while the jump operators $L_\mu$ describe dissipative processes such as decay, dephasing, or particle loss.
The anticommutator is
\[\left\{ L_\mu^\dagger L_\mu, \rho \right\} = L_\mu^\dagger L_\mu\rho + \rho L_\mu^\dagger L_\mu.\]
After vectorisation, the whole equation becomes
\[\frac{d}{dt} |\rho\rangle\rangle = \mathcal{L} |\rho\rangle\rangle,\]
where $\mathcal{L}$ is the Liouvillian superoperator.
For one jump operator $L$ with rate $\gamma$, the dissipative part has the structure
\[\gamma \left( L^*\otimes L - \frac{1}{2} I\otimes L^\dagger L - \frac{1}{2} (L^\dagger L)^{\mathsf{T}}\otimes I \right).\]
In package language, these correspond to the _Jump, _LdagL_L, and _LdagL_R terms.
liouvillian_opsum builds a symbolic Liouvillian operator sum, while liouvillian_mpo builds a Liouville-space MPO. These are the objects used to represent Hamiltonian and dissipative density-matrix evolution in Liouville space.
using ITensors.Ops: Trotter
jumps = [(γ, "Sm", 1)] # jump rate, operator, site
L_mpo = liouvillian_mpo(H, sites_L; jump_ops=jumps)
ρL = tebd(ρL, L_mpo, dt, T; alg=Trotter{2}(), maxdim=32)See Dissipative Dynamics for a full Lindblad walkthrough and dissipative Lindblad model for the liouvillian_mpo construction.
For larger runnable models after that tutorial, see:
- Dissipative spin chain — bulk amplitude damping with Liouville TEBD
- Boundary-driven spin chain — opposing edge reservoirs and spin current with Liouville TDVP
- Driven-dissipative Bose–Hubbard — time-dependent pump plus local loss
Hilbert-to-Liouville dictionary
The following table summarises the main translations used throughout this documentation.
| Hilbert-space expression | Liouville-space expression | Meaning |
|---|---|---|
| $\rho$ | $\vert\rho\rangle\rangle$ | vectorised density matrix |
| $A\rho$ | $A_{\mathrm{L}}\vert\rho\rangle\rangle$ | left multiplication |
| $\rho A$ | $A_{\mathrm{R}}\vert\rho\rangle\rangle$ | right multiplication |
| $A\rho B$ | $(B^{\mathsf{T}} \otimes A)\vert\rho\rangle\rangle$ | left-right multiplication |
| $A\rho A^\dagger$ | $(A^* \otimes A)\vert\rho\rangle\rangle$ | jump term |
| $\operatorname{Tr}(\rho)$ | $\langle\langle I \vert \rho \rangle\rangle$ | trace as identity overlap |
| $\langle O\rangle=\operatorname{Tr}(O\rho)$ | $\langle\langle O \vert \rho \rangle\rangle$ | expectation as Liouville overlap |
| $-i[H,\rho]$ | $-iH_{\mathrm{L}}\vert\rho\rangle\rangle + iH_{\mathrm{R}}\vert\rho\rangle\rangle$ | Hamiltonian Liouvillian |
| $L\rho L^\dagger$ | _Jump | jump term |
| $L^\dagger L\rho$ | _LdagL_L | left anticommutator term |
| $\rho L^\dagger L$ | _LdagL_R | right anticommutator term |
In Liouville space, quantities such as $\operatorname{Tr}(\rho)$ and $\operatorname{Tr}(O\rho)$ are computed as overlaps with vectorised operators. This is why identity operators and observable insertions appear naturally as contractions in tensor-network diagrams.
Id_L = to_liouville(Id_mpo; sites=sites_L)
Sz_L = to_liouville(Sz_mpo; sites=sites_L)
Tr_ρ = inner(Id_L, ρL)
expect_Sz = inner(Sz_L, ρL) # same sites_L on both factorsFurther reading
This page is meant to be a compact bridge into the rest of the package. For more background, the following resources are useful.
Quantum states and density matrices
John Preskill, Lecture Notes for Quantum Computation, Chapter 2 and Chapter 3
A clear introduction to density matrices, measurements, quantum operations, and channels from a quantum-information perspective.
Michael A. Nielsen and Isaac L. Chuang, Quantum Computation and Quantum Information
A standard reference for density matrices, partial traces, quantum channels, and open-system language in finite-dimensional quantum mechanics.
Mark M. Wilde, Quantum Information Theory
A freely available advanced reference with careful treatments of density operators, partial traces, purifications, and quantum channels.
Liouville space and vectorisation
J. A. Gyamfi, “Fundamentals of Quantum Mechanics in Liouville Space.”
A pedagogical introduction to finite-dimensional Liouville space, vectorisation, Kronecker products, and open-system master equations.
Useful for practical examples of density matrices, Lindblad master equations, superoperators, and numerical open-system simulation.
QuTiP: An open-source Python framework for the dynamics of open quantum systems.
A software-oriented reference showing how open quantum dynamics, master equations, and Monte Carlo methods are organised in a numerical package.
Open quantum systems
Heinz-Peter Breuer and Francesco Petruccione, The Theory of Open Quantum Systems
A standard textbook reference for reduced density matrices, master equations, Markovian limits, and non-Markovian open-system dynamics.
Ángel Rivas and Susana F. Huelga, Open Quantum Systems: An Introduction
A compact and readable introduction to the mathematical structure of open quantum dynamics.
G. Lindblad, “On the Generators of Quantum Dynamical Semigroups.”
The original mathematical reference for the Lindblad generator of Markovian quantum dynamics.