Description
TEP - Locally Purified Density Operator (LPDO) Engine for Noisy Quantum Circuit Simulation
Author
@refraction-ray
Status
Draft
Created
<2025-06-25>
Abstract
This TEP proposes the introduction of a new tensor-network-based engine in TensorCircuit for simulating open quantum systems: the Locally Purified Density Operator (LPDO) engine. The primary motivation is to overcome the exponential memory and computational scaling of exact density matrix simulations. The LPDO represents a mixed state using a tensor network ansatz, which is a generalization of Matrix Product States (MPS) to density operators, characterized by a virtual bond dimension χ and a Kraus bond dimension d_k. This structure allows for a polynomially scaling representation of density matrix that are common in physical systems and noisy quantum circuits. The proposed engine will be integrated as a new backend, supporting standard gate and noise channel applications through tensor contractions and a robust truncation scheme. The entire simulation pipeline will be end-to-end differentiable, making it a powerful tool for large-scale, noise-aware quantum algorithm development and QML research.
Motivation and Scope
Tensor network methods provide a powerful alternative by offering a compressed representation of quantum states that obey an area law of entanglement. For mixed states, Locally Purified Density Operators (LPDOs), have emerged as a leading approach. An LPDO represents an N-qubit density matrix with a network of 2N tensors, where the memory cost scales polynomially with N and the bond dimensions.
This TEP proposes to implement an LPDO engine, to enable scalable and differentiable simulation of noisy quantum circuits within TensorCircuit. This will allow users to simulate significantly larger and deeper noisy circuits than currently possible with exact methods.
Usage and Impact
Users will interact with the new functionality through an explicit, dedicated class, tc.LPDOCircuit
. This design provides clarity and avoids global state changes. The bond dimensions, which control the trade-off between accuracy and resource consumption, will be configured using the set_split_rules
method, mirroring the established API of tc.MPSCircuit
.
Example: Basic Noisy Simulation with LPDOCircuit
This example demonstrates the new class and its configuration for simulating a noisy circuit on a system size that is challenging for exact methods.
import tensorcircuit as tc
# Instantiate the dedicated LPDOCircuit for a 20-qubit system
n = 20
c = tc.LPDOCircuit(n)
# Configure the approximation parameters via set_split_rules.
# max_singular_values: Controls the virtual bond dimension (χ), capturing entanglement.
# max_kraus_dimension: Controls the Kraus bond dimension (d_k), capturing classical mixture.
c.set_split_rules({
"max_singular_values": 32,
"max_kraus_dimension": 4
})
# The circuit construction API is identical to other circuit classes.
c.h(0)
for i in range(n - 1):
c.cnot(i, i + 1)
# Apply a noise channel. The backend logic handles the tensor network update and truncation.
c.depolarizing(5, px=0.01, py=0.01, pz=0.01)
# Expectation value is computed via efficient tensor network contraction.
exp_val = c.expectation_ps(z=[n-1])
print(f"LPDO expectation for N={n} system: {exp_val:.6f}")
And the example should also be perfectly jittable and differentiable.
Backward compatibility
The proposal consists of adding a new class, tc.LPDOCircuit
. This is a purely additive change. All existing classes, such as tc.DMCircuit
and tc.MPSCircuit
, and their functionalities will remain completely unchanged. No existing user code will be affected or broken.
Related Work
Implementation
Add ldpocircuit.py in source, add corresponding unit tests, documentations and example scripts. See the implementation details in the reference papers. Subtleties are at the optimal truncation and environment part.
Alternatives
References
- "Locally purified density operators for noisy quantum circuits", arXiv:2312.02854
- "Simulating noisy quantum circuits with matrix product density operators", https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.3.023005