Skip to content

RUST-NATIVE · PYTHON-FIRST · TENSORCIRCUIT

Pauli structure,
made practical.

TenCirPauli brings fast Pauli algebra, Hamiltonian plans, symmetry tools, native observable propagation, and classical-shadow estimators to the TensorCircuit ecosystem.

structured
quantum work
One package, two useful paths. Use native Rust execution for compact CPU workloads, or compile a stable plan for NumPy, TensorCircuit, and JAX.

A small map of the library

01RepresentPauli words, operators, and structured algebra.
02CompileDense, sparse, matrix-free, and backend plans.
03AnalyzeGrouping, shadows, symmetries, sectors, and mappings.
04ExecutePropagation, shadow sampling, gradients, and TensorCircuit interop.

What it covers

01 / ALGEBRA

Canonical Pauli operators

Products, phases, commutation, deterministic aggregation, and direct Hamiltonian construction.

02 / PLANS

Choose the target

Compile to dense, COO, CSR, native matrix-vector products, or a TensorCircuit backend plan.

03 / STRUCTURE

Measure and reduce

Group measurements, estimate with classical shadows, analyze Z₂ and U(1) structure, and work in restricted sectors.

04 / CIRCUITS

Propagate observables

Run deterministic or stochastic Pauli propagation, native shadow sampling, and gradients through familiar Python facades.

A first result

import tencirpauli as tcp

hamiltonian = tcp.PauliOperator.from_terms(
    2, [("XX", 0.5), ("ZI", -1.25j)]
)

matrix = hamiltonian.dense()
print(matrix.shape)
# (4, 4)

The public surface stays in Python; the computationally dense work is handled behind one coarse native boundary. Read the concepts page for the mental model, or go straight to the quickstart when you already know what you need.