Circuits¶
The divi.circuits module provides circuit abstractions for quantum program
generation, execution, and error mitigation.
Warning
Developer-Facing Classes: The core circuit class MetaCircuit is
intended for advanced users and developers. Most users should interact with
circuits through higher-level APIs in the divi.qprog module.
Core¶
Functions¶
|
Build the compute-uncompute overlap circuit from a cost ansatz. |
|
Split a QASM string at symbol boundaries into a |
|
Emit a body-only parametric OpenQASM 2.0 string from a DAG. |
|
Emit body-only measurement QASM per commuting observable group. |
|
Convert a |
|
Shared helper: convert a PennyLane |
|
Render a |
Classes¶
|
Logical circuit IR. |
|
Pre-split QASM body for fast parameter substitution. |
|
One parametric circuit ready for backend-side substitution. |
Variables¶
int([x]) -> integer int(x, base=10) -> integer |
|
Built-in immutable sequence. |
|
Built-in immutable sequence. |
Error Mitigation Protocols¶
Divi provides quantum error mitigation (QEM) capabilities to improve the
accuracy of quantum computations in the presence of noise. All protocols
inherit from QEMProtocol.
Classes¶
Abstract base class for Quantum Error Mitigation protocols. |
|
A dummy default mitigation protocol — pass the circuit through. |
Zero Noise Extrapolation (ZNE)¶
Zero-noise extrapolation protocols and folding helpers.
Functions¶
|
Apply |
|
Apply |
Classes¶
|
Zero Noise Extrapolation. |
|
Structural type for zero-noise extrapolation. |
Fit a line |
|
Richardson (Lagrange) extrapolation through all |
|
|
Global unitary folding with fractional scale-factor support. |
|
Per-gate folding with fractional scale-factor support. |
Variables¶
Type for the folding callable — given a |
Quantum Enhanced Pauli Propagation (QuEPP)¶
Quantum Enhanced Pauli Propagation (QuEPP) error mitigation protocol.
Implements the hybrid classical-quantum error mitigation scheme from Majumder et al. (arXiv:2603.14485). QuEPP decomposes a quantum circuit into alternating Clifford layers and non-Clifford Pauli rotations via Clifford Perturbation Theory (CPT). Low-order Pauli paths are simulated classically; the residual is corrected using noisy quantum execution with an empirical rescaling factor.
The decomposition uses the paper’s Heisenberg-picture back-propagation
with weights cos(θ)/sin(θ) and R_P(π/2) Clifford replacements.
The observable is tracked as a Pauli string; gates that commute with the
current observable contribute weight 1 (no branching), which can
dramatically reduce path count.
Classes¶
|
Quantum Enhanced Pauli Propagation (QuEPP) error mitigation. |