betaFeedback

WorksPhysics and Astronomy

PADO-Pauli: A GPU-Accelerated Implementation of Pauli Propagation

Abstract

Variational quantum algorithms utilize parameterized circuits many times during training, at new parameter values, over batches of data, and with gradients. Pauli propagation approximates the expectation values of such circuits classically by evolving the observable in the Heisenberg picture as a truncated sum of Pauli strings. We present PADO-Pauli, a GPU engine for Pauli propagation that compiles a circuit and its observables once into sparse matrices in which each rotation angle contributes only a cosine and a sine factor, so every later evaluation reuses the compiled program. It evaluates batches of parameters and data inputs embedded as rotation angles. By default its gradients come from a vector-Jacobian product registered with PyTorch's automatic differentiation, so they flow through the angles to any classical layer that produces them. PADO-Pauli also provides truncation by Pauli weight and coefficient size, and noise channels. Zero-filtering removes terms that do not contribute to an expectation value in the all-zero reference state and makes the batched forward pass about 1.5 times faster. Compared to cuPauliProp on an NVIDIA A100, PADO-Pauli evaluates up to 10 times faster on 4 to 12 qubits and uses up to 3.1 times less memory on 16 qubits. We check its accuracy against exact statevector simulation up to 28 qubits. These features make PADO-Pauli a practical toolkit for training variational quantum algorithms, including quantum machine learning models.

Introduction

Variational quantum algorithms and quantum machine learning models typically evaluate a parameterized circuit, update its parameters with a classical optimizer, and repeat. The same circuit structure is therefore queried many times for expectation values of Hamiltonians or cost operators written as sums of Pauli strings.

Classical simulation of this loop has been dominated by Schrödinger picture methods, in particular full statevector simulation, which is exact and general but tracks the whole state, costing memory and runtime exponential in the system size. An alternative is to work in the Heisenberg picture [1] and propagate observables through the circuit in reverse gate order. This idea has grown into a family of methods now called Pauli propagation [2].

The method has been reported to be competitive with leading simulators for certain tasks [3]. Pauli propagation, sparse Pauli, and tensor network methods [4, 5, 6, 7, 8, 9, 10] classically reproduced the 127-qubit kicked Ising experiment [11] that motivated recent claims of quantum utility, in some cases faster than the quantum device and to higher accuracy.

Pauli propagation writes the observable as a sum of Pauli strings and pushes each string through the circuit one gate at a time. Every rotation that does not commute with a string splits it into a cosine and a sine branch, so the number of strings can grow exponentially with depth. Truncation keeps the method practical at a bounded cost in accuracy: it drops the strings whose Pauli weight, the number of non-identity factors, exceeds a maximum weight wmax⁡w_{\max}, and those whose coefficients are small (§ 2.2). The truncated operator is the Pauli propagation surrogate (PPS) [7, 3]. Because its cosine and sine factors are kept as functions of the angles, the surrogate can be stored once and re-evaluated at any angles [7].

Existing tools and related methods. Pauli propagation has a growing body of guarantees, extensions, and libraries. The low-weight efficient simulation algorithm (LOWESA) gives a provable average-case guarantee for noisy parameterized circuits [12] and is reused to build surrogate expectation landscapes [7]; closely related lines of work appear as Clifford perturbation theory [13], as simulations of sparse Pauli dynamics [4, 5], and as observable backpropagation on Pauli paths, which bounds the truncation error under single-qubit Pauli noise [6]. Recent extensions cover arbitrary local noise, imaginary time evolution, quantum enhanced Pauli propagation, and the merging of Pauli strings related by a circuit symmetry [14, 15, 16, 17], and separate libraries target the processing of Pauli strings at high throughput and time evolution in the Heisenberg picture [18, 19, 20]. The guarantees for noisy circuits belong to a broader line of results on the classical tractability of noisy circuits, such as sampling from noisy random circuits [21].

Other Pauli propagation engines exist. The open-source PauliPropagation.jl library propagates the Pauli sum gate by gate on the central processing unit (CPU), merging duplicate strings and truncating after each gate [3]; the Qiskit addon pauli-prop [22] also runs on the CPU and truncates by a coefficient cutoff and a cap on the number of retained terms; NVIDIA’s cuQuantum software development kit (SDK) added cuPauliProp [23], a graphics processing unit (GPU) Pauli propagation engine, in release 25.11; and BlueQubit’s hosted GPU Pauli path simulator has been benchmarked against other simulators [24].

PADO-Pauli compiles a circuit and its observables: it runs the Heisenberg propagation once, with truncation and zero-filtering, and stores the result as a program of per-gate sparse matrices in which each rotation angle enters only through a cosine and a sine factor supplied at evaluation. The circuit itself is left as written; no mapping to a hardware gate set or qubit layout (transpilation) is involved. Every later query, batched expectation values and gradients, reuses the program, evaluated and differentiated within PyTorch. PADO-Pauli was developed independently of these tools and concurrently with several of them.

The surrogate viewpoint has been used to build classical surrogates of variational landscapes and their quantum enhanced patches [7, 25], to model a trained circuit’s outputs as a function of its data inputs [26], and to pre-train circuits through a differentiable symbolic representation [27]. It has also been used to show that families such as quantum convolutional neural networks are effectively classically simulable [28, 29]. The surrogate further serves as a classical initializer for variational optimization, even where it is an unreliable simulator [30], and as the classical training stage that finds circuits preparing ground states on one hundred qubits or more, with trained circuits run on hardware at 48 qubits [31]. Other work quantifies when Pauli path simulation can be trusted [32]. Further work makes it usable for optimization with gradients, by sampling Pauli paths for unbiased gradient estimates [33] or by backpropagating through the Pauli propagation simulation at a memory cost lower than that of conventional reverse-mode automatic differentiation [34]. PADO-Pauli complements these efforts on the implementation side: it compiles propagation into sparse linear maps executed in PyTorch, so that the simulation runs inside a machine learning framework, as tensor network simulation does in [35].

Contributions. The contributions of this work are the following.

  • Single compilation, multiple evaluations. A circuit and its observables are propagated, truncated, zero-filtered, and compiled once into a single program; every later query (batched expectation values and gradients) reuses it (Figure 1). This matches the pattern of repeated evaluation in variational and quantum machine learning training, which queries the same circuit hundreds of times per run.

Overview of PADO-Pauli

Figure 1. Overview of PADO-Pauli: a single compilation, with truncation applied at each propagation step, followed by multiple evaluations with gradients.

  • Zero-filtering of the propagated operator. After propagation, PADO-Pauli removes every branch that cannot reach a Pauli string with nonzero expectation in the reference state ∣0⟩⊗n\lvert0\rangle^{\otimes n}, so zero-filtering is exact. On the Erdős–Rényi quantum approximate optimization algorithm (QAOA) families measured here it shrinks the evaluation working set (the Pauli strings that remain after the last propagation step and zero-filtering) by roughly one to three orders of magnitude (§ 3.2).

  • Differentiable execution on GPU tensors. Pauli strings are stored as symplectic bitmasks (two bits per qubit, § 3.1) and propagation is expressed as sparse linear maps with explicit cosine/sine branches, executed as PyTorch tensor operations [36]; the rotation angles, trainable or supplied by data, enter those maps as ordinary PyTorch tensors. The compiled program is therefore differentiable: PADO-Pauli computes the derivatives of its expectation values with respect to every rotation angle in a backward pass registered with PyTorch’s automatic differentiation, so the gradient of a loss built from those values reaches the angles and any PyTorch layer that produced them (§ 3.3), without parameter-shift re-evaluation.

  • Composable truncation. Max-weight and coefficient truncation trade accuracy against cost through explicit thresholds; both are checked against exact baselines, max-weight truncation up to 28 qubits and coefficient truncation at 16 (§ 4).

  • Batched embedding inputs, quasi-probability reconstruction, and reference checks. PADO-Pauli provides evaluation over the Cartesian product of data and parameter batches, reconstruction of the circuit’s output quasi-probabilities from ZZ correlators (§ 3.4), and reference helpers that cross-check small systems against exact statevector values.

Each of these design choices has a counterpart in some existing engine, but none of the engines compared in § 5 has all of them: GPU execution, a native backward pass, and batched embedding inputs, on a compiled program that is reused across queries inside PyTorch and whose step matrices are pruned by zero-filtering. That combination targets one regime, repeated evaluation with gradients and batched queries, which is the inner loop of variational and quantum machine learning training. § 5 records where the compared engines offer their own version of each design choice.

In that comparison PADO-Pauli evaluates up to 10×10\times faster than cuPauliProp on 4- to 12-qubit instances. On a 16-qubit instance in the forward-plus-backward configuration it occupies 3.1×3.1\times less GPU memory at maximum weight wmax⁡=6w_{\max}=6 (cuPauliProp holding complex coefficients) and completes wmax⁡=7w_{\max}=7, where cuPauliProp exhausts the 80 GB NVIDIA A100.1 The compiled program reaches 100 qubits at wmax⁡=3w_{\max}=3 (§ 4.2).

The rest of the paper is organized as follows. § 2 reviews Pauli propagation, truncation and its error bounds, and noise channels in the Pauli picture. § 3 describes what PADO-Pauli compiles, stores, prunes, and differentiates, with measurements of each design choice within the engine, and documents the interface. § 4 measures the accuracy of the compiled program against exact baselines and the cost of building and evaluating it. § 5 compares PADO-Pauli with other engines on common instances, § 6 works through four applications, and § 7 states limitations and extensions.

Background

The Pauli propagation surrogate (PPS)

A surrogate is an inexpensive model that stands in for an expensive function. Here the expensive function is the map from the circuit parameters θ\theta to the circuit’s expectation values, and the surrogate is a classical object that, once built, returns approximations to those values at any θ\theta. PPS denotes the surrogate that Pauli propagation yields, the truncated effective observable of the Introduction. Let the target observable be

O=∑jcjPj,(1)O = \sum_j c_j P_j, \tag*{(1)}

where each PjP_j is a Pauli string, a tensor product of single-qubit Pauli matrices. Pauli propagation pushes OO through the circuit gate by gate, from the last gate to the first:

Oeff(θ)=U†(θ)OU(θ).(2)O_{\mathrm{eff}}(\theta) = U^\dagger(\theta) O U(\theta). \tag*{(2)}

The effective observable is represented as a sparse sum of Pauli strings together with the cosine/sine factors needed to regenerate the coefficients at any θ\theta.

PADO-Pauli implements the PPS workflow with the structure of Figure 1, a single compilation followed by multiple evaluations:

  1. express the cost or Hamiltonian as a Pauli sum,

  2. propagate each term through the circuit in the Heisenberg picture,

  3. truncate intermediate growth using rules based on structure and on coefficients,

  4. evaluate the compiled program for many parameter values.

Steps 2–3 are what PADO-Pauli compiles into sparse tensor operations, and step 4 runs the result (§ 3).

Pauli propagation mechanics. The method’s cost is set by the propagation, step 2 of the workflow above. With OO a weighted sum of Pauli strings, computing U†OUU^\dagger O U reduces to repeatedly rewriting Pauli strings under gate conjugation.

In this picture Clifford gates induce a one-to-one mapping on Pauli strings and therefore do not themselves create branching. The main source of complexity is a parameterized non-Clifford operation such as a Pauli rotation

RG(θ)=e−iθG/2.(3)R_G(\theta) = e^{-i\theta G/2}. \tag*{(3)}

Its action on a Pauli string PP depends on the commutation relation between PP and the generator GG:

