Skip to content

QuEraComputing/ppvm

Repository files navigation

Pauli Propagation Virtual Machine

A fast quantum circuit simulator written in Rust, with Python bindings.

Docs CI - rust CI - python License

Install

Python (with uv):

uv add git+https://github.com/QuEraComputing/ppvm.git#subdirectory=ppvm-python

Rust:

[dependencies]
ppvm-pauli-sum = { git = "https://github.com/QuEraComputing/ppvm" }

Examples

Pauli propagation runs backwards (Heisenberg picture): write gates in reverse order.

from ppvm import PauliSum

state = PauliSum.new(n_qubits=2, terms=["ZZ"])
state.cnot(0, 1)   # GHZ preparation, written in reverse
state.h(0)

print(state)                    # 1.000 * IZ
print(state.overlap_with_zero())

The generalized stabilizer tableau is itself a form of Pauli propagation — it tracks stabilizer generators under Heisenberg evolution, extended to handle non-Clifford gates and measurements:

from ppvm import GeneralizedTableau

tab = GeneralizedTableau(n_qubits=2)
tab.h(0)
tab.cnot(0, 1)

r0, r1 = tab.measure(0), tab.measure(1)
print(f"Qubit 0: {r0}, Qubit 1: {r1}")  # always correlated

See the documentation for the Rust API, Stim integration, and symbolic propagation.

License & contributing

Licensed under Apache 2.0; see NOTICE for attribution. Contributions are welcome — read CONTRIBUTING.md and the CLA before opening a pull request.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors