This computational notebook tests the limits of Spatiotemporal Pauli Process (SPP)-style approximations against full coherent non-Markovian noise in a small quantum error-correction simulation. The notebook constructs a microscopic system-environment noise model where data qubits are coherently coupled to environment qubits. The environment is not reset between QEC rounds, allowing temporal memory effects to accumulate. Two descriptions of the same noisy process are compared: 1. full coherent non-Markovian system-environment evolution, and2. an SPP / Pauli-trajectory approximation extracted from the coherent bath. The simulation uses a small rotated surface-code-style patch and compares the logical failure probability under both descriptions. Coupling strength and number of QEC rounds are varied to identify regimes where the SPP approximation agrees with, or deviates from, the full coherent model. The purpose of the notebook is not to claim a complete large-scale surface-code result, but to provide an exploratory testbed for studying when coherent and memory effects become important for QEC-level logical performance.
This computational notebook tests the limits of Spatiotemporal Pauli Process (SPP)-style approximations against full coherent non-Markovian noise in a small quantum error-correction simulation. The notebook constructs a microscopic system-environment noise model where data qubits are coherently coupled to environment qubits. The environment is not reset between QEC rounds, allowing temporal memory effects to accumulate. Two descriptions of the same noisy process are compared: 1. full coherent non-Markovian system-environment evolution, and2. an SPP / Pauli-trajectory approximation extracted from the coherent bath. The simulation uses a small rotated surface-code-style patch and compares the logical failure probability under both descriptions. Coupling strength and number of QEC rounds are varied to identify regimes where the SPP approximation agrees with, or deviates from, the full coherent model. The purpose of the notebook is not to claim a complete large-scale surface-code result, but to provide an exploratory testbed for studying when coherent and memory effects become important for QEC-level logical performance.
Correlated noise is a critical failure mode in quantum error correction (QEC), yet a gap remains between the stochastic Pauli models used for scalable QEC analyses and the microscopic, non-Markovian descriptions of noise in physical devices. We bridge this gap by introducing Spatiotemporal Pauli Processes (SPPs): the natural multi-time generalization of Pauli channels, joint probability distributions over Pauli faults across space and time, obtained exactly from any noise process, however non-Markovian, under standard Pauli-frame randomization. SPPs thereby provide a single language in which correlated noise can be recast, compared, and extended, compatible with both microscopic open systems modeling and the stabilizer workflow of QEC design and analysis. Our central result is constructive: the multi-time Pauli twirl acts by local contractions on a process tensor network, yielding an explicit classical tensor network whose virtual bonds encode memory, bounded by the environment's Liouville-space dimension. Transfer operator diagnostics link memory spectra to correlation decay, and hidden Markov representations enable efficient sampling of correlated Pauli fault trajectories, mapping microscopically derived noise directly into circuit-level QEC simulation. We demonstrate this with surface code memory and stability benchmarks up to distance 19. A temporal "storm" model with tunable correlation time shows that memory alone, at strictly fixed marginal error rates, systematically erodes the exponential error suppression expected from code distance. A genuinely spatiotemporal quantum cellular automaton bath maps exactly, under system twirling, to a nonlinear probabilistic cellular automaton; tuning its coherent interactions drives the noise into a pseudo-critical regime with critical slowing down and macroscopic error avalanches that reverse surface code distance scaling.
This computational notebook presents a toy quantum error-correction simulation for studying coherent non-Markovian noise in a distance-5 repetition code. The model uses five data qubits and five environment qubits. Each data qubit is coupled to its own environment qubit through a coherent system-environment interaction, and the environment is not reset between QEC rounds. This allows memory effects to build up over repeated correction cycles. The notebook compares two descriptions of the same noisy QEC experiment: 1. full coherent non-Markovian system-environment evolution, and2. a Pauli-twirled / SPP-style stochastic Pauli baseline. The main quantity studied is the logical failure probability as a function of coupling strength. The aim is to test the limits of Pauli-twirled or SPP-style approximations by checking when coherent memory effects change the logical error rate. This is an exploratory notebook and a first-stage QEC-level toy model before moving to larger surface-code simulations.
Quantum noise is a central challenge in quantum computing across many applications. Extensive work has examined how qubits couple to their environment, leading to decoherence and irreversible relaxation. This work studies a continuous coherent noise model for quantum circuits and compares it with a discrete Pauli model. The focus is on small, coherent gate errors that accumulate across circuit depth. These errors are modeled as random rotations on the Bloch sphere using a von Mises-Fisher distribution. In the small-angle limit, the model reduces to an isotropic Gaussian distribution. We test the model on quantum error-correction circuits based on the [[5,1,3]] and [[7,1,3]] codes. A variant of Grover's search circuit with different qubit counts is also examined. To enable fair comparison, we introduce a model-independent matching scheme. Pauli and continuous noise channels are aligned using the binary entropy at readout. This isolates the effect of noise structure at fixed uncertainty. An approximate analytical method for the propagation of coherent errors is also developed. The method tracks error distributions both on Clifford and non-Clifford circuits without full Monte Carlo sampling. It reduces simulation cost while preserving accuracy for circuit-level error estimates. The approximation is validated against brute-force simulations, identifying its regime of validity with Clifford and non-Clifford circuits under error correction. Our results show that continuous coherent noise and Pauli noise lead to comparable logical-error trends in the stabilizer-code circuits studied here. This behavior is consistent with syndrome extraction projecting a general single-qubit error onto Pauli-error subspaces before recovery. They also show where simplified propagation models work well and where their accuracy is reduced.
The performance of a given quantum error correction (QEC) code depends upon the noise model that is assumed. Independent Pauli noise, applied after each quantum operation, is a simplistic noise model that is easy to simulate and understand in the context of stabilizer codes. Although such a noise model is artificial, it is equivalent to independent, random, unbiased qubit rotations. What about spatially or temporally correlated qubit rotations? Such a noise model is applicable to global operations (e.g., NMR or ESR), common control sources (e.g., lasers), or slow drift (e.g., charge or magnetic noise) in various qubit technologies. In the worst case, such errors can combine constructively and result in a post-correction failure rate that increases with the number of error correction cycles. However, we show that this worst case does not generally arise unless taking active corrective actions while performing QEC. That is, by employing virtual Pauli frame updates ("passive" error correction) rather than physical corrections ("active" error correction), coherent errors do not compound appreciably. Starting in a random Pauli frame is also advantageous. In fact, through perturbation theory arguments and supporting numerical simulations, we show that the logical qubit performance beyond distance 3 for correlated single-qubit Hamiltonian noise models (i.e., global errant qubit rotations), when employing these "lazy" strategies, essentially matches the performance of Pauli noise model with the same process fidelity (fidelity after one application). In a more general circuit model of noise, correlations may add constructively within syndrome extraction rounds but Pauli frame randomization from passive error correction mitigates this effect across multiple rounds.
Fault-tolerant quantum design relies on simulating noisy quantum error correction (QEC) circuits with hundreds to thousands of physical qubits and large circuit depths. High-throughput stabilizer simulators, such as Stim, are the de facto tools for this regime. However, these simulators typically support only Clifford gates and stochastic Pauli noise. As a result, more realistic device noise models-such as coherent control errors and thermal relaxation-are often approximated using Pauli Twirling. This replacement offers speed but can introduce inaccuracies.
To address this, we propose QuasiStim for scalable exact QEC simulation of realistic noise, with QuasiFold as a compiler frontend and DeltaFrame as a sampling backend. QuasiFold lowers sampling overhead by merging equivalent non-Pauli sites in the quantum circuit. DeltaFrame samples the resulting stabilizer trajectories by reusing precomputed predicted references instead of resimulating the full tableau for each shot.
QuasiFold can reduce the number of shots by over 100× on bivariate-bicycle (BB) codes. Compared to a per-shot tableau simulator, DeltaFrame is 166×--1331× faster on rotated surface-code memory under coherent RZ noise as d grows from 5 to 35. QuasiStim also makes the PTA bias measurable: the gap is non-negligible and varies with noise strength, decoder, and circuit schedule.
QuasiStim will be open-sourced upon publication at https://github.com/isaachyw/QuasiStim
Quantum error correction (QEC), the lynchpin of fault-tolerant quantum computing (FTQC), is designed and validated against well-behaved Pauli stochastic error models. But in real-world deployment, QEC protocols encounter a vast array of other errors -- coherent and non-Pauli errors -- whose impacts on quantum circuits are vastly different than those of stochastic Pauli errors. The impacts of these errors on QEC and FTQC protocols have been largely unpredictable to date due to exponential classical simulation cost. Here, we show how to accurately and efficiently model the effects of coherent and non-Pauli errors on FTQC, and we study the effects of such errors on syndrome extraction for surface and bivariate bicycle codes, and on magic state cultivation. Our analysis suggests that coherent error can shift fault-tolerance thresholds, increase the space-time cost of magic state cultivation, and can increase logical error rates by an order of magnitude compared to equivalent stochastic errors. These analyses are enabled by a new technique for mapping any Markovian circuit-level error model with sufficiently small error rates onto a detector error model (DEM) for an FTQC circuit. The resulting DEM enables Monte Carlo estimation of logical error rates and noise-adapted decoding, and its parameters can be analytically related to the underlying physical noise parameters to enable approximate strong simulation.