Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Quantum coding with low-depth random circuits



Michael Gullans, David A. Huse, Stefan Krastanov, Liang Jiang, Steven T. Flammia


Random quantum circuits have played a central role in establishing the computational advantages of near-term quantum computers over their conventional counterparts. Here, we use ensembles of low-depth random circuits with local connectivity in D ≥ 1 spatial dimensions to generate quantum error-correcting codes. For random stabilizer codes and the erasure channel, we find strong evidence that a depth O(log N ) random circuit is necessary and sufficient to converge (with high probability) to zero failure probability for any finite amount below the channel capacity for any D. Previous results on random circuits have only shown that O(N^1/D) depth suffices or that O(log^3 N) depth suffices for all-to-all connectivity (D → ∞). We then study the critical behavior of the erasure threshold in the so-called moderate deviation limit, where both the failure probability and the distance to the channel capacity converge to zero with N. We find that the requisite depth scales like O(log N ) only for dimensions D ≥ 2, and that random circuits require O( N^1/2 ) depth for D = 1. Finally, we introduce an "expurgation" algorithm that uses quantum measurements to remove logical operators that cause the code to fail by turning them into either additional stabilizers or into gauge operators in a subsystem code. With such targeted measurements, we can achieve sub-logarithmic depth in D ≥ 2 spatial dimensions below capacity without increasing the maximum weight of the check operators. We find that for any rate beneath the capacity, high performing codes with thousands of logical qubits are achievable with depth 4–8 expurgated random circuits in D = 2 dimensions. These results indicate that finite-rate quantum codes are practically relevant for near- term devices and may significantly reduce the resource requirements to achieve fault tolerance for near-term applications.
Physical Review X


Quantum information science, quantum error correction, fault-tolerance


Gullans, M. , Huse, D. , Krastanov, S. , Jiang, L. and Flammia, S. (2021), Quantum coding with low-depth random circuits, Physical Review X, [online],, (Accessed May 22, 2024)


If you have any questions about this publication or are having problems accessing it, please contact

Created September 24, 2021, Updated October 14, 2021