RG†(θ)PRG(θ)={P,[P,G]=0,cos⁡(θ)P+sin⁡(θ)P′,otherwise,(4)R_G^\dagger(\theta) P R_G(\theta) = \begin{cases} P, & [P,G] = 0,\\ \cos(\theta)P + \sin(\theta)P', & \text{otherwise,} \end{cases} \tag*{(4)}

where P′=i[G,P]/2P' = i[G,P]/2 is another Pauli string generated by the non-commuting branch.

For example, let the circuit apply a CNOT from qubit 0 to qubit 1 and then RX(θ)R_X(\theta) on qubit 0, and let O=Z0O = Z_0. Propagation starts at the last gate: Z0Z_0 does not commute with X0X_0, so the rotation gives cos⁡θ Z0+sin⁡θ Y0\cos\theta\,Z_0 + \sin\theta\,Y_0; the CNOT then maps each string to one string, Z0↦Z0Z_0 \mapsto Z_0 and Y0↦Y0X1Y_0 \mapsto Y_0X_1, giving Oeff=cos⁡θ Z0+sin⁡θ Y0X1O_{\mathrm{eff}} = \cos\theta\,Z_0 + \sin\theta\,Y_0X_1. In the state ∣0⟩⊗2\lvert0\rangle^{\otimes2} only the first string has nonzero expectation, so ⟨Z0⟩=cos⁡θ\langle Z_0\rangle= \cos\theta.

A single initial string can generate up to 2m2^m branches, where mm is the number of non-commuting rotations met during propagation (Figure 2). Different paths may produce the same Pauli string, whose coefficients are then summed.

Conceptual branching tree for Pauli propagation under parameterized rotations

Figure 2. Conceptual branching tree for Pauli propagation under parameterized rotations: non-commuting gates split a Pauli string into cosine and sine branches. Rot⁡(θℓ)\operatorname{Rot}(\theta_\ell) is the rotation RG(θℓ)R_G(\theta_\ell) of Eq. (4), and P′P', P′′P'', P′′′P''' the distinct strings its successive sine branches produce.

Truncation strategies and error bounds

Max-weight truncation. Max-weight truncation discards terms whose Pauli weight (number of non-identity factors) exceeds wmax⁡w_{\max} [7, 3]. The motivation is the expectation value taken at the end of propagation: for ρ0=∣0⟩⟨0∣⊗n\rho_0 = \lvert0\rangle\langle0\rvert^{\otimes n}, a string with WW non-identity factors drawn uniformly from {X,Y,Z}\{X,Y,Z\} has Tr⁡[ρ0P]=0\operatorname{Tr}[\rho_0P] = 0 with probability 1−(1/3)W1 - (1/3)^W, since Tr⁡[ρ0P]≠0\operatorname{Tr}[\rho_0P] \ne0 requires all WW factors to be ZZ, so under this model strings of high weight rarely contribute [3]. The rule depends only on the Pauli support and is therefore independent of the rotation angles.

Weighted (per-axis) max-weight truncation. PADO-Pauli also offers a weighted variant: each Pauli axis is assigned a per-axis weight wXw_X, wYw_Y, wZw_Z, all 1 by default and set through the presets of § 3.1, and a string is kept only if the per-axis weights of its non-identity factors sum to at most wmax⁡w_{\max}, ∑qwPq≤wmax⁡\sum_q w_{P_q} \le w_{\max}.

Coefficient truncation. Coefficient truncation discards terms whose absolute coefficient falls below a threshold ϵ\epsilon, ∣cj∣<ϵ\lvert c_j\rvert< \epsilon [3]. Unlike max-weight truncation it depends on the parameter values.

Other structural filters. Other filters in the literature cap a quantity accumulated along each path, such as the trigonometric frequency (the number of cosine or sine factors a path picks up [12, 3]).

Truncation error bounds. Because ∣Tr⁡[Pjρ]∣≤1\lvert\operatorname{Tr}[P_j\rho]\rvert\le1 for every Pauli string and state, a single truncation that drops a set TT of terms from O=∑jcjPjO = \sum_j c_jP_j, leaving O^\hat{O}, changes an expectation value by at most the discarded coefficient mass,

∣Tr⁡[(O−O^)ρ]∣≤∑j∈T∣cj∣=:Δ,(5)\lvert\operatorname{Tr}[(O-\hat{O})\rho]\rvert\le\sum_{j\in T}\lvert c_j\rvert=: \Delta, \tag*{(5)}

and the total error is at most the sum of the discarded masses of the individual truncations, Δtot≤∑ℓΔℓ\Delta_{\mathrm{tot}} \le\sum_{\ell}\Delta_{\ell}, with no assumption on the state or the circuit [3]. Truncation is thus a controllable approximation; § 4.1 measures its effect.

Noise channels in the Pauli picture

Pauli noise. Pauli noise (homogeneous or inhomogeneous dephasing and depolarizing) is the family of unital channels diagonal in the Pauli basis. For the single-qubit inhomogeneous depolarizing channel with X/Y/ZX/Y/Z error probabilities px,py,pzp_x,p_y,p_z,

E(ρ)=pIρ+pxXρX+pyYρY+pzZρZ,pI=1−(px+py+pz),(6)\mathcal{E}(\rho) = p_I\rho+ p_xX\rho X + p_yY\rho Y + p_zZ\rho Z,\qquad p_I = 1-(p_x+p_y+p_z), \tag*{(6)}

the corresponding Pauli transfer action (identical in the Schrödinger and Heisenberg pictures) leaves the identity fixed and damps each single-qubit Pauli,

E[I]=I,E[X]=(1−2py−2pz)X,E[Y]=(1−2px−2pz)Y,E[Z]=(1−2px−2py)Z.(7)\mathcal{E}[I] = I,\qquad\mathcal{E}[X] = (1-2p_y-2p_z)X,\qquad\mathcal{E}[Y] = (1-2p_x-2p_z)Y,\qquad\mathcal{E}[Z] = (1-2p_x-2p_y)Z. \tag*{(7)}

The Pauli set is therefore unchanged: these channels do not branch and only multiply each coefficient by a factor of magnitude at most one, since each factor is 1−2(pa+pb)1-2(p_a+p_b) with 0≤pa+pb≤px+py+pz≤10 \le p_a+p_b \le p_x+p_y+p_z \le1.

Amplitude damping. In the Heisenberg picture one propagates the dual map N†\mathcal{N}^{\dagger} of a channel N\mathcal{N}. The dual map is always unital, so even non-unital noise never branches on the identity. For amplitude damping with damping rate γ\gamma the only branching is N†[Z]=γI+(1−γ)Z\mathcal{N}^{\dagger}[Z]=\gamma I+(1-\gamma)Z, while XX and YY are only damped [37].

Noise and truncation error. Each Pauli noise layer multiplies the coefficient of every string with support on the noisy site, and with it any discarded mass Δ\Delta of Eq. (5), by a factor of magnitude at most one; strings of high weight, damped at every non-identity site when px,py,pz>0p_x,p_y,p_z>0, are suppressed fastest. Noise thus reinforces the structure of low weight and small coefficients that truncation exploits; this is the mechanism behind the average-case guarantees for circuits with Pauli noise [12, 6, 21], and any incoherent local noise, including non-unital noise, truncates a typical circuit to an effective logarithmic depth [14, 38]. At a fixed term budget noise should therefore lower the truncation error; § 4.3 checks this.

The PADO-Pauli Engine: Design and Interface

This section describes how PADO-Pauli realizes the design choices of the Introduction and measures each one within the engine, by switching it off or by changing the preset, so that its effect is separated from the engine-to-engine differences of § 5. § 3.1 defines the compiled program and the stages that build it, § 3.2 the zero-filtering pass, § 3.3 evaluation, batching, and differentiation in PyTorch, and § 3.4 the interface and the supported gate set.

Single compilation, multiple evaluations

Data structure. The compiled program is a list of per-gate sparse matrices together with the Pauli strings of its output rows. Its logical content is

P=(n,X,Z,cinit,{Sℓ}ℓ=1L),(8)\mathcal{P}=(n,X,Z,c_{\mathrm{init}},\{S_{\ell}\}_{\ell=1}^{L}), \tag*{(8)}

where nn is the qubit count. Here, XX and ZZ are mask tensors listing the Pauli strings present after propagation through every gate, the propagated basis (after zero-filtering, only its {I,Z}⊗n\{I,Z\}^{\otimes n} rows). cinitc_{\mathrm{init}} is a coefficient vector on the union basis, the union of the observables’ Pauli strings; the compiler uses it only to estimate coefficient magnitudes for coefficient truncation. Each SℓS_{\ell} is one compiled propagation step, the sparse matrices of one gate. The intermediate bases are not stored; they appear only as the row and column dimensions of the steps.

The mask representation is the binary symplectic encoding of Pauli strings, with one bit pair per qubit as in [39], as used, for example, in [18]. For row ii and qubit qq, the bit pair (xiq,ziq)(x_{iq},z_{iq}) determines the local operator:

(0,0)↦I,(1,0)↦X,(0,1)↦Z,(1,1)↦Y.(0,0)\mapsto I,\qquad(1,0)\mapsto X,\qquad(0,1)\mapsto Z,\qquad(1,1)\mapsto Y.

Each active Pauli string occupies one row of the paired mask tensors. Two bits per qubit put a string at 16 bytes for n≤63n\le63, which keeps the propagated basis, millions of strings before zero-filtering (Table 2), within memory. Whether a string (x,z)(x,z) commutes with a gate generator (xG,zG)(x_G,z_G), the test that decides branching in Eq. (4), is the parity of the set bits of (x∧zG)⊕(z∧xG)(x\wedge z_G)\oplus(z\wedge x_G), so the C++ extension answers it with a few word operations per string. A mask uses 63 bits of each 64-bit integer word and spans several words when n>63n>63, so the qubit count is not limited by the word size; the 100-qubit programs of § 4.2 use two words per mask.

wmax⁡w_{\max}Zero-filteringTermsStep nonzerosSteady-state [GB]Eval200_{200} [s]Fwd+bwd [s] warmFwd+bwd [s] first
4on6964.85×1054.85 \times10^{5}0.060.0680.0670.8
off69,6651.82×1061.82 \times10^{6}0.180.1000.0681.2
5on2,5165.81×1065.81 \times10^{6}1.090.7690.0705.6
off584,9101.76×1071.76 \times10^{7}1.651.2660.0718.4
6on6,8845.17×1075.17 \times10^{7}7.615.2010.08535.8
off3,504,2711.26×1081.26 \times10^{8}10.477.9720.09550.3
7on14,8923.10×1083.10 \times10^{8}37.0322.8570.194161.1
off16,011,5106.68×1086.68 \times10^{8}50.2833.5200.263219.3

Table 2. Ablation of zero-filtering on the 16-qubit, depth-5 Erdős–Rényi MaxCut-QAOA instance (AMD Instinct MI300X, float32; medians of five calls after one warm-up, except first, which is timed once). Terms, evaluation working set; Step nonzeros, stored entries of the step matrices; Steady-state, GPU memory held between forward queries; Eval200_{200}, batched forward pass over 200 parameter vectors; Fwd+bwd, forward-plus-backward pass, warm with the backward cache built and first for the pass that builds it.

Sparse tensor formulation and GPU execution. PADO-Pauli formulates propagation as linear algebra on the coefficients of the active Pauli strings. If NℓN_{\ell} denotes the number of unique active strings before step ℓ\ell, which truncation keeps far below the 4n4^n Pauli strings on nn qubits, then the propagated observable at that stage is represented by a dense coefficient vector vℓ∈RNℓ\mathbf{v}_{\ell} \in\mathbb{R}^{N_{\ell}}. Applying the next gate induces a sparse transition map with at most two nonzero entries per column, since a gate maps a string to at most two strings Eq. (4); this is the matrix applied by the compiled step Sℓ\mathcal{S}_{\ell} above,

Mℓ(θℓ)∈RNℓ+1×Nℓ,(9)M_{\ell}(\theta_{\ell}) \in\mathbb{R}^{N_{\ell+1}\times N_{\ell}}, \tag*{(9)}

whose nonzero pattern is determined by the Pauli rewrite rules and whose values depend on the gate parameter when the gate is non-Clifford. The full Heisenberg evolution through LL steps can then be written as

vout=ML(θL)ML−1(θL−1)⋯M1(θ1)vin.(10)\mathbf{v}_{\mathrm{out}} = M_{L}(\theta_{L})M_{L-1}(\theta_{L-1})\cdots M_{1}(\theta_{1})\mathbf{v}_{\mathrm{in}}. \tag*{(10)}

Here vin\mathbf{v}_{\mathrm{in}} is the coefficient vector of an observable on the union basis (a column of V0V_{0}, § 3.3). The steps are numbered in propagation order, one per gate, so M1M_{1} applies the last gate of the circuit and MLM_{L} the first; evaluation runs this product in transposed form (§ 3.3). Propagation is then a sequence of products of a sparse matrix with a vector or a matrix, operations for which GPU kernels have been developed [40].

Separation of parameters from structure. Eq. (4) sorts the strings entering a rotation step into two groups: a string that commutes with the generator passes through unchanged, and every other string contributes cos⁡θℓ\cos\theta_{\ell} times itself and sin⁡θℓ\sin\theta_{\ell} times the string P′P' of Eq. (4). A compiled step therefore represents its action as three sparse components,

vℓ+1=Mconst(ℓ)vℓ+cos⁡(θℓ)Mcos⁡(ℓ)vℓ+sin⁡(θℓ)Msin⁡(ℓ)vℓ,(11)\mathbf{v}_{\ell+1}=M_{\mathrm{const}}^{(\ell)}\mathbf{v}_{\ell}+\cos(\theta_{\ell})M_{\cos}^{(\ell)}\mathbf{v}_{\ell}+\sin(\theta_{\ell})M_{\sin}^{(\ell)}\mathbf{v}_{\ell}, \tag*{(11)}

where MconstM_{\mathrm{const}} carries the commuting strings, Mcos⁡M_{\cos} the non-commuting strings copied in place, and Msin⁡M_{\sin} their sine branches; a Clifford or noise step has the first component only. The angle enters Eq. (11) only through the two scalars cos⁡θℓ\cos\theta_{\ell} and sin⁡θℓ\sin\theta_{\ell}, so the three matrices, the step matrices, are fixed at compilation. Three consequences follow, and § 3.3 builds on each. The same matrices serve every parameter vector, so a program is compiled once and queried many times. A batch of parameter vectors or embedding inputs changes only the scalars, so it is evaluated with the scalar factors carried along a batch dimension while each matrix is read once. The derivative with respect to θℓ\theta_{\ell} is −sin⁡(θℓ)Mcos⁡(ℓ)vℓ+cos⁡(θℓ)Msin⁡(ℓ)vℓ-\sin(\theta_{\ell})M_{\cos}^{(\ell)}\mathbf{v}_{\ell}+\cos(\theta_{\ell})M_{\sin}^{(\ell)}\mathbf{v}_{\ell}, the same two products with the scalars exchanged and one sign flipped, so a gradient is another pass over the same matrices and does not propagate the circuit again.

For a rotation step, MconstM_{\mathrm{const}} and Mcos⁡M_{\cos} are stored together as one index map. For each output row whose string the gate leaves in place, the map gives the input row it copies and whether the copy is multiplied by cos⁡θℓ\cos\theta_{\ell}. Sine branches are stored as explicit sparse entries, on a new row for a new string or on the existing row of a string already present. The step’s linear operator is the same regardless of how its entries are stored. Clifford and noise steps store MconstM_{\mathrm{const}} alone.

Propagation pipeline. Given a circuit U=UL⋯U2U1U=U_{L}\cdots U_{2}U_{1} and an observable OO, the compiled program is built by applying the gate updates in reverse order,

O(k−1)=Uk†O(k)Uk,O(L)=O,(12)O^{(k-1)}=U_{k}^{\dagger}O^{(k)}U_{k}, \qquad O^{(L)}=O, \tag*{(12)}

so that step ℓ\ell of the propagation order conjugates by the gate UL+1−ℓU_{L+1-\ell}. The compile path runs this recursion in three stages, which take the circuit, the observables, and the preset and return the program P\mathcal{P} above.

  1. Union basis. The compiler collects the Pauli strings of all observables into one ordered list, the union basis, and records on it the coefficient vector cinit\mathbf{c}_{\mathrm{init}} that coefficient truncation reads. All observables are then propagated together through one step sequence, and their own coefficients enter only at evaluation, as the columns of V0\mathbf{V}_0 (§ 3.3), so a Hamiltonian with many terms or a list of observables costs one propagation.

  1. Propagation. One pass over the gates in reverse order turns the union basis into the step sequence {Sℓ}\{S_\ell\}. At each gate the C++ extension (§ 3.4) rewrites the masks of the active strings, generates the sine branches of a rotation, merges the rows that now hold the same string, and then applies the truncations to the merged rows, max-weight (wmax⁡w_{\max}) and, when a threshold ϵ\epsilon is given, coefficient truncation; a row that fails a rule is dropped inside the extension and never reaches Python. The pass emits the three components of Eq. (11) for the step; the strings active before it become the column dimension of this step and the row dimension of the next, and the intermediate bases themselves are not stored.

  1. Zero-filtering. The compiler propagates a survival mask (§ 3.2) from step LL to step 1, starting at the output rows in {I,Z}⊗n\{I,Z\}^{\otimes n}, and prunes the sparse steps, the propagated basis, the union basis, and cinit\mathbf{c}_{\mathrm{init}} to the rows it retains. Propagation generates every reachable string; this stage removes the strings that cannot contribute to an expectation value in ∣0⟩⟨0∣⊗n|0\rangle\langle0|^{\otimes n}, so evaluation runs on the retained rows only.

The propagation stage takes most of the compile time, and zero-filtering costs no more than the propagation it follows (§ 4.2).

Circuit and observables. The compiler takes a circuit as an ordered list of gate objects applied left to right: Pauli rotations e−iθP/2e^{-i\theta P/2} with an arbitrary Pauli string PP as generator, the Clifford gates of § 3.4, and the two noise channels of § 2.3. Each rotation names its angle by an index: param_idx marks a trainable angle, and embedding_idx marks a data input, an embedding, supplied per sample at evaluation and not trained (§ 3.3). An observable is a PauliSum, Pauli strings with coefficients; Listing 1 shows the tuple forms that build one.

A circuit is usually written with the Circuit builder, which wraps these objects in methods that can be chained and accumulates the gate list as qc.gates; qc.compile(observables=..., preset=...) and qc.expvals(thetas) forward to the functional entry points below.

Compilation. compile_program runs the three stages above and returns a CompiledProgram. Max-weight truncation is always part of the propagation stage; its threshold wmax⁡w_{\max} comes from the preset (the max_weight field), and every preset of Table 1 sets it above any reachable weight, so a program is untruncated unless max_weight is given. Storage and compute devices and precision are selected through the same named preset, described below, optionally refined with overrides.

PresetMemory deviceCompute device
cpucpucpu
gpucudacuda
hybridcpucuda

Table 1. Execution presets: where each stores and where it evaluates the compiled program. cuda is the PyTorch device string for the GPU of the installed build.

The compiler also accepts coefficient truncation: terms whose absolute coefficient at one fixed parameter vector, the build point build_thetas, falls below the threshold ϵ\epsilon, set by build_min_abs, are dropped. With several terms or observables the threshold is applied to the observable on the union basis, whose coefficient vector cinit\mathbf{c}_{\mathrm{init}} holds, for each string, the largest ∣c∣|c| that string has in any listed observable (Appendix § 10). A rotation driven by an embedding input reads its build angle from build_thetas at its embedding_idx, so build_thetas must cover the embedding indices too.

Presets. A preset (ExecutionPreset) is an immutable record of where the compiled program is kept, where it is evaluated, the coefficient dtype, the truncation fields wmax⁡w_{\max} and its per-axis weights, and the block size chunk_size. The three presets are listed in Table 1: cpu keeps program and evaluation on the CPU, which has the larger memory; gpu keeps both on the faster GPU; hybrid keeps the program on the CPU and evaluates on the GPU, copying a step matrix of at most chunk_size rows to the GPU once and caching it, and a larger one in blocks of chunk_size rows on every call (5×1075 \times10^{7} for hybrid, 101010^{10} for cpu and gpu, which never split). All default to float64, with float32 selected explicitly for runs bound by memory or throughput. Passing preset_overrides to compile_program customizes a preset; resolve_preset(name,overrides=...) returns the resulting record for inspection.

Evaluation. program.expvals(thetas) returns one expectation value per observable; repeated calls reuse the compiled program and re-run only the evaluation of § 3.3.

The minimal workflow of Listing 1 combines these steps. It builds a circuit on six qubits with an RXR_X rotation on every qubit, an RZZR_{ZZ} rotation on every neighboring pair, and a final CNOT, each rotation with its own trainable angle. It declares three observables: Z0Z_0, the correlator Z0Z5Z_0Z_5, and the Ising chain energy ∑q=04ZqZq+1\sum_{q=0}^{4} Z_qZ_{q+1}, the last passed as a list of terms so that it counts as one observable. It compiles them once under the gpu preset and evaluates them at one parameter vector, which returns three values; a call with another parameter vector reuses the same program. The last two lines build the same program from the gate list without the Circuit builder.

Listing 1: Minimal workflow, a single compilation followed by multiple evaluations (condensed).

import torch
from padopauli import Circuit, compile_program

n = 6
# 1) Build a parameterized circuit; every gate call returns the circuit.
qc = Circuit(n)
pidx = 0
for q in range(n):
    qc.rx(q, param_idx=pidx); pidx += 1
for q in range(n - 1):
    qc.rzz(q, q + 1, param_idx=pidx); pidx += 1
qc.cnot(0, 1)

# 2) Observables are (pauli, qubits[, coeff]) tuples; a LIST of tuples is one
# observable with several terms, not several observables.
observables = [
    ("Z", [0]), # <Z_0>
    ("ZZ", [0, n - 1]), # end-to-end correlator
    [("ZZ", [q, q + 1], 1.0) for q in range(n - 1)], # an Ising-chain energy
]

# 3) Compile once, then evaluate for many parameter vectors.
qc.compile(observables=observables, preset="gpu", dtype="float64")
thetas = torch.linspace(0.1, 1.2, qc.n_params, dtype=torch.float64)
vals = qc.expvals(thetas) # shape: (3,), one value per observable

# Without the builder: the gate list directly, plus the register width.
program = compile_program(circuit=qc.gates, observables=observables,
                           n_qubits=n, preset="gpu")

Zero-filtering

After propagation, zero-filtering removes from the compiled program every term that cannot contribute to an expectation value in the reference state. Unlike the truncations of § 2.2, it introduces no approximation: every removed term contributes zero at every parameter value. The reference state is ρ0=∣0⟩⟨0∣⊗n\rho_0 = \lvert0\rangle\langle0\rvert^{\otimes n}. For such a state, any Pauli string containing at least one XX or YY factor has zero expectation value, so only strings in {I,Z}⊗n\{I,Z\}^{\otimes n} contribute:

Tr⁡[ρ0Pi]={1,Pi∈{I,Z}⊗n,0,otherwise.(13)\operatorname{Tr}[\rho_0 P_i] = \begin{cases} 1, & P_i \in\{I,Z\}^{\otimes n},\\ 0, & \text{otherwise}. \end{cases} \tag*{(13)}

If Eq. (13) is applied only to the output rows, every evaluation still propagates the branches that lead only to strings with Tr⁡[ρ0P]=0\operatorname{Tr}[\rho_0 P] = 0, and their contribution is then multiplied by zero. Zero-filtering removes these branches at compile time with one rule, applied from step LL to step 11: a string before step ℓ\ell is kept if and only if at least one of the strings it produces in step ℓ\ell is kept. Figure 3 applies the rule to one step. PAP_A is kept because it produces Z⊗IZ \otimes I, for which Tr⁡[ρ0P]=1\operatorname{Tr}[\rho_0 P] = 1. PBP_B is removed because both strings it produces have Tr⁡[ρ0P]=0\operatorname{Tr}[\rho_0 P] = 0. The branch from PAP_A to X⊗ZX \otimes Z is removed as well, since X⊗ZX \otimes Z is not kept.

Zero-filtering at compile time

Figure 3. Zero-filtering at compile time. Solid blue, strings reaching a kept output row; dashed red, strings removed because Tr⁡[ρ0P]=⟨00∣P∣00⟩=0\operatorname{Tr}[\rho_0P] = \langle00|P|00\rangle= 0 for them or for every string they produce.

In the notation of § 3.1, the rule is a recursion on the survival mask mℓ∈{0,1}Nℓ\mathbf{m}_{\ell} \in\{0,1\}^{N_\ell}, which marks the strings kept before step ℓ\ell. On the output rows the mask is Eq. (13) itself, [mL+1]r=Tr⁡[ρ0Pr][\mathbf{m}_{L+1}]_r = \operatorname{Tr}[\rho_0 P_r], and the earlier masks follow as

mℓ=sgn⁡((∣Mconst(ℓ)∣+∣Mcos⁡(ℓ)∣+∣Msin⁡(ℓ)∣)Tmℓ+1),ℓ=L,L−1,…,1,(14)\mathbf{m}_{\ell} = \operatorname{sgn}\left(\left(\left|M_{\mathrm{const}}^{(\ell)}\right| + \left|M_{\cos}^{(\ell)}\right| + \left|M_{\sin}^{(\ell)}\right|\right)^{\mathsf{T}}\mathbf{m}_{\ell+1}\right), \qquad\ell= L,L-1,\ldots,1, \tag*{(14)}

where T{}^{\mathsf{T}} denotes the transpose, which carries a mask on the strings after step ℓ\ell back to the strings before it, and ∣⋅∣|\cdot| is the entrywise absolute value. The nonzero entries of the matrix in parentheses mark the pairs of strings that step ℓ\ell connects; the engine forms it as a boolean OR over the nonzero patterns of the three components, with the index map standing in for MconstM_{\mathrm{const}} and Mcos⁡M_{\cos} of a rotation step.

The mask depends only on which strings each step connects, and this makes the pruning exact. The absolute values remove the signs of Pauli conjugation, and taking the components separately removes the factors cos⁡θℓ\cos\theta_\ell and sin⁡θℓ\sin\theta_\ell of Eq. (11), so the matrix in parentheses does not depend on θ\theta. With either left in, the product in Eq. (14) could vanish for particular values of θ\theta, for example where cos⁡θℓ=0\cos\theta_\ell= 0, and remove a string that contributes at other values. A string with [mℓ]k=0[\mathbf{m}_\ell]_k = 0 has no path of any sign to an output row with Tr⁡[ρ0Pr]=1\operatorname{Tr}[\rho_0P_r] = 1, so its contribution is zero for every θ\theta, and it is removed before evaluation.

Earlier work notes that, for ρ0\rho_0, the graph representation of the expectation value “can be re-evaluated only on the paths leading to” the strings in {I,Z}⊗n\{I,Z\}^{\otimes n} [28], and PauliPropagation.jl provides this reduction for its surrogate as zerofilter! [41]. In PADO-Pauli the program is a sequence of sparse matrices that every evaluation reads in full, so the reduction is applied to the matrices themselves: the recursion of Eq. (14) removes the strings and entries that do not lead to a kept output row at compile time, as a default stage of compile_program.

On the Erdős–Rényi QAOA families measured here the pass leaves an evaluation working set roughly one to three orders of magnitude smaller than the propagated basis, and the reduction widens with nn on the family of Table 2, whose qubit sweep is in § 4.2.

Evaluation, batching, and differentiation

Evaluation and differentiation. At a parameter vector θ\theta, PADO-Pauli starts from the survival mask mL+1\mathbf{m}_{L+1} of § 3.2, which marks the output rows with Tr⁡[ρ0Pr]=1\operatorname{Tr}[\rho_0P_r] = 1, and multiplies it by the transposed step matrices from step LL to step 1. The result is the adjoint vector of adjoint differentiation for circuit simulators [42],

w(θ)=M(θ)TmL+1,(15)\mathbf{w}(\theta) = \mathbf{M}(\theta)^{\mathsf{T}}\mathbf{m}_{L+1}, \tag*{(15)}

where M(θ)\mathbf{M}(\theta) denotes the full compiled sparse map. Since the step matrices do not depend on the parameters (the angles enter only as scalar cos / sin multipliers after the sparse multiply), PADO-Pauli transposes and caches them once and reuses them on every call. The hybrid preset is the exception: step matrices with more rows than its block size are streamed in blocks and transposed on every call (§ 3.1).

For NobsN_{\mathrm{obs}} observables sharing the same compiled union basis, PADO-Pauli assembles their coefficients into a dense matrix

V0∈RNin×Nobs,(16)V_0 \in\mathbb{R}^{N_{\mathrm{in}} \times N_{\mathrm{obs}},} \tag*{(16)}

where NinN_{\mathrm{in}} is the number of rows of the union basis that survive zero-filtering, and then recovers all NobsN_{\mathrm{obs}} expectation values by one final dense multiplication

E(θ)=w(θ)TV0∈R1×Nobs.(17)E(\theta) = \mathbf{w}(\theta)^{\mathsf{T}}V_0 \in\mathbb{R}^{1 \times N_{\mathrm{obs}}}. \tag*{(17)}

The NobsN_{\mathrm{obs}} observables thus share one sparse propagation through the circuit, and their coefficients enter only through the columns of V0V_0.

PyTorch integration and automatic differentiation. The evaluation runs in PyTorch and stays inside its computational graph.

If L\mathcal{L} denotes a scalar training objective derived from the program’s output vout\mathbf{v}_{\mathrm{out}}, then gradients with respect to circuit parameters take the form

∂L∂θk=∂L∂vout∂∂θk[ML(θL)⋯M1(θ1)vin].(18)\frac{\partial\mathcal{L}}{\partial\theta_k} = \frac{\partial\mathcal{L}}{\partial\mathbf{v}_{\mathrm{out}}} \frac{\partial}{\partial\theta_k} \left[\mathbf{M}_L(\theta_L)\cdots\mathbf{M}_1(\theta_1)\mathbf{v}_{\mathrm{in}}\right]. \tag*{(18)}

Two differentiation modes. PADO-Pauli offers two implementations of this gradient, selected by a diff_mode switch. The default, vjp, wraps this evaluation in a custom autograd primitive. The forward pass runs detached and saves, besides its inputs, only the adjoint vectors entering the parameterized steps and the cos / sin factors it already formed. A backward pass then replays the steps against them, accumulating ∂L/∂θk\partial L/\partial\theta_k through −sin⁡(θk)(⋅)+cos⁡(θk)(⋅)-\sin(\theta_k)(\cdot) + \cos(\theta_k)(\cdot). The first forward-plus-backward pass also converts the step matrices to the sparse form the backward replay reads and caches them, separately from the forward cache above; the first times of Table 2 include this build. The alternative, autograd, lets PyTorch trace the chain of sparse matrix products and retain its full autograd graph. A backward pass for Pauli propagation in place of a traced graph was reported concurrently and independently in [34].

Gradient correctness. The reference for PADO-Pauli’s gradient is a central finite difference of the compiled program’s own objective. A parameter-shift rule on the circuit would estimate the gradient of the exact circuit instead. On a 12-qubit, depth-2 MaxCut-QAOA instance (Erdős–Rényi graph, edge probability 0.4, seed 7; 78 parameters drawn uniformly from [−π,π][-\pi, \pi] with numpy.random.default_rng(123); wmax⁡=5w_{\max}=5, float64, step δ=10−5\delta= 10^{-5}) the analytic gradient agrees with the finite difference to 4.3×10−114.3 \times10^{-11} over all 78 components, at the level of the finite-difference error in double precision, and vjp and autograd agree to ∼10−16\sim10^{-16}. Any remaining discrepancy from the exact circuit’s gradient is truncation error.

Batched embedding inputs and parameter batches. PADO-Pauli assembles the embedding inputs of a dataset and the parameters into batches of angles and evaluates them together on the compiled program.

An embedding batch of size BeB_e and a parameter batch of size BpB_p supplied together are evaluated as a Cartesian product in one pass, giving an output of shape (Be,Bp,Nobs)(B_e, B_p, N_{\mathrm{obs}}). Each embedding value supplies the cos / sin factors of its rotation step, so the output is a nonlinear function of the embedding angles [43]; the BeB_e inputs enter through the batch dimension of the sparse matrix products before the dense wTV0\mathbf{w}^{\mathsf{T}}V_0 readout. § 4.2 quantifies the gain over calls with a single vector within the engine, and § 5 the gain against the per-sample loops of other engines.

In Listing 2 a torch.nn.Linear maps two features to the four embedding angles of a two-qubit program and one optimizer trains both groups. The gradient on the eight classical weights agrees with a central difference of the loss to 1.2×10−101.2 \times10^{-10}, so no weight is disconnected, and 300 steps take the binary cross-entropy from 1.709 to 0.245 on a task like XOR (256 points).

Listing 2: A classical layer upstream of the compiled program, trained jointly.

qc = Circuit(n_qubits=2)
qc.ry(0, embedding_idx=0); qc.ry(1, embedding_idx=1)
qc.cnot(0, 1)
qc.ry(0, embedding_idx=2); qc.ry(1, embedding_idx=3)  # the same features enter again
qc.ry(0, param_idx=0); qc.ry(1, param_idx=1)
qc.compile(observables=["ZZ", [0, 1]], preset="gpu")

lin = torch.nn.Linear(2, 4).to(device="cuda", dtype=torch.float64)
thetas = torch.nn.Parameter(torch.zeros(2, dtype=torch.float64, device="cuda"))
opt = torch.optim.Adam([{"params": lin.parameters()}, {"params": [thetas]}], lr=0.05)

for step in range(300):
    opt.zero_grad(set_to_none=True)
    expv = qc.expvals(thetas, embedding=lin(x)[:, 0])  # classical layer feeds the angles
    prob = torch.clamp((expv + 1) * 0.5, 1e-6, 1 - 1e-6)
    loss = torch.nn.functional.binary_cross_entropy(prob, y)
    loss.backward(); opt.step() # reaches lin.weight and thetas

Example: data embedding and batched inputs. Quantum machine learning models separate data inputs from trainable parameters, interleaving the two kinds of rotation and uploading the same input into several of them [44]; the embedding_idx and param_idx tags of § 3.1 encode this split. A batch of inputs is passed as embedding with shape (Be,Nemb)(B_e, N_{\mathrm{emb}}), NembN_{\mathrm{emb}} being one more than the largest embedding_idx in the circuit (qc.n_embedding), with one thetas shared across the batch.

The XOR classifier of Listing 3 embeds a two-dimensional input through two rotations driven by embedding inputs, entangles with CNOTs, maps ⟨Z0⟩∈[−1,1]\langle Z_0\rangle\in[-1,1] affinely to a class probability, and trains its parameters against a binary cross-entropy loss on 512 points drawn uniformly from [−π,π]2[-\pi,\pi]^2 and labeled 1 where x1x2<0x_1x_2 < 0, in minibatches of 128.

# Rotations driven by embedding inputs use embedding_idx; only the param_idx angles are
# trained.
qc = Circuit(n_qubits=2)
qc.rx(0, embedding_idx=0).rx(1, embedding_idx=1).cnot(0, 1)
qc.ry(0, param_idx=0).ry(1, param_idx=1).cnot(1, 0)
qc.ry(0, param_idx=2)
qc.compile(observables=[("Z", [0])], preset="gpu")

thetas = torch.nn.Parameter(0.1 * torch.randn(3, dtype=torch.float64, device="cuda"))
opt = torch.optim.Adam([thetas], lr=0.03)
for epoch in range(320):
    # X_batch: (B, 2) embedding inputs; y_batch: (B,) labels in {0, 1}
    expv = qc.expvals(thetas, embedding=X_batch)[:, 0]  # (B,)
    prob = torch.clamp((expv + 1.0) * 0.5, 1e-5, 1.0 - 1e-5)
    loss = torch.nn.functional.binary_cross_entropy(prob, y_batch)
    opt.zero_grad(set_to_none=True); loss.backward(); opt.step()

Two easier companion tasks, a single-qubit model fitting y=sin⁡xy = \sin x and a linearly separable two-class problem, pass their inputs through embedding in the same way; Figure 4 shows the three trained models, the regression at a mean squared error of 7.0×10−197.0 \times10^{-19} and the two classifiers at 99.7% and 94.9% training accuracy.

Three panels showing trained models for sine regression, linear classification, and XOR classification

Figure 4. Trained models of the three embedding tasks of § 3.3; (c) is the model of Listing 3. In (b) and (c): shading, the model’s P(class=1)P(\mathrm{class}=1); points, the training set (class 0 blue, class 1 orange); black contours, the P=0.5P=0.5 decision boundary.

Ablation of zero-filtering. We quantify what zero-filtering contributes within the engine by compiling the same program with the pass disabled (zero_filter=False, which keeps every propagated term). The instance is the 16-qubit, depth-5 member of an Erdős–Rényi MaxCut-QAOA family (edge probability 0.3, numpy.random.default_rng(42)): a Hadamard layer on all qubits, then per layer one ZZZZ cost rotation per edge and one XX mixer rotation per qubit, each

with its own angle. We compile it under the gpu preset in float32 on an AMD Instinct MI300X and sweep wmax⁡=4w_{\max} = 4–7 (Table 2). The two variants return identical expectation values at every wmax⁡w_{\max}, and their gradients (vjp mode) agree to ≤3.6×10−7\le3.6 \times10^{-7}, at single-precision round-off, an empirical confirmation that zero-filtering introduces no approximation error.

On the cost side, zero-filtering shrinks the evaluation working set by two to three orders of magnitude over this sweep, from 100×100\times at wmax⁡=4w_{\max} = 4 to 1,075×1{,}075\times at wmax⁡=7w_{\max} = 7, while the explicitly stored entries of the compiled step matrices fall only 2.22.2–3.8×3.8\times. Each evaluation reads every stored entry of those matrices, and the measured wall-clock saving is closer to the reduction in stored entries than to the reduction in terms.

The batched forward pass improves by about $1.5\times((1.47$–1.65×1.65\times) across the sweep, and steady-state memory by 1.41.4–1.5×1.5\times at wmax⁡=5w_{\max} = 5–7 (3.0×3.0\times at $w_{\max} = 4). The warm forward-plus-backward pass, taken after the backward pass’s cached matrices exist, gains less: 1.1×1.1\times and 1.4×1.4\times at wmax⁡=6w_{\max} = 6 and 7, and at wmax⁡=4w_{\max} = 4 and 5 it is nearly independent of the term count, consistent with a fixed per-query overhead dominating there.

Zero-filtering also lowers peak memory: at wmax⁡=7w_{\max} = 7 the unfiltered forward-plus-backward pass peaks at 119.8 GB of allocated GPU memory against 74.4 GB with zero-filtering, and the batched forward pass over 200 parameter vectors at 156.0 GB against 126.5 GB. (Allocated memory is what PyTorch’s allocator has handed to live tensors; the reserved memory of § 4.2 adds the allocator’s cached blocks, and the occupancy of § 5 is the device total read from the driver.)

The first forward-plus-backward pass, which builds the matrices the backward pass reads, is a one-time cost of 0.8 s at wmax⁡=4w_{\max} = 4 to 161.1 s at wmax⁡=7w_{\max} = 7, the whole gradient time for a workload that computes a single gradient. Disabling zero-filtering shortens compilation by 0.2–1.0 s, less than zero-filtering saves on that first pass alone (0.35–58 s).

Cost of the two differentiation modes. Table 3 sweeps wmax⁡=4w_{\max} = 4–7 on the instance of Table 2. The warm forward-plus-backward pass of vjp is one to nearly three orders of magnitude faster, a gap that widens with the working set, and its peak is smaller throughout, by 7% at wmax⁡=4w_{\max} = 4 and 11–12% from wmax⁡=5w_{\max} = 5 on. The autograd times coincide with the first forward-plus-backward pass of Table 2 (within 1.1% from wmax⁡=5w_{\max} = 5 on and 8% at $w_{\max} = 4, from the unrounded times), which indicates that the time gap is the cost of forming the sparse matrices that vjp caches and the traced path re-forms on every call; the smaller peak is consistent with vjp not retaining the autograd graph. The two gradients agree to 4.8×10−74.8 \times10^{-7}, single-precision round-off; autograd is kept as an independent cross-check.

Fwd+bwd [s]Peak [GB]
wmax⁡w_{\max}vjpautogradvjpautogradMemory savedSpeedup
40.0680.760.3410.3687%11×
50.0715.582.1432.41311%78×
60.08735.814.716.812%412×
70.193161.074.484.412%832×

Table 3. The two differentiation modes on the instance of Table 2, under its timing protocol. Fwd+bwd, one warm forward-plus-backward pass; Peak, its peak allocated GPU memory; Memory saved, one minus the ratio of the two peaks; Speedup, the autograd-to-vjp time ratio.

Interface, presets, and scope

This subsection documents the code architecture, the supported gate set, the cost of the execution presets, the quasi-probability sampler, and the reference helpers; Appendix § 10 catalogs the objects the interface compiles to.

Code architecture and backend implementation. PADO-Pauli is a Python frontend over a C++ extension. The frontend defines circuits and observables; during compilation the extension performs the operations applied at each gate (Pauli mask rewrites, branch generation under rotations, merging of duplicate terms, truncation, and step construction for the two single-qubit noise channels) and returns the index and value tensors of each step.

The extension finds identical strings by comparing their mask rows, merges them, and applies the truncation rules in the same pass, so branches that fail a truncation rule are dropped inside the extension call and never reach Python. Python assembles the returned tensors into the sparse step matrices of § 3.1, so evaluation and differentiation run as sparse tensor kernels on the preset’s compute device inside PyTorch’s autograd graph.

Supported gate set and scope. The engine has three kinds of primitive: Pauli rotations, a small set of Clifford gates, and two single-qubit noise channels.

  • Pauli rotations. PauliRotation accepts an arbitrary Pauli string generator GG and realizes e−iθG/2e^{-i\theta G/2}, so any single- or multi-qubit Pauli rotation (e.g. X, ZZ, XYZ) is a primitive. These are the only branching unitary elements and hence the main source of term growth; amplitude damping also branches, but only by splitting a Z on the damped qubit into Z and the identity (§ 2.3). A rotation at a Clifford angle, such as RZZ(−π/2)R_{ZZ}(-\pi/2), is still a rotation to the engine; its vanishing branch is removed only by coefficient truncation (§ 6.1).

  • Clifford primitives. The engine natively conjugates H, S, X, CNOT, and CZ; other Cliffords (Y, Z, SX, SWAP, and the like) must be written as short products of these, which adds no term growth since a Clifford maps each Pauli string to one Pauli string.

  • Noise channels. DepolarizingNoise and AmplitudeDampingNoise represent the two single-qubit channels of § 2.3.

Other gates (arbitrary non-Clifford two-qubit unitaries, operations with many controls) must be decomposed into these primitives; such constructions can branch heavily.

Preset comparison. Table 4 measures what each preset costs on the 16-qubit, depth-5 instance of Table 2 at wmax⁡=4w_{\max}=4–66, compiled once per preset at the shared float64 default on the MI300X and timed as the median of twenty calls (five for the batched pass) after one discarded warm-up. The three presets’ values and gradients agree to 5.6×10−165.6 \times10^{-16}. Moving storage and compute to the GPU (the cpu against the gpu rows) speeds up the batched forward pass (Eval200_{200}) by 25–30× across the sweep, the single evaluation (Eval) by 1.8–16×, and the warm forward-plus-backward pass (Fwd+bwd) by 1.5–14×, the latter two growing with the evaluation working set. The hybrid preset is close to gpu on Eval200_{200} and, from wmax⁡=5w_{\max}=5 on, between cpu and gpu on Eval and Fwd+bwd.

wmax⁡w_{\max}PresetCompile [s]Eval [ms]Eval200_{200} [s]Fwd+bwd [ms]
4cpu1.3240.22.25104
4hybrid0.8243.50.11114
4gpu0.6222.80.08969.2
5cpu3.32117.125.8327
5hybrid2.1164.20.91156
5gpu3.5823.50.8772.4
6cpu30.69611.6150.61,302
6hybrid10.01127.45.91280
6gpu5.5137.65.8296.1

Table 4. Preset comparison on the instance of Table 2 (float64, MI300X). Eval, one forward pass on one parameter vector; Eval200_{200}, one batched pass over 200; Fwd+bwd, one warm forward-plus-backward pass in vjp mode; cpu at PyTorch’s default of 20 threads.

Quasi-probability reconstruction. Expectation values of ZZ-strings also determine the circuit’s output distribution: the Born rule probabilities are the Walsh–Hadamard transform of the correlators ⟨ZS⟩θ\langle Z_{S}\rangle_{\theta} over all qubit subsets SS (ZSZ_{S} the product of ZZ on the qubits in SS) [45], and keeping only subsets of order at most kk gives the kk-order truncation q(k)(x)=2−n∑∣S∣≤k(−1)∑i∈Sxi⟨ZS⟩θq^{(k)}(x)=2^{-n}\sum_{|S|\leq k}(-1)^{\sum_{i\in S}x_i}\langle Z_{S}\rangle_{\theta}, a signed quasi-probability that sums to one but may be negative [45]; truncated Fourier series of output distributions and their marginals are computed as quasi-probability distributions in [46]; the number of samples needed to estimate probabilities from it grows with its ℓ1\ell_{1} norm [47]. Its cost is the ∑m=1k(nm)\sum_{m=1}^{k}\binom{n}{m} retained correlators, which the compiled program supplies directly.

build_quasi_sampler implements this reconstruction: it compiles a sampler from the circuit and the ZZ-string subsets to track (z_combos, a list of qubit subsets), accepts the presets of Table 1, and provides compute_moments for the correlators and quasi_prob for the reconstructed distribution (Listing 4). For training, quasi_prob_from_moments reconstructs q(k)(x)q^{(k)}(x) from cached moments across many parameter and bitstring batches. At full order the reconstruction is exact: on a 10-qubit test circuit (a Hadamard layer, then two layers of per-qubit ZZ and XX rotations and a ring of ZZZZ rotations) compiled without max-weight truncation, it agrees with the exact PennyLane probabilities over all 2102^{10} bitstrings to a total variation distance of 5×10−155 \times10^{-15}, and to 0.02 when truncated at order k=8k=8 of 10.

Listing 4: Moment computation and quasi-probability reconstruction.

import torch
from itertools import combinations
from padopauli import Circuit, build_quasi_sampler

n_qubits, max_order = 4, 4
qc = Circuit(n_qubits=n_qubits)
qc.h(0).cnot(0, 1).rzz(1, 2, param_idx=0).rxx(2, 3, param_idx=1)

z_combos = [list(c) for k in range(1, max_order + 1)
            for c in combinations(range(n_qubits), k)]
sampler = build_quasi_sampler(n_qubits=n_qubits, circuit=qc.gates,
                              z_combos=z_combos, max_order=max_order, preset="gpu")

# x_batch: (B, n_qubits) uint8 bitstrings, the x at which q(x) is wanted.
thetas = torch.tensor([0.3, -0.4], dtype=torch.float64)
moments = sampler.compute_moments(thetas) # Z-correlator moments
q = sampler.quasi_prob(x_batch, thetas, order=max_order) # reconstruction in one call

PennyLane reference helpers. For small systems the engine includes reference helpers that call PennyLane, an optional dependency installed through the padopauli[reference] extra. A compiled program’s expvals_reference method returns exact expectation values; the top-level helpers pennylane_expvals, pennylane_sample, and pennylane_probs return exact expectation values, samples, and probabilities from a gate list. All are capped at n≤20n \le20 by default (max_qubits sets the cap) and let a user check correctness before a large run.

Truncation Accuracy and Resource Cost

Apart from floating-point precision, the only approximation PADO-Pauli introduces is the discarding of Pauli terms, so its error is bounded by Eq. (5). The accuracy results below are measured against exact baselines.

Accuracy against exact baselines: convergence and exact checks

The worst-case bound can be loose, so we check accuracy empirically in two ways. For small systems, the PennyLane [48] reference helpers of § 3.4 supply an exact statevector baseline, against which we measure the true error of a truncation directly. For larger systems, where no exact baseline is available, we monitor apparent convergence [3, 32]: we recompute the expectation values under progressively looser truncation (larger wmax⁡w_{\max}, smaller ϵ\epsilon) and accept the operating point once they stabilize. That is a diagnostic rather than a guarantee: loosening the truncation does not always improve accuracy, and some instances that reproduce hardware results are not converged [32]. § 6.1 runs it at 127 qubits.

Convergence of coefficient truncation to the exact value. The first check uses a fixed instance (Figure 5): a 16-qubit, depth-3 member of the Erdős–Rényi MaxCut-QAOA family of Table 2 (edge probability 0.3, seed 42) at the fixed parameter vector θk=0.2sin⁡k\theta_k = 0.2\sin k, against an exact default.qubit statevector baseline. All accuracy studies here run the compiled program and its baselines in float64, so the reported errors are truncation errors, and a retained count is the size of the zero-filtered evaluation working set. With max-weight truncation disabled (wmax⁡=nw_{\max}=n, the largest reachable weight), coefficient truncation is the only approximation. Over a sweep of its threshold from ϵ=10−1\epsilon=10^{-1} to 10−610^{-6}, the absolute error on ⟨∑(i,j)∈EZiZj⟩\langle\sum_{(i,j)\in E} Z_iZ_j\rangle (the graph’s edge set) falls from 0.45 at ϵ=10−1\epsilon=10^{-1}, where every term is discarded, to 1.1×10−61.1\times10^{-6} at ϵ=10−6\epsilon=10^{-6} on 152 retained Pauli strings. The convergence is not strictly monotone, a known feature of coefficient truncation [32] consistent with Eq. (5) being an upper bound.

Convergence of coefficient truncation

Figure 5. Convergence of coefficient truncation on a fixed 16-qubit, depth-3 Erdős–Rényi MaxCut-QAOA instance with max-weight truncation disabled. (a) truncated expectation value against the exact statevector value (dashed); (b) absolute error. In both panels the ϵ\epsilon axis is logarithmic and reversed, running from 10−110^{-1} at the left to 10−610^{-6} at the right.

Convergence to the exact value across system sizes. Figure 6 applies the same check to the max-weight threshold: wmax⁡=1w_{\max}=1 to 5 on the same family (depth 3, edge probability 0.3, seed 42) at the same θk=0.2sin⁡k\theta_k=0.2\sin k, now at n=20n=20, 24, and 28 qubits, against exact statevector baselines from PennyLane’s lightning.amdgpu (dashed lines). At every size the truncated ⟨∑(i,j)∈EZiZj⟩\langle\sum_{(i,j)\in E} Z_iZ_j\rangle converges onto its exact value, though not monotonically: the curves overshoot and cross before converging (most visibly n=28n=28 at wmax⁡=2w_{\max}=2 and n=24n=24 at wmax⁡=3w_{\max}=3), so successive changes shrink only from wmax⁡=3w_{\max}=3 onward. By wmax⁡=5w_{\max}=5 the absolute error is at most 9.74×10−49.74\times10^{-4}, against exact values 0.367, 0.176, and 1.211 at n=20n=20, 24, and 28; the largest error is at n=24n=24, where the observable is also smallest.

Convergence to the exact value across system sizes on the depth-3 Erdős–Rényi MaxCut-QAOA family

Figure 6. Convergence to the exact value across system sizes on the depth-3 Erdős–Rényi MaxCut-QAOA family (seed 42, θk=0.2sin⁡k\theta_k = 0.2 \sin k) at n=20,24,28n = 20, 24, 28. Solid, the truncated ⟨∑(i,j)∈EZiZj⟩\langle\sum_{(i,j)\in E} Z_i Z_j\rangle as wmax⁡w_{\max} is raised from 1 to 5; dashed, the exact lightning.amdgpu values in matching color.

Two further graph draws (seeds 7 and 123) show the same convergence: over the nine size–seed pairs the wmax⁡=5w_{\max}=5 error ranges from 3.2×10−73.2\times10^{-7} to 9.74×10−49.74\times10^{-4}, and the numbers of retained terms at wmax⁡=5w_{\max}=5 (5.8×1035.8\times10^3 to 2.4×1042.4\times10^4 Pauli strings) agree across seeds to within 8% at every size. These errors are measured at the small angles θk=0.2sin⁡k\theta_k=0.2\sin k; on a different instance at trained angles, the same wmax⁡=5w_{\max}=5 leaves an error of 0.036 on a 30-edge objective (§ 6.3).

Noisy circuits: correctness and the truncation benefit of noise. Two things are checked: that PADO-Pauli propagates noise channels correctly, and that noise lowers the truncation error at a fixed term budget, as § 2.3 predicts. Both use a 10-qubit, depth-5 Erdős–Rényi MaxCut-QAOA instance (edge probability 0.5, seed 42) at θk=0.2sin⁡k\theta_k=0.2\sin k, with a single-qubit channel (depolarizing of per-axis rate p/3p/3, or amplitude damping of rate γ\gamma) on every qubit after each layer, against PennyLane’s default.mixed density matrix simulator (Figure 7). The truncation benefit is analyzed in § 4.3.

Figure 7. Noisy circuit studies on a 10-qubit, depth-5 Erdős–Rényi MaxCut-QAOA instance against PennyLane’s exact default.mixed simulator. (a) depolarizing noise of rate pp and (b) amplitude damping of rate γ\gamma after every layer, PADO-Pauli as markers, the simulator as the line; (c) absolute error against retained Pauli strings under a coefficient truncation sweep, noiseless (gray) and noisy at p=0.1p = 0.1 (red); the leftmost red marker, drawn at one retained string, is the empty program at ϵ≥0.05\epsilon\ge0.05.

Correctness against an exact density matrix simulator. Sweeping the depolarizing rate from p=0p=0 to 0.2 at ϵ=10−6\epsilon=10^{-6}, the truncated ⟨∑(i,j)∈EZiZj⟩\langle\sum_{(i,j)\in E} Z_iZ_j\rangle agrees with the density matrix value to within 2.52×10−52.52\times10^{-5} over the whole sweep while the observable decays from 0.513 to 0.031 (Figure 7a), confirming that the diagonal Pauli transfer action of Eq. (7) is implemented correctly. For amplitude damping, a non-unital channel propagated through its unital Heisenberg dual (§ 2.3), the agreement is within 3.72×10−53.72\times10^{-5} over the whole sweep γ∈[0,0.3]\gamma\in[0,0.3] (Figure 7b); there the observable rises from 0.513 to 14.5 as each qubit relaxes toward ∣0⟩|0\rangle.

Growth of Pauli terms and resource scaling

This subsection measures how large the compiled program becomes after propagation, truncation, and zero-filtering, and what that costs in runtime and memory.

Max-weight sweep at fixed system size. The first study holds the circuit fixed and varies only wmax⁡w_{\max}, from 2 to 5. The circuit is a 15-qubit, depth-5 instance of the Erdős–Rényi MaxCut-QAOA family of Table 2 (edge probability 0.3, seed 42) with cost observable ∑(i,j)∈EZiZj\sum_{(i,j)\in E} Z_i Z_j; max-weight truncation is structural, so the term counts do not depend on the angles. The numbers of non-identity Pauli strings of weight at most wmax⁡w_{\max}, upper bounds on the term counts reported below, are

∑w=1wmax⁡(nw)3wand∑w=1wmax⁡(nw),(19)\sum_{w=1}^{w_{\max}} \binom{n}{w}3^w \quad\text{and}\quad \sum_{w=1}^{w_{\max}} \binom{n}{w}, \tag*{(19)}

for the full Pauli basis and its diagonal ZZ-type sector, respectively.

Raising wmax⁡w_{\max} from 2 to 5 gives unique propagated bases of 135, 3,247, 51,794, 401,871 terms (factors 24, 16, 7.8), while the zero-filtered sector grows more slowly, 15, 120, 575, 1,940 (factors 8, 4.8, 3.4): exactly the complete diagonal ZZ-type sector one weight level below the threshold, ∑w=1wmax⁡−1(nw)\sum_{w=1}^{w_{\max}-1} \binom{n}{w}.

Scaling with qubit count at wmax⁡=3w_{\max} = 3. The second study fixes wmax⁡=3w_{\max} = 3 and raises the qubit count from 10 to 100 in steps of 10 on the same family (depth 5, edge probability 0.3, one graph per size, seed 42). The threshold wmax⁡=3w_{\max} = 3 is a cost setting, not an accuracy one: on the depth-3 family of § 4.1 its worst error over the nine size–seed pairs is 3.8×10−23.8 \times10^{-2}, against 9.74×10−49.74 \times10^{-4} at wmax⁡=5w_{\max} = 5. The number of unique propagated terms rises from 574 at 10 qubits to 1,320,934 at 100, while the zero-filtered diagonal count grows from 43 to 5,050 (Figure 8a). From 20 qubits on, this count equals n+(n2)n + \binom{n}{2}, the size of the full diagonal sector of weight at most 2, since the dense graph makes every single- and two-qubit ZZ string reachable.

Term counts versus the upper bound and peak reserved GPU memory during compilation

Figure 8. (a) term counts vs. the upper bound (b) peak reserved GPU memory during compilation. The qubit sweep at wmax⁡=3w_{\max}=3 from 10 to 100 qubits (depth-5 Erdős–Rényi MaxCut-QAOA, edge probability 0.3) under the gpu preset: (a) propagated and zero-filtered term counts against the combinatorial upper bound, (b) peak reserved GPU memory during their compilation, with coefficients in float32 on an AMD Instinct MI300X.

The ratio of propagated terms to the upper bound ∑w=1wmax⁡(nw)3w\sum_{w=1}^{w_{\max}} \binom{n}{w}3^w stabilizes near 0.30 for the larger systems, while the ratio of zero-filtered to propagated terms falls monotonically from 0.075 at 10 qubits to 0.0038 at 100.

Runtime and memory implications. The same sweep gives the cost of this term growth (Figure 8). Under the gpu preset in float32 on an AMD Instinct MI300X, the propagation stage of compilation takes 0.98 s at 10 qubits, 6.8 s at 60, and 38.4 s at 100; including the zero-filtering pass, the total compile time is 1.55, 10.3, and 47.9 s (medians of five compilations). On this sweep zero-filtering costs no more than the propagation it follows.

Under the gpu preset the compiled program and its construction intermediates are all held in GPU memory. The peak reserved GPU memory during compilation rises from 0.002 GB at 10 qubits to 65.3 GB at 100 (Figure 8b) and is set by the construction intermediates.

The times and memory above are the one-time compilation cost. After compilation, we evaluate each program on a single parameter vector and on a batch of 200 and report, for each, the median of five timed calls after a discarded warm-up.

A single evaluation costs 8.6 ms at 10 qubits and 822 ms at 100, a factor of 95. Over the sweep the qubit count grows 10×10\times, the number of compiled steps (one per gate) 75×75\times, and the entries stored across those steps 3,176×3{,}176\times. The evaluation time tracks the step count: the time per step is 78 μ\mus at 10 qubits and 100 μ\mus at 100, a factor of 1.3, while the time per stored nonzero falls from 2.3 μ\mus to 68 ns, a factor of 33.

A nearly constant cost per step holds only at small wmax⁡w_{\max}: in the wmax⁡w_{\max} sweep of Table 2 the step list is fixed at 266 steps, yet a single evaluation, timed in that float32 run, grows from 22.0 to 84.3 ms (83 to 317 μ\mus per step) as the stored entries grow by 638×638\times.

Batching gains most where the fixed cost of a call, the part independent of the number of parameter vectors, dominates. At 10 qubits a batch of 200 costs 9.3 ms, 46 μ\mus per vector against 8.6 ms alone, a factor of 186: almost the whole time of a single call is fixed cost. At 100 qubits the batch costs 81.3 s, 406 ms per vector against 822 ms alone, a factor of 2.0, consistent with each step matrix being read once per block of 200 vectors.

In units of the engine’s own evaluation time, the 47.9 s compilation at 100 qubits equals about 60 single evaluations or about 120 batched parameter vectors; at 50 qubits (7.6 s compilation, 198 ms per evaluation) about 40. Beyond that many evaluations, evaluation time dominates, which is the use the engine is designed for: the training runs of § 6 that query the compiled program take 200 to 500 optimizer steps. § 5 gives the number of queries after which the compilation is amortized relative to another engine’s per-query cost.

Accuracy–cost frontier: max-weight vs. coefficient truncation

Figure 9 compares the two truncation strategies on the 16-qubit, depth-3 instance of Figure 5, plotting the true error against the number of retained Pauli strings as each threshold is swept: wmax⁡=1w_{\max}=1 to 6 and ϵ=10−1\epsilon=10^{-1} to 10−610^{-6}. On this instance max-weight truncation converges smoothly and almost monotonically, to 2.7×10−82.7\times10^{-8} at wmax⁡=5w_{\max}=5 (1.2×10−71.2\times10^{-7} at 6); coefficient truncation, keeping the terms of largest magnitude irrespective of weight, reaches a given error with fewer terms, but not monotonically, as noted above. Coefficient truncation reaches 1.1×10−61.1\times10^{-6} at 152 retained terms; max-weight truncation reaches 3.7×10−33.7\times10^{-3} at 113 terms (wmax⁡=3w_{\max}=3) and 9.6×10−59.6\times10^{-5} at 632 (wmax⁡=4w_{\max}=4), and falls below 1.1×10−61.1\times10^{-6} only at 2,385 (wmax⁡=5w_{\max}=5).

Accuracy–cost frontier on the fixed 16-qubit, depth-3 Erdős–Rényi MaxCut-QAOA instance

Figure 9. Accuracy–cost frontier on the fixed 16-qubit, depth-3 Erdős–Rényi MaxCut-QAOA instance: absolute error against retained Pauli strings under a max-weight (green) and a coefficient (blue) sweep; each green marker is annotated with its wmax⁡w_{\max}, and each blue marker at a decade value of ϵ\epsilon with that ϵ\epsilon. The coarsest setting of each sweep (wmax⁡=1w_{\max}=1, ϵ=10−1\epsilon=10^{-1}) retains no terms and is omitted.

Seeds 7 and 123 preserve this ordering at matched budgets above about 100 retained strings (seed 7: 2.0×10−42.0\times10^{-4} at 107 against 6.6×10−36.6\times10^{-3} at 119; seed 123: 2.6×10−52.6\times10^{-5} at 160 against 2.2×10−32.2\times10^{-3} at 132), with the max-weight error 33–84 times the coefficient truncation error. Coefficient truncation is therefore the better choice when the parameters are fixed and a small program is the priority, and max-weight truncation the safer default for training, where a term discarded at the build point receives no gradient.

Effect of noise on truncation cost. Figure 7c repeats the coefficient truncation sweep (ϵ\epsilon from 10−110^{-1} to 10−510^{-5}) on the 10-qubit instance of Figure 7a at p=0p=0 and p=0.1p=0.1, plotting the true error against retained Pauli strings. The noisy curve lies below and to the left of the noiseless one: an absolute error below 2×10−32 \times10^{-3} first needs 84 retained terms without noise but 26 at p=0.1p=0.1, about a threefold reduction in program size. As § 2.3 predicts, each noisy layer multiplies coefficients by factors below one, so the noisy program retains fewer strings at every ϵ\epsilon and a smaller set suffices.

Performance Benchmarks against Other Engines

This section compares PADO-Pauli with three Pauli propagation engines on a common workload. These are cuPauliProp, the GPU engine of the NVIDIA cuQuantum SDK; Qiskit’s CPU pauli-prop path [22], which truncates by a coefficient cutoff and a term cap (10−1410^{-14} and 10810^8 in every reported case); and PauliPropagation.jl [3], run on the CPU (in version 0.8.1 its CUDA extension covers only Pauli rotations and its README describes it as not yet performant [41]). PauliPropagation.jl is timed on two paths: the conventional path re-propagates on every call and returns the gradient through a paired forward and backward sweep (rewindgradient [41]); the experimental surrogate path builds the path graph once and re-evaluates it. § 5.3 additionally compares against exact statevector simulation.

The engines differ in three capabilities, which the timings reflect: GPU execution, a native backward pass, and batched embedding inputs. PADO-Pauli is the only engine with all three. cuPauliProp has the first two; its truncation has a coefficient cutoff and a weight cutoff, with no zero-filtering [23]. Qiskit pauli-prop has none of the three. PauliPropagation.jl has a native backward pass, no batched path, and GPU execution only through that extension; it also deletes off-diagonal strings through zerofilter! and reuses a compiled object on its surrogate path. Within PADO-Pauli, GPU execution alone gives 1.8–16× on single evaluations and 25–30× on the batched pass over the cpu preset (Table 4); the gaps below mix that effect with other implementation differences.

Setup and numerical agreement

Workload. The benchmark circuit is a depth-3 multi-angle QAOA ansatz [49] for an Ising model on a 2D grid with nearest-neighbor (NN) and next-nearest-neighbor (NNN) couplings, starting from the uniform superposition H⊗n∣0⟩⊗nH^{\otimes n}|0\rangle^{\otimes n}. Each layer applies one ZuZvZ_u Z_v rotation per coupling, one ZqZ_q rotation per qubit, and one XqX_q mixer rotation per qubit; every rotation has its own angle, drawn from N(0,0.32)\mathcal{N}(0,0.3^2). The observable is the Ising energy ∑(u,v)∈EJuvZuZv+∑qhqZq\sum_{(u,v)\in E} J_{uv} Z_u Z_v+\sum_q h_q Z_q with Juv∼N(0,1)J_{uv}\sim\mathcal{N}(0,1) (NN), Juv∼N(0,0.32)J_{uv}\sim\mathcal{N}(0,0.3^2) (NNN), and hq∼N(0,0.12)h_q\sim\mathcal{N}(0,0.1^2). Scaling instances range over 2×22\times2 (4q, 6 ZZ couplings), 2×32\times3 (6q), 3×33\times3 (9q), 2×52\times5 (10q), and 3×43\times4 (12q, 29 ZZ couplings); the truncation sweep uses a fixed 16-qubit 4×44\times4 grid.

Hardware and timing protocol. The orchestrator generates each circuit once as an explicit gate list, so every engine propagates the identical circuit; it runs each engine in its own subprocess. All timings and memory readings of the engine comparison were recorded on the NVIDIA A100 of Table 10; the stress test of § 5.3 ran on the AMD Instinct MI300X. Each timing in this subsection and the next is the mean of the last four of five repetitions, the first being discarded as warm-up. The CPU engines ran at their default thread settings. For the two GPU engines each timed forward pass is the forward half of a forward-plus-backward pass (PADO-Pauli in vjp mode, the cuPauliProp driver keeping every per-gate expansion for the backward pass); the CPU engines are timed forward only. Each engine’s run of a case, all five repetitions included, was limited to 900 s on the CPU engines and 600 s on the GPU engines; a case that exceeded the limit is reported as such, and that engine’s larger cases in the same sweep were not started. The tables of § 3 instead report medians over repeated calls after one warm-up.

AMD Instinct MI300XNVIDIA A100 80GB PCIe
Resultsall other resultscomparisons with the three Pauli propagation engines
Device memory191.7 GB80 GB
Host CPUIntel Xeon Platinum 8568Y+, 20 vCPUsIntel Xeon Gold 6338, 24 vCPUs
PyTorch2.11.0 (ROCm 7.2.4)2.11.0 (CUDA 12.6)
Python3.11.153.11.15
Exact referencePennyLane 0.45.1PennyLane 0.45.1

Table 10. Measurement platforms.

Memory measures. All memory readings come from the NVIDIA management library inside the worker. Occupancy is the GPU memory in use at the end of each repetition, averaged over the five. It includes the CUDA context and libraries (about 1.4 GB, common to both workers) and whatever stays referenced between queries: for PADO-Pauli the compiled program and the sparse matrices cached on the first forward-plus-backward pass for the forward and backward passes (§ 3.3), for cuPauliProp the per-gate expansions of the last query, which the driver keeps for the backward pass. The increase over the first pass is the growth in used memory during the first forward-plus-backward pass, from a baseline holding only the context and, for PADO-Pauli, the compiled program: the memory a pass needs. The increase over a later pass is the same difference over a later pass against a baseline taken just before it, so for PADO-Pauli it excludes the program and its cache, while for cuPauliProp the previous query’s expansions are still resident. PADO-Pauli’s memory during compilation, the increase in used memory over compile_program, is given alongside as an upper bound on the resident program.

Term counts, engines, and precision. On the untruncated instances PADO-Pauli and cuPauliProp propagate the same full set of Pauli terms; PauliPropagation.jl runs at the package’s default coefficient cutoff of 10−1010^{-10} [41] and retains fewer at 9 and 10 qubits. PADO-Pauli then applies the zero-filtering of § 3.2 before evaluation; the surrogate path of PauliPropagation.jl likewise evaluates its set after zerofilter!.

Table 5 gives the engines, versions, and coefficient types: the GPU engines run in single precision and the CPU engines in double, so PADO-Pauli and cuPauliProp are compared at the same precision. cuPauliProp also accepts real single-precision coefficients [23]; the harness used its complex single-precision type, twice the size of PADO-Pauli’s float32, and repeated the wmax⁡=7w_{\max}=7 case with the real type (below).

EngineVersionCoefficients
PADO-Paulipadopauli 2.0.0, PyTorch 2.11.0float32
cuPauliProp0.4.0, cuquantum-python-cu12 26.6.0complex64
Qiskit pauli-prop0.2.1, Qiskit 2.5.2float64
PauliPropagation.jl0.8.1, Julia 1.12.7Float64

Table 5. The compared engines [23, 22, 3] and the coefficient type each carries. PADO-Pauli’s float32 is a preset override of its float64 default; the CPU engines use their package defaults.

Exact reference. Every case is also evaluated exactly, without truncation, by a double-precision PennyLane statevector simulation through the reference helpers of § 3.4, which supplies the reference expectation value and, by central differences with δ=10−4\delta=10^{-4}, its first four gradient components; the deviations quoted below are absolute differences from these, a gradient deviation being the largest over the four components. The exact statevector baselines of § 5.3 use pennylane-lightning 0.45.0 and pennylane-lightning-amdgpu 0.45.0 [50].

Numerical agreement. On full (untruncated) propagation the engines agree with each other and with the exact statevector value to the resolution the single-precision engines support. On the instances all five engine paths completed (4 to 10 qubits) their values agree to six decimal places, and the two GPU engines agree likewise at 12 qubits. Against the exact values, the deviation over the five instances is at most 9.6×10−89.6 \times10^{-8} for PADO-Pauli, 1.6×10−71.6 \times10^{-7} for cuPauliProp, and 1.7×10−91.7 \times10^{-9} for the double-precision CPU engines on the instances they completed. Under an equal max-weight threshold on the 16-qubit instance, PADO-Pauli, cuPauliProp, and PauliPropagation.jl return the same value to within 1.3×10−71.3 \times10^{-7} at every wmax⁡w_{\max} from 2 to 6, so PADO-Pauli’s symplectic representation and zero-filtering add no error beyond the truncation itself, which falls from 1.2×10−21.2 \times10^{-2} at wmax⁡=2w_{\max}=2 to 5.9×10−65.9 \times10^{-6} at wmax⁡=6w_{\max}=6. Qiskit pauli-prop has no weight threshold and truncates by a term cap instead, so its rows in that sweep are not compared.

Evaluation throughput, training, and memory

Evaluation throughput. Against the GPU engine, PADO-Pauli’s evaluation speedup grows with system size, from 2.7×2.7\times at 4 qubits to 10.1×10.1\times at 12 (3.5×3.5\times and 4.3×4.3\times at 9 and 10; Table 6). One difference is the evaluation working set: at 12 qubits cuPauliProp processes all 16.8 million propagated terms on every call, while PADO-Pauli’s evaluation working set holds 4,095 strings. On this untruncated instance both working sets are complete: all 412−1=16,777,2154^{12}-1=16{,}777{,}215 non-identity strings against all 212−1=4,0952^{12}-1=4{,}095 diagonal ones. The engines also differ in language, kernel design, and data layout, so this comparison does not isolate zero-filtering; Table 2 does that within PADO-Pauli.

InstancePADO-Pauli (GPU) [s]cuPauliProp (GPU) [s]Qiskit pauli-prop (CPU) [s]PP.jl (CPU) [s]PP.jl surrogate (CPU) [s]
4q0.004970.01350.002350.0005530.00115
6q0.008120.02290.02480.01220.0225
9q0.01470.05142.361.113.71
10q0.01560.06675.152.577.33
12q0.07670.772–––

Table 6. Evaluation time on the untruncated grid Ising instances (protocol of § 5.1); PP.jl (PauliPropagation.jl) on its conventional path and, after a one-time graph build, on its surrogate path. PADO-Pauli’s column excludes its one-time compilation (0.30–8.28 s over the rows); – marks a case that did not complete within the time limit.

From 9 qubits on, the speedups against the CPU engines are larger: at 9 qubits PauliPropagation.jl and Qiskit pauli-prop are 75×75\times and 160×160\times slower than PADO-Pauli, at 10 qubits 165×165\times and 330×330\times, and at 12 qubits none of the three CPU paths completed within the 900 s limit. At 4 qubits the CPU engines are faster (Table 6); PADO-Pauli’s 5.0 ms there, with an evaluation working set of 15 strings, is a fixed per-query cost, and on the untruncated instances from 6 qubits PADO-Pauli is the fastest.

On the untruncated scaling instances the surrogate path of PauliPropagation.jl is slower than the library’s conventional path at every size it completed (Table 6), after a one-time graph build and zero-filtering of 1.9 to 81.3 s; on the 16-qubit sweep it is faster only at wmax⁡=2w_{\max} = 2 and 3 and did not complete wmax⁡=6w_{\max} = 6.

Differentiability. The backward pass is timed as well. PADO-Pauli and cuPauliProp have a native backward pass (cuPauliProp’s through apply_gate_backward_diff and trace_with_zero_state_backward_diff [23]). PauliPropagation.jl 0.8.1 provides rewindgradient, which returns value and gradient together, so its time is compared with the other engines’ forward-plus-backward sum. Qiskit pauli-prop has no backward pass; a parameter-shift workaround would multiply the number of evaluations by twice the parameter count [51]. For the warm forward-plus-backward pass PADO-Pauli is 3.3× faster than cuPauliProp at 9 qubits (0.0467 against 0.1520 s) and 13.3× at 12 (0.194 against 2.576 s), and 56× and 133× faster than rewindgradient at 9 and 10 qubits (2.61 and 6.28 s).

Gradient accuracy. Against the central difference reference of § 5.1, PADO-Pauli’s gradient deviation lies between 4.8×10−84.8 \times10^{-8} and 1.1×10−71.1 \times10^{-7} on every untruncated instance, the resolution of a single-precision engine against a finite-difference reference; rewindgradient’s, in double precision, stays below 7.5×10−87.5 \times10^{-8}. Under an equal max-weight threshold the deviation is the truncation itself: PADO-Pauli’s and cuPauliProp’s coincide to three digits and fall from 0.17 at wmax⁡=2w_{\max} = 2 to 1.4×10−41.4 \times10^{-4} at wmax⁡=6w_{\max} = 6. As driven by our harness, cuPauliProp’s gradient matches the reference to 1.6×10−71.6 \times10^{-7} at 4 and 6 qubits but deviates by up to 1.8×10−21.8 \times10^{-2} at 9 to 12 qubits and by 3.03.0–3.5×10−23.5 \times10^{-2} on the instance with batched embedding inputs below, while its expectation values match throughout; we did not trace the cause, and its backward timings are quoted as measured.

Batched embedding inputs. PADO-Pauli evaluates a batch of embedding inputs as a single tensor operation; the other engines evaluate it sample by sample. The model is the 3×33 \times3 grid Ising ansatz at depth 2, preceded by a layer of per-qubit XX rotations whose angles are the embedding inputs (N(0,0.32)\mathcal{N}(0, 0.3^{2})); it propagates 262,003 terms, of which 511 remain in PADO-Pauli’s evaluation working set. PADO-Pauli reaches 592, 2,083, and 5,658 evaluations/s at batch sizes 10, 100, and 300, against 27.5/s for cuPauliProp (206× at 300), which re-propagates in full for every sample, so its rate does not depend on the batch size. With the backward pass included the rates at batch size 300 are 2,060 training samples/s for PADO-Pauli and 9.3 for cuPauliProp. The CPU engines, looped the same way, reach forward rates of 0.94/s and 0.97/s (Qiskit pauli-prop, batch sizes 10 and 100), 1.63/s (PauliPropagation.jl, batch size 10), and 0.78/s at both 10 and 100 on the surrogate path, which reuses its graph across samples; the remaining CPU cases (batch size 300, and PauliPropagation.jl at 100) exceeded the limit or were not started.

This is the operation a model with embedding inputs repeats throughout training, one batch of inputs per step. The cost is memory: in the forward-plus-backward pass PADO-Pauli’s occupancy grows from 1.9 GB at batch size 10 to 9.2 GB at 300, about 26 MB per sample, the intermediates each sample’s backward pass reads; a forward pass alone releases them on return. cuPauliProp’s occupancy stays at 2.0 GB, as it holds one sample at a time.

Evaluation time and memory under truncation. On the 16-qubit instance, raising wmax⁡w_{\max} from 2 to 6 grows the propagated basis from 426 to 7,025,029 terms and multiplies PADO-Pauli’s evaluation time by 1.6×1.6\times (26.7 to 43.9 ms) and cuPauliProp’s by 5.1×5.1\times (87.4 to 441.9 ms), so PADO-Pauli goes from 3.3×3.3\times to 10.1×10.1\times faster (Table 7). PauliPropagation.jl on the CPU takes 3.1 ms at wmax⁡=2w_{\max}=2 and 25.9 s at 6, where its coefficient cutoff leaves 3.7 million of the 7.0 million terms the GPU engines propagate.

wmax⁡w_{\max}Evaluation [ms] PADO-PauliEvaluation [ms] cuPauliPropOccupancy [MB] PADO-PauliOccupancy [MB] cuPauliPropRatioPADO-Pauli compile [MB]
226.787.41,4251,3871.0×\times2
326.189.81,4451,4631.0×\times18
428.3103.91,6442,3771.4×\times218
526.3152.63,4668,8872.6×\times1,994
643.9441.914,81046,4943.1×\times13,108
7129.9OOM74,542OOM–59,482

Table 7. The 16-qubit truncation sweep (protocol of § 5.1). Evaluation, the forward time; Occupancy, the GPU memory in use at the end of a forward-plus-backward pass; Ratio, cuPauliProp’s occupancy divided by PADO-Pauli’s; last column, the increase in used memory over PADO-Pauli’s compilation. OOM, out of the 80 GB device memory.

From wmax⁡=4w_{\max}=4 on, PADO-Pauli also occupies less memory in the same sweep, in the forward-plus-backward configuration of § 5.1. Up to wmax⁡=3w_{\max}=3 both occupancies are about 1.4 GB, the size of the CUDA context alone; at wmax⁡=4w_{\max}=4, 5, and 6 PADO-Pauli occupies 1.6, 3.4, and 14.5 GB against cuPauliProp’s 2.3, 8.7, and 45.4 GB (1.4×1.4\times, 2.6×2.6\times, 3.1×3.1\times). cuPauliProp’s complex64 coefficients (8 bytes against PADO-Pauli’s 4) account for part of the ratio. At wmax⁡=7w_{\max}=7 cuPauliProp runs out of the 80 GB device memory with these coefficients and with its real single-precision type alike, while PADO-Pauli completes, occupying 72.8 GB and evaluating in 129.9 ms. Its gradient there deviates from the exact one by at most 1.6×10−51.6\times10^{-5}, against 1.4×10−41.4\times10^{-4} at wmax⁡=6w_{\max}=6, while the expectation value had already converged (6.3×10−66.3\times10^{-6} at wmax⁡=7w_{\max}=7 and 5.9×10−65.9\times10^{-6} at wmax⁡=6w_{\max}=6).

The two engines hold different data. At wmax⁡=6w_{\max}=6 PADO-Pauli’s occupancy above the context is mainly the resident compiled program, 6.4 GB, and the forward and backward matrices its first forward-plus-backward pass builds and keeps, 6.5 GB of a 6.6 GB increase over that pass. The cuPauliProp driver holds the per-gate expansions of the last query for the backward pass. A first forward-plus-backward pass raises the used memory by 6.6 GB for PADO-Pauli and 43.4 GB for cuPauliProp (6.6×6.6\times); a later pass by 234 MB and 9,409 MB, the latter with 34.9–35.4 GB of the previous query’s expansions still resident.

Apart from wmax⁡=7w_{\max}=7, the untruncated 12-qubit instance is the one case that fills the device. There the first forward-plus-backward pass raises the used memory by 78.2 GB for cuPauliProp against 40.5 GB for PADO-Pauli (1.9×1.9\times; 39.9 GB of PADO-Pauli’s increase stays resident beside its 23.7 GB program), and later passes add 2.3 GB (cuPauliProp) and 1.7 GB (PADO-Pauli). With occupancies of 79.5 GB and 66.4 GB on an 80 GB device, both engines are near capacity.

Compilation cost against cuPauliProp. On this workload and platform the trade-off is PADO-Pauli’s up-front compilation, 8.28 s and 36.6 GB of memory during compilation at 12 qubits, which makes cuPauliProp preferable for a single evaluation and PADO-Pauli preferable whenever a circuit is evaluated many times, as in training. At 12 qubits the compilation is amortized after about 12 forward evaluations or 3.5 forward-plus-backward passes relative to cuPauliProp’s per-query cost, or about 14 passes once PADO-Pauli’s first forward-plus-backward pass (24.4 s) is counted as well.

Stress test vs. exact statevector

The grid Ising workload is an easy case for Pauli propagation: on its 16-qubit instance the truncation error is 5.9×10−65.9 \times10^{-6} at wmax⁡=6w_{\max} = 6. For a harder regime, and a comparison against an exact statevector simulator, we turn to a variant of the random circuit family of [52] with fixed density and fixed depth. The circuit is a randomly drawn block U(ϕ)U(\phi) followed by a trainable brickwork ansatz V(θ)V(\theta). UU applies three layers of a per-qubit RX(ϕ)R_X(\phi) rotation followed by a CZ layer on an independent Erdős–Rényi graph (edge probability 0.15), then a per-qubit RX(ϕ)R_X(\phi) and a per-qubit RY(ϕ)R_Y(\phi) layer; VV applies two layers of a per-qubit RY(θ)R_Y(\theta), RZ(θ)R_Z(\theta) pair followed by a brickwork CZ pattern with alternating offset.

The embedding angles are ϕ∼N(0,τ2)\phi\sim\mathcal{N}(0,\tau^2) with τ2=0.24\tau^2 = 0.24 and the trainable angles are initialized from N(0,0.1)\mathcal{N}(0,0.1); ϕ\phi enters PADO-Pauli through embedding and θ\theta through thetas, and we read out ⟨Z0⟩\langle Z_0\rangle and ⟨Zn−2Zn−1⟩\langle Z_{n-2}Z_{n-1}\rangle. We sweep n=12,16,20n = 12, 16, 20 at fixed wmax⁡=9w_{\max} = 9 under the gpu preset in float32, against exact PennyLane baselines: lightning.qubit on the host CPU, the accuracy reference up to n=16n = 16, and lightning.amdgpu on the same MI300X, the accuracy reference at n=20n = 20 and the timed baseline at every size.

Accuracy on the random circuit. On this random circuit the truncation error against the exact value, over a batch of 100 random embedding inputs, has a small mean but a worst case more than ten times the mean (Table 8). At wmax⁡=9w_{\max} = 9 the mean absolute error (0.0008, 0.0031, 0.0180) and the worst case over the batch (0.009, 0.044, 0.204) both grow with system size (n=12,16,20n = 12, 16, 20); both are absolute deviations of ⟨Z0⟩\langle Z_0\rangle and ⟨Zn−2Zn−1⟩\langle Z_{n-2}Z_{n-1}\rangle, which lie in [−1,1][-1,1]. Raising the threshold lowers the error at a cost: at n=16n = 16 the step wmax⁡=9→10w_{\max} = 9 \to10 more than halves the worst-case error, from 0.044 to 0.019, while the propagated basis grows from 0.72 to 2.60 million terms. On this instance at n=20n = 20 the approximation is no longer a reliable estimator of the exact value.

nnwmax⁡w_{\max}Propagated termsZero-filtered termsabsolute error meanabsolute error max
1290.25M8530.00080.009
1690.72M2,0880.00310.044
16102.60M3,8670.00160.019
2090.80M2,4850.01800.204

Table 8. Truncation accuracy on the random circuit of this stress test against an exact statevector baseline (lightning.qubit up to n=16n = 16, lightning.amdgpu at n=20n = 20) over 100 random embedding inputs; M denotes 10610^6.

Forward throughput vs. statevector. The timed operation is the forward pass of a model with embedding inputs: one circuit evaluated across a batch of them, which the statevector baseline simulates one sample at a time. Table 9 reports forward throughput after the one-time compilation, for batches of 128–512 embedding inputs. Compilation takes 0.45 and 0.61 s at n=16n=16 and 20. PADO-Pauli reaches thousands to tens of thousands of evaluations per second and speeds up further with batch size, consistent with a fixed per-query cost amortized over the batch, whereas the baseline’s rate is nearly independent of the batch size. The speedup therefore grows with batch size at every nn, at n=16n=16 from 57× to 194× over lightning.amdgpu as the batch grows from 128 to 512.

nnBatchPADO-Pauli (eval/s)lightning.amdgpu (eval/s)
1212811,679197.1 (59×)
1225622,645197.2 (115×)
1251236,867201.1 (183×)
161287,451130.8 (57×)
1625615,315130.8 (117×)
1651225,229130.1 (194×)
201285,22359.6 (88×)
2025610,63857.7 (184×)
2051217,74757.8 (307×)

Table 9. Throughput of the forward pass (evaluations per second) on the stress test circuit after a one-time compilation: PADO-Pauli (one batched tensor operation; wmax⁡=9w_{\max}=9, gpu preset, float32, MI300X; median of five calls after one warm-up) against the statevector baseline lightning.amdgpu (complex128) on the same GPU, called once per sample in one timed pass over the batch after one warm-up sample; parentheses give the speedup.

The same ordering holds with the backward pass included. After the one-time compilation, an Adam loop of 10 steps that minimizes the batch mean of ⟨Z0⟩\langle Z_0\rangle over the trainable angles (batch of 16 embedding inputs, learning rate 0.05) runs 9.5–15.2× faster than the same loop run one sample at a time with lightning.amdgpu’s adjoint differentiation over n=12n=12–20.

The compiled program’s loss and the exact circuit’s loss, each along its own trajectory, agree to within 0.004 at every step (0.552 → 0.238 against 0.553 → 0.242 at n=20n=20). On this instance the approximation is an imperfect per-sample estimator whose training loss nonetheless tracks the exact circuit’s.

On the grid Ising workload PADO-Pauli evaluates faster than the GPU engine on every scaling instance (Table 6) and occupies less GPU memory under truncation at wmax⁡≥4w_{\max}\geq4 (Table 7). On the random circuit stress test, after a one-time compilation, the batched forward pass runs 57–307× faster than the per-sample GPU statevector loop used here over the sizes and batch sizes measured (Table 9), and a training loop of ten steps 9.5–15.2× faster than the same loop run one sample at a time with GPU adjoint differentiation. There, however, accuracy is the limiting factor: at wmax⁡=9w_{\max}=9 the worst error over the data batch reaches 0.204 at n=20n=20 (Table 8). In both comparisons the gain is measured after the one-time compilation, so it applies when the same circuit is queried many times, as in training.

Applications

Each case below uses the interface of § 3.1 and § 3.4. The listings omit setup and plotting code.

Example at utility scale: 127-qubit kicked Ising

We simulate the 127-qubit kicked transverse-field Ising experiment on IBM’s Eagle heavy-hex lattice, the basis of the claim of quantum utility of [11] and since then a common target for classical Pauli propagation methods [5, 6, 7, 3, 22]. Each Trotter step applies a transverse-field layer ∏qe−ihXq/2\prod_q e^{-ihX_q/2} followed by an Ising layer ∏(u,v)∈Eei(π/4)ZuZv\prod_{(u,v)\in E} e^{i(\pi/4)Z_uZ_v} (that is, RZZ(−π/2)R_{ZZ}(-\pi/2), which is Clifford) on the 144 heavy-hex edges, so the XX rotations are the only non-Clifford gates. PADO-Pauli represents the RZZ(−π/2)R_{ZZ}(-\pi/2) gates as Pauli rotations, whose cosine branch carries the coefficient cos⁡(−π/2)=0\cos(-\pi/2)=0 and is removed by the coefficient truncation at the build point, so only the XX rotations add terms. We propagate the single-site magnetization ⟨Z62⟩\langle Z_{62}\rangle through 20 Trotter steps and sweep the field h∈[0,π/2]h\in[0,\pi/2].

The sweep uses the observable and truncation settings of the utility example distributed with PauliPropagation.jl [41]: wmax⁡=8w_{\max}=8 and a coefficient threshold of 10−410^{-4}. Listing 5 builds the circuit and sweeps the field. The coefficient threshold is applied at a build point that moves with hh, so the listing compiles once per field value.

A 9-qubit patch of the lattice, run untruncated, matches an exact PennyLane statevector to 2.2×10−142.2\times10^{-14}, so the gate conventions are right.

No exact statevector is feasible at this size, so we apply the apparent convergence check of § 4.1: we repeat the whole sweep at every wmax⁡w_{\max} from 3 to 8 with the coefficient threshold held at 10−410^{-4}. Figure 10 overlays four of the six settings on the error-mitigated hardware points of [11], as distributed with [41]; the deviations below are taken from the curve linearly interpolated from the twenty field values of the sweep to the eleven hardware angles.

Single-site magnetization plot and deviation plot

Figure 10. Single-site magnetization ⟨Z62⟩\langle Z_{62}\rangle of the 127-qubit kicked Ising on the IBM Eagle heavy-hex lattice against the transverse-field angle hh. Left: four of the six swept max-weight thresholds against the error-mitigated hardware points of [11] (wmax⁡=6w_{\max}=6 and 7 omitted). Right: maximum and root-mean-square deviation from those eleven points at every swept threshold.

At wmax⁡≥5w_{\max}\ge5 the magnetization stays near 1 at small field, falls through a sharp crossover near h=π/4h=\pi/4, and vanishes by h≈3π/8h\approx3\pi/8. At h=0h=0 every XX rotation is the identity and ⟨Z62⟩=1\langle Z_{62}\rangle=1 exactly; at h=π/2h=\pi/2 every gate is Clifford, the surviving evaluation working set is empty, and the program returns 0.

Raising wmax⁡w_{\max} from 3 to 5 shifts the crossover to larger hh, and wmax⁡=7w_{\max}=7 and 8 move it slightly back; the deviation falls overall, though not monotonically: the maximum absolute deviation runs 0.738, 0.293, 0.138, 0.139, 0.099, 0.076 over wmax⁡=3w_{\max}=3 to 8, and the root-mean-square deviation 0.413, 0.140, 0.050, 0.051, 0.037, 0.032.

Between wmax⁡=5w_{\max}=5 and 6 the curve changes by at most 0.010, so the apparent convergence check would stop there; yet the next step, 6 to 7, moves the curve by 0.044. Apparent convergence alone is therefore not a sufficient stopping criterion.

One run of the whole sweep (compilation plus one evaluation at each of the twenty fields) takes 105 to 215 s of wall time and peaks at 0.08 to 0.63 GB of GPU memory over the six settings of wmax⁡w_{\max}, on a single AMD Instinct MI300X.

Listing 5: 127-qubit kicked Ising magnetization sweep on the IBM Eagle heavy-hex lattice.

n, n_steps = 127, 20
edges = eagle_edges() # 144 heavy-hex edges (0-indexed)

qc = Circuit(n) # RX(h): param 0 ; RZZ(-pi/2): param 1
for _ in range(n_steps):
    for q in range(n): qc.rx(q, param_idx=0)
    for (u, v) in edges: qc.rzz(u, v, param_idx=1)

evs = []
for h in np.linspace(0, np.pi / 2, 20): # transverse-field sweep
    thetas = torch.tensor([h, -np.pi / 2], dtype=torch.float64)
    program = qc.compile(
        observables=[("Z", [62])], preset="gpu", # <Z_62>
        dtype="float32", max_weight=8,
build_thetas=thetas, build_min_abs=1e−4)
evs.append(float(program.expvals(thetas)[0]))

Variational quantum eigensolver (VQE)

This chemistry case, a variational quantum eigensolver [53], adds two elements: an observable with many terms assembled from an external Hamiltonian, and a training loop. The system is H2_2 in the STO-3G basis, with the qubit Hamiltonian from qml.qchem.molecular_hamiltonian under a Jordan–Wigner mapping: 4 qubits and 15 Pauli terms at the experimental equilibrium bond length R=0.7414R=0.7414 Å. The identity term (coefficient −0.098864 Ha) is held out as a classical offset, added back after evaluation, leaving 14 terms in the PauliSum.

The ansatz is minimal: two XX gates prepare the Hartree–Fock determinant ∣1100⟩|1100\rangle and one rotation on four qubits, exp⁡(−iθX0X1X2Y3/2)\exp(-i\theta X_0X_1X_2Y_3/2), supplies the double excitation, giving 3 gates and 1 trainable angle. Compilation is untruncated in float64; the propagated basis is 18 terms, of which zero-filtering retains 12. Listing 6 assembles the observable, builds the ansatz, and compiles the program.

Listing 6: H2_2 VQE: observable with many terms, minimal ansatz, gradient training; the omitted training loop follows Listing 2.

from padopauli import Circuit, PauliSum

# H (15 Pauli terms) from PennyLane; the identity term becomes a classical offset.
obs = PauliSum(4)
for c, word, qubits in non_identity_terms: # 14 terms
    obs.add_from_str(word, float(c), qubits=qubits)

qc = Circuit(4)
qc.x(0); qc.x(1) # Hartree-Fock |1100>
qc.rot("XXXY", [0, 1, 2, 3], param_idx=0) # double excitation
program = qc.compile(observables=[obs], preset="gpu", dtype="float64")

theta = torch.zeros(1, dtype=torch.float64, requires_grad=True)
# then 300 Adam steps on energy = program.expvals(theta)[0] + e_offset

Starting from θ=0\theta= 0 (the Hartree–Fock energy, −1.11668439-1.11668439 Ha), 300 Adam steps at learning rate 0.05 converge to −1.1372701749-1.1372701749 Ha at θ∗=−0.226136\theta^{*} = -0.226136. This differs from the exact ground energy of the 16×1616 \times16 Hamiltonian matrix (the full configuration interaction value, FCI in Figure 11) by −2.22×10−16-2.22 \times10^{-16} Ha, the spacing between adjacent double-precision numbers at this energy. Repeating the procedure at eleven bond lengths from 0.4 to 2.4 Å (250 steps each) reproduces the dissociation curve with a maximum deviation of 1.7×10−121.7 \times10^{-12} Ha (Figure 11).

H₂ dissociation curve in the STO-3G basis

Figure 11. H₂ dissociation curve in the STO-3G basis: a program compiled and trained at each of the eleven bond lengths, against the FCI value from exact diagonalization and the Hartree–Fock reference (θ=0\theta= 0).

The agreement has a structural reason: the exact ground state of H₂ in this basis lies in the span of ∣1100⟩\lvert1100\rangle and ∣0011⟩\lvert0011\rangle, the one-parameter ansatz reaches it, and no truncation is applied, so the compiled program represents the circuit exactly. The case validates observable assembly, compilation, evaluation, and gradient end to end against an independently known value.

MaxCut-QAOA

MaxCut is a natural benchmark because its cost Hamiltonian is a sparse sum of two-local ZiZjZ_iZ_j terms. Maximizing the cut on a graph G=(V,E)G = (V, E) is equivalent to minimizing ∑(i,j)∈E⟨ZiZj⟩\sum_{(i,j)\in E}\langle Z_iZ_j\rangle, and E[cut]=(∣E∣−∑⟨ZiZj⟩)/2\mathbb{E}[\mathrm{cut}] = (|E| - \sum\langle Z_iZ_j\rangle)/2. A depth-pp QAOA ansatz [54] alternates a cost block of ZiZjZ_iZ_j rotations with a mixer block of XX rotations after a Hadamard layer that prepares ∣+⟩⊗n\lvert+\rangle^{\otimes n}.

The instance is a deterministic 15-vertex graph with 30 edges (a ring plus a chord from every vertex to the one seven positions away) at depth p=4p = 4 with one shared angle per block, so the 180 rotations among its 195 gates share 2p=82p = 8 trainable angles. The angles start from a linear ramp with δt=0.8\delta t = 0.8, so that γi=(i/p) δt\gamma_i = (i/p)\,\delta t and βi=−(1−i/p) δt\beta_i = -(1 - i/p)\,\delta t, and are trained for 200 Adam steps at learning rate 0.05 under the gpu preset at wmax⁡=5w_{\max} = 5. Zero-filtering reduces the program from 335,602 propagated terms to the 1,923 diagonal terms that contribute (0.57%). Listing 7 assembles the objective, trains it, and samples the result.

Listing 7: MaxCut-QAOA objective, training, and sampling; the omitted training loop follows Listing 2.

from padopauli import Circuit, pennylane_sample

p, dt = 4, 0.8
qc = Circuit(n_qubits)
for q in range(n_qubits): qc.h(q)  # |+>^n
for i in range(p):
    for (u, v) in edges: qc.rzz(u, v, param_idx=2 * i) # cost: one shared gamma
    for q in range(n_qubits): qc.rx(q, param_idx=2 * i + 1) # mixer: one shared beta

# The whole edge objective is ONE observable with many terms: the list of term tuples
# is passed as a single entry of observables.
cost_terms = [("ZZ", [u, v], 1.0) for (u, v) in edges]
qc.compile(observables=[cost_terms], preset="gpu", max_weight=5)

# Linear ramp: gamma_i = (i/p) dt, beta_i = -(1 - i/p) dt
theta0 = [a for i in range(1, p + 1) for a in ((i / p) * dt, -(1 - i / p) * dt)]
thetas = torch.nn.Parameter(torch.tensor(theta0, dtype=torch.float64))
# then 200 Adam steps minimizing qc.expvals(thetas)[0], the whole cost as one observable;
# best_thetas holds the trained angles.

samples = pennylane_sample(circuit=qc.gates, thetas=best_thetas.cpu(),
                           n_qubits=n_qubits, shots=4000, seed=0)

Training drives the compiled objective from ∑(i,j)∈E⟨ZiZj⟩=−8.93\sum_{(i,j)\in E}\langle Z_i Z_j\rangle= -8.93 at the initial angles to −11.15-11.15, an expected cut of 20.57 against the optimum of 22 found by enumerating the 2152^{15} bitstrings. To measure the effect on the circuit itself, pennylane_sample draws 4,000 shots from the circuit at the initial angles and another 4,000 at the trained angles. In Figure 12 the initial circuit samples a mean cut of 19.57 and 9.8% of its shots reach the optimum; the trained circuit samples a mean cut of 20.52, and 34.4% of its shots reach the optimum. For reference, exactly 30 of the 32,768 bitstrings are optimal, so uniform sampling hits one with probability 0.092% and has a mean cut of ∣E∣/2=15|E|/2 = 15.

Histograms of the cut values of 4,000 bitstrings drawn from the MaxCut-QAOA circuit

Figure 12. Histograms of the cut values of 4,000 bitstrings drawn from the MaxCut-QAOA circuit of Listing 7 at the initial angles (blue) and after 200 training steps (orange, at the trained angles), both sampled from the exact statevector baseline.

The compiled objective is accurate at both points: its ∑⟨ZiZj⟩\sum\langle Z_i Z_j\rangle differs from the exact statevector value by 0.13 at the initial angles and 0.036 at the trained angles.

SAFE ma-QAOA

The final case uses the compiled program as the surrogate of the surrogate-assisted and fine-tuning enhanced (SAFE) method [55], a cheap source of starting parameters for an expensive optimizer. For the multi-angle QAOA (ma-QAOA) ansatz [49], whose parameterization with one angle per gate is expressive at low depth but expensive to train [55], SAFE runs three stages: a low-weight Pauli propagation (LWPP) warm-up on a truncated PADO-Pauli program, Listing 8: SAFE ma-QAOA: a truncated PADO-Pauli warm-up supplying the starting point for an exact fine-tune; the omitted training loops follow Listing 2.

qc = build_ma_qaoa(n, edges, p) # one param_idx per gate
obs = [("ZZ", [u, v], 1.0) for (u, v) in edges]

# stage 1: the surrogate, truncated at max weight 4, differentiable, on the GPU
lwpp = qc.compile(observables=[obs], preset="gpu", dtype="float64", max_weight=4)
theta = torch.nn.Parameter(theta_init.clone()) # (1, 98): the kept batch axis
# then 500 Adam steps on lwpp.expvals(theta)[:, 0].sum()

# stage 3: the same angles, now refined on the exact objective
exact = make_exact(qc.gates) # PennyLane default.qubit, torch backprop

a parameter distillation step, and a fine-tune on the exact objective. SAFE aims to reduce the number of exact optimizer steps.

The instance is an Erdős–Rényi MaxCut graph on n=16n = 16 vertices at edge probability 0.3 with 33 unweighted edges; the objective is to minimize HC=∑(i,j)∈EZiZjH_C = \sum_{(i,j)\in E} Z_iZ_j. Enumerating the 2162^{16} configurations gives Cmin⁡=−19C_{\min} = -19 and Cmax⁡=+33C_{\max} = +33 for C=⟨HC⟩C = \langle H_C\rangle, and quality is reported as the approximation ratio α(C)=(Cmax⁡−C)/(Cmax⁡−Cmin⁡)\alpha(C) = (C_{\max} - C)/(C_{\max} - C_{\min}). The ansatz is ma-QAOA at depth p=2p = 2: a Hadamard layer, then per layer one RZZR_{ZZ} per edge and one RXR_X per qubit, each with its own param_idx, for 114 gates with 98 trainable angles, compared with the 2p2p shared angles of § 6.3. We compare SAFE with a cold start; both begin at one of the constant initializations of [55], every cost angle at +0.01+0.01 and every mixer angle at −0.01-0.01, an initialization with α=0.6350\alpha= 0.6350. Listing 8 shows the warm-up stage.

The surrogate’s compiled program is small: 335 of the 18,136 propagated terms survive zero-filtering, and its 114 steps hold 18,264 nonzero entries in total. Evaluated on the same gate list, PADO-Pauli’s PennyLane reference helpers and the make_exact helper of Listing 8 agree to 3.2×10−163.2 \times10^{-16}, so make_exact uses the engine’s gate and angle conventions.

Stage one runs 500 Adam steps at learning rate 0.02 on the surrogate alone, with no exact evaluation during optimization, and reaches α=0.9550\alpha= 0.9550 evaluated exactly at the angles trained on the surrogate. Stage two deletes every rotation whose trained angle satisfies ∣θ∣≤0.3|\theta| \le0.3, removing 47 of the 98 rotations and leaving 67 gates on 51 parameters. Stage three fine-tunes on the exact objective at learning rate 0.02; the surrogate is not used again.

After 100 exact steps SAFE reaches α=0.9615\alpha= 0.9615 with or without distillation. The cold start reaches 0.9399 in 100 steps and needs 155 to match SAFE’s value at 100 (Figure 13). SAFE reaches that value in 1.6×1.6\times fewer exact optimizer steps (100 against 155) and, with distillation, on roughly half the parameters. The SAFE paper [55] evaluates the reduction in exact steps across problem families and depths.

Approximation ratio versus the number of exact optimizer steps

Figure 13. Approximation ratio vs. the number of exact optimizer steps on the n=16n = 16 MaxCut instance at p=2p = 2: cold start (blue) against the SAFE run after the LWPP warm-up (orange, its 100 exact steps without distillation, on all 98 angles). The dashed line at step 155 marks where the cold start first comes within 10−410^{-4} of SAFE’s value after 100 steps.

Conclusion

We presented PADO-Pauli, a GPU-accelerated and differentiable implementation of the Pauli propagation surrogate. Its organizing idea is a split between compile time and query time: everything that does not change between queries (propagation, max-weight truncation, zero-filtering, and coefficient truncation at a fixed build point) is done once, and everything that depends on the queried parameters is a fixed pass over sparse matrices. Two further properties hold. First, because the compiled program is a sparse tensor program whose backward pass (vjp, the default) is registered with PyTorch’s automatic differentiation, it composes with surrounding differentiable layers. Second, because zero-filtering removes only branches that cannot contribute, the filtered program returns the same expectation values; in the ablation, zero-filtering reduces steady-state memory by 1.4–1.5× from wmax⁡=5w_{\max} = 5 on and speeds up the batched forward pass by about 1.5×.

Apart from floating-point round-off, truncation is the only approximation and is an explicit control; the compiled program is an approximate simulator whose error must be checked per instance (§ 4, § 5.3). Its intended regime is repeated evaluation with gradients and batched queries, as in the training loops of § 6.

Limitations. The approach is not a general-purpose simulator. (i) Truncation is not universally safe. Pauli propagation suits circuits and observables whose Pauli terms stay at low weight, or circuits with genuine noise; for deep circuits with many non-Clifford rotations at large angles, which spread the observable onto many Pauli strings of high weight, the discarded coefficient mass Δ\Delta need not be small, and sufficient conditions for reliable simulation, with instances where the method fails, have been given in terms of the noise rate and the fraction of T gates in circuits of Clifford and T gates [56]. (ii) The provable guarantees are conditional. The tightest bounds assume Pauli noise [12, 6] or randomly drawn, locally scrambling layers [57]; for a specific noiseless structured instance only the worst-case ℓ1\ell_1 bound applies, and it can be loose. (iii) Compilation is a fixed up-front cost, so for a program queried only a few times the compilation cost is not amortized, and the first forward-plus-backward pass can raise device memory use by more than compilation needed (40.5 against 36.6 GB on the untruncated 12-qubit instance of § 5). Coefficient truncation also ties the program to its build point, so a parameter sweep recompiles (§ 6.1). (iv) Highly branching gates. Unitaries with many controls make the Pauli representation prohibitively large [3]. (v) Accuracy at scale is only partially characterized. Every accuracy claim here is measured against an exact baseline at n≤28n \le28; beyond that the evidence is indirect, and the 127-qubit sweep’s deviation from the hardware points was still falling at the largest wmax⁡w_{\max} measured.

Outlook. Two extensions follow. The accuracy study of § 4 should be extended to sizes where exact simulation is infeasible, with the discarded mass Δ\Delta of coefficient truncation reported as an error certificate. Moving step matrices to host memory automatically when a compilation fills the device would extend the reachable qubit count without the evaluation cost that the hybrid preset adds to every query.

Code and Data Availability

PADO-Pauli 2.0.0, the version used for every result in this paper, is distributed as the Python package padopauli through PyPI and https://github.com/Norma-Q/PADO-Pauli. It installs with the following commands:

pip install padopauli # the engine
pip install "padopauli[reference]" # adds PennyLane for the exact cross-checks

The supported Python and PyTorch versions are listed in the repository. The package is licensed under the NORMA Binary License 1.0, which permits noncommercial use free of charge; commercial use requires a separate agreement. The notebooks, the measurement scripts, and the recorded data behind every table and figure are in the same repository under the Apache License 2.0; the snapshot used for this paper (tag v2.0.0-whitepaper) is archived at https://doi.org/10.5281/zenodo.23310965.

The comparisons with cuPauliProp, Qiskit pauli-prop, and PauliPropagation.jl in § 5 ran on an NVIDIA A100, since cuPauliProp requires CUDA; every other result ran on an AMD Instinct MI300X (Table 10).

Acknowledgments

The authors gratefully acknowledge NORMA, Inc. for its generous support of this research. The authors used Claude (Anthropic) for writing code and for editing the manuscript. The authors verified all of Claude’s output.

Listing 9: The compiled objects and what they hold.

Circuit.compile(...)   [calls compile_program(...)]
  -> CompiledProgram
       |-- circuit, observables                         gate list; observables as PauliSum
       |-- psum_union : TensorOperatorProgram           the compiled program
       |       |-- x_mask, z_mask, coeff_init            output rows, coefficients c_init
       |       +-- steps : [TensorSparseStep]            one per gate
       |               |-- mat_const, mat_cos, mat_sin   step matrices
       |               +-- param_idx | embedding_idx     the angle the step reads
       |-- basis : UnionBasis                            surviving Pauli strings
       |-- preset : ExecutionPreset
       |-- const_thetas                                  fixed angles from rot(angle=...)
       |-- compile_stats                                profiler output
       |-- expvals(), expval()                          run through TensorSparseEvaluator
       +-- expvals_reference(), clear_cache()            PennyLane reference; cache release
build_quasi_sampler(...)
  -> TensorSparseSampler : compute_moments(), quasi_prob(), quasi_prob_from_moments()

Core Data Structures and Internal Routines

The objects below are what the calls of § 3.1 and § 3.4 compile to and run on. They are importable, so that custom evaluation or instrumentation code can be written without modifying the engine; the supported interface is the methods of CompiledProgram and of the sampler, and the compile profiler at the end of this list. Beyond the names of § 3.1 and § 3.4, the top-level namespace also exports pennylane_apply_circuit and pennylane_observable, the two functions the reference helpers are built from, so that the same cross-check can be assembled on another PennyLane device. Listing 9 shows how the objects fit together.

  • TensorOperatorProgram and TensorSparseStep: the compiled program of § 3.1 and its sparse steps. A CompiledProgram holds the program as psum_union, next to the shrunk UnionBasis (basis) and compile_stats. The program stores its output rows (x_mask, z_mask), the coefficient vector cinitc_{\mathrm{init}} (coeff_init) of the observable on the union basis described under build_union_observable below, and the steps. Each step stores MconstM_{\mathrm{const}}, McosM_{\mathrm{cos}}, and MsinM_{\mathrm{sin}} as mat_const, mat_cos, and mat_sin, together with the angle it reads (param_idx, or embedding_idx for a rotation driven by an embedding input). A Pauli rotation step keeps its unchanged branches as an index map (unchanged_cols, with cos_pos marking the rows that carry cos⁡θ\cos\theta) and its sine branches as a matrix; Clifford and noise steps use mat_const alone.

  • TensorSparseSampler: the quasi-probability sampler that build_quasi_sampler returns, with the compute_moments, quasi_prob, and quasi_prob_from_moments methods of § 3.4.

  • TensorSparseEvaluator: the class that runs a TensorOperatorProgram. Its evaluate_adjoint applies the transposed step matrices, in sequence, to the survival mask mL+1\mathbf{m}_{L+1} for a given parameter vector, caching those matrices between calls or, for a step matrix stored off the compute device with more than chunk_size rows, streaming it in blocks of that size without caching. A compiled program instantiates it internally; construct it directly only for custom evaluation schedules.

  • build_union_observable(observables) and UnionBasis: the first compile stage. It builds the shared observable on the union basis over all listed observables and returns it together with a UnionBasis, the ordered Pauli string list and its index. The coefficient the returned

observable carries for each string is the largest ∣c∣|c| that string has in any listed observable (1 when that is zero); it serves only the coefficient truncation that build_min_abs enables, while V0V_0 is built from the observables’ own coefficients. The second and third stages are propagate_tensor_program and zero_filter_tensor_backprop_with_keep_mask, whose keep mask shrink_union_basis applies to the UnionBasis.

  • adjoint_weights_on_zero(...) and coeff_matrix_from_observables(...): the readout in two stages behind expvals. adjoint_weights_on_zero produces w(θ)\mathbf{w}(\theta) by an adjoint pass, coeff_matrix_from_observables assembles the observable coefficients into the dense matrix V0V_0, and the expectation values follow from the single product E=wTV0E = \mathbf{w}^{\mathsf{T}}V_0. Call these directly to share one adjoint pass across any observables whose Pauli strings lie in the compiled basis.

  • CompiledProgram.compile_stats and the PPS_COMPILE_PROFILE environment variable: the compile profiler, and the supported way to obtain the compilation times and Pauli term counts of § 4 and § 5 without instrumenting the engine. With PPS_COMPILE_PROFILE=1 set, compile_program times each stage and records on the returned program’s compile_stats a per-step breakdown of propagation and of zero-filtering, plus a summary entry with the stage totals and the propagated and surviving term counts.

References

  1. [1]Daniel Gottesman. The Heisenberg representation of quantum computers. In S. P. Corney, R. Delbourgo, and P. D. Jarvis, editors, Group22: Proceedings of the XXII International Colloquium on Group Theoretical Methods in Physics, pages 32–43, Cambridge, MA, 1999. International Press. arXiv:quant-ph/9807006.arxiv.org/abs/quant-ph/9807006
  2. [2]Patrick Rall, Daniel Liang, Jeremy Cook, and William Kretschmer. Simulation of qubit quantum circuits via Pauli propagation. Phys. Rev. A, 99:062337, Jun 2019.DOI
  3. [3]Manuel S. Rudolph, Tyson Jones, Yanting Teng, Armando Angrisani, and Zoë Holmes. Pauli propagation: A computational framework for simulating quantum systems. PRX Quantum, 7:032001, Aug 2026.DOI
  4. [4]Tomislav Begušić and Garnet Kin-Lic Chan. Fast classical simulation of evidence for the utility of quantum computing before fault tolerance, 2023. arXiv:2306.16372 [quant-ph].arxiv.org/abs/2306.16372
  5. [5]Tomislav Begušić, Johnnie Gray, and Garnet Kin-Lic Chan. Fast and converged classical simulations of evidence for the utility of quantum computing before fault tolerance. Science Advances, 10(3):eadk4321, 2024.DOI
  6. [6]Yuguo Shao, Fuchuan Wei, Song Cheng, and Zhengwei Liu. Simulating noisy variational quantum algorithms: A polynomial approach. Phys. Rev. Lett., 133:120603, Sep 2024.DOI
  7. [7]Manuel S. Rudolph, Enrico Fontana, Zoë Holmes, and Lukasz Cincio. Classical surrogate simulation of quantum systems with LOWESA, 2023. arXiv:2308.09109 [quant-ph].arxiv.org/abs/2308.09109
  8. [8]Joseph Tindall, Matthew Fishman, E. Miles Stoudenmire, and Dries Sels. Efficient tensor network simulation of IBM’s Eagle kicked Ising experiment. PRX Quantum, 5:010308, Jan 2024.DOI
  9. [9]Hai-Jun Liao, Kang Wang, Zong-Sheng Zhou, Pan Zhang, and Tao Xiang. Simulation of IBM’s kicked Ising experiment with projected entangled pair operator, 2023. arXiv:2308.03082 [quant-ph].arxiv.org/abs/2308.03082
  10. [10]Siddhartha Patra, Saeed S. Jahromi, Sukhbinder Singh, and Román Orús. Efficient tensor network simulation of IBM’s largest quantum processors. Phys. Rev. Res., 6:013326, Mar 2024.
  11. [11]Youngseok Kim, Andrew Eddins, Sajant Anand, Ken Xuan Wei, Ewout van den Berg, Sami Rosenblatt, Hasan Nayfeh, Yantao Wu, Michael Zaletel, Kristan Temme, and Abhinav Kandala. Evidence for the utility of quantum computing before fault tolerance. Nature, 618(7965):500–505, 2023.DOI
  12. [12]Enrico Fontana, Manuel S. Rudolph, Ross Duncan, Ivan Rungger, and Cristina Cîrstoiu. Classical simulations of noisy variational quantum circuits. npj Quantum Information, 11(1):84, 2025.DOI
  13. [13]Tomislav Begušić, Kasra Hejazi, and Garnet Kin-Lic Chan. Simulating quantum circuit expectation values by Clifford perturbation theory. The Journal of Chemical Physics, 162(15):154110, 2025.DOI
  14. [14]Armando Angrisani, Antonio A. Mele, Manuel S. Rudolph, M. Cerezo, and Zoë Holmes. Simulating quantum circuits with arbitrary local noise using Pauli propagation. PRX Quantum, 7:020313, Apr 2026.DOI
  15. [15]Rafael Gómez-Lurbe and Armando Pérez. Pauli propagation for imaginary-time evolution. New Journal of Physics, 28(8):084517, 2026.
  16. [16]S. Majumder, J. R. Garrison, L. Luo, B. Mitchell, M. Amico, A. Seif, M. Tran, K. Sharma, E. van den Berg, Z. Minev, and L. C. G. Govia. Quantum enhanced Pauli propagation, 2026. arXiv:2603.14485 [quant-ph].arxiv.org/abs/2603.14485
  17. [17]Yanting Teng, Su Yeon Chang, Manuel S. Rudolph, and Zoë Holmes. Leveraging symmetry merging in Pauli propagation, 2026. arXiv:2512.12094 [quant-ph].arxiv.org/abs/2512.12094
  18. [18]Florian Krötz. PauLIB: A high-performance library for processing Pauli strings, 2026. arXiv:2605.25974 [quant-ph].
  19. [19]Nicolas Loizeau, J. Clayton Peacock, and Dries Sels. Quantum many-body simulations with PauliStrings.jl. SciPost Phys. Codebases, 54, 2025.DOI
  20. [20]Nicolas Loizeau, J. Clayton Peacock, and Dries Sels. Codebase release 1.5 for PauliStrings.jl. SciPost Phys. Codebases, 54-r1.5, 2025.DOI
  21. [21]Dorit Aharonov, Xun Gao, Zeph Landau, Yunchao Liu, and Umesh Vazirani. A polynomial-time classical algorithm for noisy random circuit sampling. In Proceedings of the 55th Annual ACM Symposium on Theory of Computing, STOC 2023, pages 945–957, New York, NY, USA, 2023. Association for Computing Machinery.
  22. [22]Qiskit addons team. Pauli prop. https://github.com/Qiskit/pauli-prop, 2025.
  23. [23]NVIDIA Corporation. cuPauliProp: A high-performance library for Pauli propagation quantum simulators. https://docs.nvidia.com/cuda/cuquantum/26.06.0/cupauliprop/index.html, 2026. Version 0.4.0 (cuQuantum SDK 26.06), the version benchmarked here; first released in cuQuantum SDK 25.11.
  24. [24]Arul Rhik Mazumder, Hovnatan Karapetyan, Mohammed Zuhair Mullath, Rudy H. Tanin, Hrant Gharibyan, and Hayk Tepanyan. Benchmarking zero-setup quantum circuit simulators, 2026. arXiv:2607.09882 [quant-ph].arxiv.org/abs/2607.09882
  25. [25]Sacha Lerch, Ricard Puig, Manuel S. Rudolph, Armando Angrisani, Tyson Jones, M. Cerezo, Supanut Thanaslip, and Zoë Holmes. Efficient quantum-enhanced classical simulation for patches of quantum landscapes. PRX Quantum, 7:020359, Jun 2026.DOI
  26. [26]Franz J. Schreiber, Jens Eisert, and Johannes Jakob Meyer. Classical surrogates for quantum learning models. Phys. Rev. Lett., 131:100803, Sep 2023.
  27. [27]Saverio Monaco, Jamal Slim, Florian Rehm, Dirk Krücker, and Kerstin Borras. Symbolic Pauli propagation for gradient-enabled pre-training of quantum circuits, 2026. arXiv:2512.16674 [quant-ph].arxiv.org/abs/2512.16674
  28. [28]Pablo Bermejo, Paolo Braccia, Manuel S. Rudolph, Zoë Holmes, Lukasz Cincio, and M. Cerezo. Quantum convolutional neural networks are effectively classically simulable. PRX Quantum, 7:020304, Apr 2026.arxiv.org/abs/2408.12739
  29. [29]M. Cerezo, Martin Larocca, Diego García-Martín, N. L. Diaz, Paolo Braccia, Enrico Fontana, Manuel S. Rudolph, Pablo Bermejo, Aroosa Jjaz, Supanut Thanaslip, Eric R. Anschuetz, and Zoë Holmes. Does provable absence of barren plateaus imply classical simulability? Nature Communications, 16(1):7907, 2025.DOI
  30. [30]Zong-Liang Li and Shi-Xin Zhang. Dual role of low-weight Pauli propagation: A flawed simulator but a powerful initializer for variational quantum algorithms. Phys. Rev. Res., 8:013266, Mar 2026.arxiv.org/abs/2508.06358
  31. [31]Cheng-Ju Lin, Hrant Gharibyan, and Vincent P. Su. Utility-scale quantum state preparation: classical training using Pauli path simulation. Quantum, 10:2014, March 2026.arxiv.org/abs/2510.02428
  32. [32]Hrant Gharibyan, Siddharth Hariprakash, Mohammed Zuhair Mullath, and Vincent P. Su. A practical guide to using Pauli path simulators for utility-scale quantum experiments, 2025. arXiv:2507.10771 [quant-ph].arxiv.org/abs/2507.10771
  33. [33]Kaining Zhang, Xinbiao Wang, Kunsheng Li, Qixin Zhang, Yuxuan Du, Min-Hsiu Hsieh, and Dacheng Tao. Stochastic Pauli-path simulator for large-scale quantum optimization, 2026. arXiv:2607.17804 [quant-ph].arxiv.org/abs/2607.17804
  34. [34]Sheng-Hsuan Lin, Etienne Granet, Kevin Hémery, and Henrik Dreyer. Backpropagating Pauli propagation, 2026. arXiv:2607.15184 [quant-ph].arxiv.org/abs/2607.15184
  35. [35]Shi-Xin Zhang, Jonathan Allcock, Zhou-Quan Wan, Shuo Liu, Jiace Sun, Hao Yu, Xing-Han Yang, Jiezhong Qiu, Zhaofeng Ye, Yu-Qin Chen, Chee-Kong Lee, Yi-Cong Zheng, Shao-Kai Jian, Hong Yao, Chang-Yu Hsieh, and Shengyu Zhang. TensorCircuit: a quantum software framework for the NISQ era. Quantum, 7:912, February 2023.DOI
  36. [36]Jason Ansel et al. PyTorch 2: Faster machine learning through dynamic Python bytecode transformation and graph compilation. In Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2, ASPLOS ’24, pages 929–947, New York, NY, USA, 2024. Association for Computing Machinery.DOI
  37. [37]Victor Martinez, Armando Angrisani, Ekaterina Pankovets, Omar Fawzi, and Daniel Stilck França. Efficient simulation of parametrized quantum circuits under nonunitary noise through Pauli backpropagation. Phys. Rev. Lett., 134:250602, Jun 2025.DOI
  38. [38]Antonio Anna Mele, Armando Angrisani, Soumik Ghosh, Sumeet Khatri, Jens Eisert, Daniel Stilck França, and Yihui Quek. Noise-induced shallow circuits and the absence of barren plateaus. Nature Physics, 22(5):751–756, 2026.DOI
  39. [39]Scott Aaronson and Daniel Gottesman. Improved simulation of stabilizer circuits. Phys. Rev. A, 70:052328, Nov 2004.DOI
  40. [40]Trevor Gale, Matei Zaharia, Cliff Young, and Erich Elsen. Sparse GPU kernels for deep learning. In SC20: International Conference for High Performance Computing, Networking, Storage and Analysis, pages 1–14, 2020.arxiv.org/abs/2006.10901
  41. [41]Manuel S. Rudolph et al. PauliPropagation.jl. https://github.com/SparqleSim/PauliPropagation.jl, 2026. Version 0.8.1; version 0.7.0 (February 2026) added the experimental CUDA extension and version 0.8.0 (August 2026) rewindgradient.
  42. [42]Tyson Jones and Julien Gacon. Efficient calculation of gradients in classical simulations of variational quantum algorithms, 2020. arXiv:2009.02823 [quant-ph].arxiv.org/abs/2009.02823
  43. [43]Maria Schuld, Ryan Sweke, and Johannes Jakob Meyer. Effect of data encoding on the expressive power of variational quantum-machine-learning models. Phys. Rev. A, 103:032430, Mar 2021.DOI
  44. [44]Adrián Pérez-Salinas, Alba Cervera-Lierta, Elies Gil-Fuster, and José I. Latorre. Data re-uploading for a universal quantum classifier. Quantum, 4:226, February 2020.
  45. [45]Mario Herrero-Gonzalez, Brian Coyle, Kieran McDowall, Ross Grassie, Sjoerd Beentjes, Ava Khamsenh, and Elham Kashefi. The Born ultimatum: Conditions for classical surrogation of quantum generative models with correlators, 2025. arXiv:2511.01845 [quant-ph].
  46. [46]Cristina Cîrstoiu. A Fourier analysis framework for approximate classical simulations of quantum circuits, 2024. arXiv:2410.13856 [quant-ph].arxiv.org/abs/2410.13856
  47. [47]Hakop Pashayan, Joel J. Wallman, and Stephen D. Bartlett. Estimating outcome probabilities of quantum circuits using quasiprobabilities. Phys. Rev. Lett., 115:070501, Aug 2015.DOI
  48. [48]Ville Bergholm et al. PennyLane: Automatic differentiation of hybrid quantum-classical computations, 2022. arXiv:1811.04968 [quant-ph].
  49. [49]Rebekah Herrman, Phillip C. Lotshaw, James Ostrowski, Travis S. Humble, and George Siopsis. Multi-angle quantum approximate optimization algorithm. Scientific Reports, 12(1):6781, Apr 2022.DOI
  50. [50]Ali Asadi, Amintor Dusko, Chae-Yeun Park, Vincent Michaud-Rioux, Isidor Schoch, Shuli Shu, Trevor Vincent, and Lee James O’Riordan. Hybrid quantum programming with PennyLane Lightning on HPC platforms, 2024. arXiv:2403.02512 [quant-ph].arxiv.org/abs/2403.02512
  51. [51]Maria Schuld, Ville Bergholm, Christian Gogolin, Josh Isaac, and Nathan Killoran. Evaluating analytic gradients on quantum hardware. Phys. Rev. A, 99:032331, Mar 2019.DOI
  52. [52]Olli Hirviniemi, Afrad Basheer, and Thomas Cope. Random quantum circuits as seeds for continuous generative models, 2026. arXiv:2602.10049 [quant-ph].arxiv.org/abs/2602.10049
  53. [53]Alberto Peruzzo, Jarrod McClean, Peter Shadbolt, Man-Hong Yung, Xiao-Qi Zhou, Peter J. Love, Alán Aspuru-Guzik, and Jeremy L. O’Brien. A variational eigenvalue solver on a photonic quantum processor. Nature Communications, 5(1):4213, Jul 2014.DOI
  54. [54]Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. A quantum approximate optimization algorithm, 2014. arXiv:1411.4028 [quant-ph].arxiv.org/abs/1411.4028
  55. [55]Hyunwoo Kim and Youngseok Lee. SAFE ma-QAOA: Surrogate-assisted and fine-tuning enhanced multi-angle QAOA with parameter distillation, 2026. arXiv:2605.23377 [quant-ph].arxiv.org/abs/2605.23377
  56. [56]Guillermo González-García, J. Ignacio Cirac, and Rahul Trivedi. Pauli path simulations of noisy quantum circuits beyond average case. Quantum, 9:1730, May 2025.
  57. [57]Armando Angrisani, Alexander Schmidluber, Manuel S. Rudolph, M. Cerezo, Zoë Holmes, and Hsin-Yuan Huang. Classically estimating observables of noiseless quantum circuits. Phys. Rev. Lett., 135:170602, Oct 2025.DOI

Paper details

vlnc:W_6pk838vt
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 7

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Claude

View statement
Looking for related papers…
Contents