0% found this document useful (0 votes)
19 views33 pages

Fast and Parallelizable Logical Computation With Homological Product Codes

Uploaded by

sengthai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views33 pages

Fast and Parallelizable Logical Computation With Homological Product Codes

Uploaded by

sengthai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Fast and Parallelizable Logical Computation with Homological Product Codes

Qian Xu,1, ∗ Hengyun Zhou,2, 3 Guo Zheng,1 Dolev Bluvstein,3 J.


Pablo Bonilla Ataides,3 Mikhail D. Lukin,3 and Liang Jiang1, †
1
Pritzker School of Molecular Engineering, The University of Chicago, Chicago 60637, USA
2
QuEra Computing Inc., 1284 Soldiers Field Road, Boston, MA, 02135, US
3
Department of Physics, Harvard University, Cambridge, Massachusetts 02138, USA
Quantum error correction is necessary to perform large-scale quantum computation, but requires
extremely large overheads in both space and time. High-rate quantum low-density-parity-check
(qLDPC) codes promise a route to reduce qubit numbers, but performing computation while main-
taining low space cost has required serialization of operations and extra time costs. In this work,
we design fast and parallelizable logical gates for qLDPC codes, and demonstrate their utility for
key algorithmic subroutines such as the quantum adder. Our gate gadgets utilize transversal logical
CNOTs between a data qLDPC code and a suitably constructed ancilla code to perform parallel
arXiv:2407.18490v1 [quant-ph] 26 Jul 2024

Pauli product measurements (PPMs) on the data logical qubits. For hypergraph product codes,
we show that the ancilla can be constructed by simply modifying the base classical codes of the
data code, achieving parallel PPMs on a subgrid of the logical qubits with a lower space-time cost
than existing schemes for an important class of circuits. Generalizations to 3D and 4D homological
product codes further feature fast PPMs in constant depth. While prior work on qLDPC codes
has focused on individual logical gates, we initiate the study of fault-tolerant compilation with our
expanded set of native qLDPC code operations, constructing algorithmic primitives for preparing
k-qubit
√ GHZ states and distilling/teleporting k magic states with O(1) space overhead in O(1) and
O( k log k) logical cycles, respectively. We further generalize this to key algorithmic subroutines,
demonstrating the efficient implementation of quantum adders using parallel operations. Our con-
structions are naturally compatible with reconfigurable architectures such as neutral atom arrays,
paving the way to large-scale quantum computation with low space and time overheads.

CONTENTS D. Homomorphic measurement gadget for HGP


codes 11
I. Introduction 2 1. Hypergraph product codes and their
canonical logical operator basis 11
II. Summary of key results 3 2. A basic homomorphic measurement
A. Parallel Pauli Product Measurements via gadget 12
Homomorphic CNOTs 3
B. Fault-Tolerant Compilation with qLDPC V. Parallelizable logical computation with
Codes 4 hypergraph product codes 13
A. Grid Pauli product measurements for HGP
III. Preliminaries 5 codes 13
A. Notation 5 B. Logical computation using GPPMs with low
B. Classical codes, quantum codes, and chain space-time-overhead 16
complexes 5 C. Fault-tolerant compilation with qLDPC
C. Homological product codes from product codes 16
complexes 6 1. GHZ state generation 18
D. Homomorphic CNOT and homomorphic 2. Magic state distillation and
measurement gadget 7 consumption 18
E. Modifying classical codes 7 3. Quantum adder 20
IV. Homomorphic CNOT and measurements for VI. Single-shot logical gates for 3D/4D homological
homological product codes 8 product codes 22
A. Quantum-code homomorphisms induced by
classical-code homomorphisms 8 VII. Physical implementation 22
B. Classical-code homomorphisms 9
C. Homomorphic measurement gadget for VIII. Discussion and outlook 22
generic homological product codes 10
Acknowledgments 23

A. Additional gadgets for logical operations on


[email protected] HGP codes 24
[email protected] 1. Logical translation gadget 24
2

2. Selective inter-block teleportation 25 transversal gates are not selective, acting on all logical
3. Logical cyclic shift 25 qubits homogeneously.
4. Parallel logical ∣i⟩ state preparation 25 Thus, it is natural to inquire if there exists any ap-
5. Parallel logical Hadamard gates 26 proach in between lattice surgery (with rateless ancillae)
and transversal gates, that offers selectivity and paral-
B. Proof of Theorem 11 27 lelism simultaneously. A promising direction involves the
so-called homomorphic CNOT [29], which generalizes the
C. Parallel PPMs for 3D homological product transversal CNOTs between two identical codes to two
codes 29 distinct codes. In this approach, using a smaller code
as an ancilla, it is possible to perform selective opera-
D. Single-shot state preparation for 3D/4D tions in parallel on a subset of logical qubits of a data
homological product codes 30 block. As an example, Ref. [29] shows that it is possi-
ble to perform a measurement only on one of the logical
References 31 qubits in a toric code using a surface-code ancilla. Such
a homomorphic CNOT, however, relies on identifying a
nontrivial homomorphism between two quantum codes,
I. INTRODUCTION which is challenging for general codes. In particular, it re-
mains unclear how to generalize the constructions from
Quantum error correction (QEC) is essential for re- the topological codes in Ref. [29] to algebraically con-
alizing large-scale, fault-tolerant quantum computation. structed qLDPC codes.
However, paradigmatic QEC schemes based on the sur- In this work, we construct homomorphic inter-block
face code are very costly in terms of the space overhead, CNOTs for a family of qLDPC codes – the so-called ho-
requiring millions of physical qubits for solving practi- mological product codes [30–33] – that are considered
cal problems at useful scale [1–4]. Recent breakthroughs leading candidates for practical fault tolerance [12, 13].
in high-rate quantum low-density-parity-check (qLDPC) By utilizing the structure of these codes as the tensor
codes, in both asymptotic parameter scaling [5–11] and product of classical codes, we construct desired quantum-
practical implementations [12–17], promise a route to sig- code homomorphisms by simply taking the tensor prod-
nificantly reduce the qubit numbers. In light of recent ex- uct of classical-code homomorphisms (Fig. 1(a)). By per-
perimental implementations of various QEC schemes [18– forming well-known structure-preserving modifications
24], such developments hold promise for greatly accel- (such as puncturing and augmenting [34]) of the base
erating the progress toward large-scale error-corrected classical codes, we obtain structure-preserving modifi-
quantum computers. cations of the quantum codes that lead to inter-block
Although qLDPC codes constitute hardware-efficient homomorphic CNOTs between two distinct homological
quantum memories, processing the information stored in product codes. Importantly, careful choices of such code
these codes is generally challenging due to the overlap- modifications can preserve the code distances and only
ping support of many logical qubits in the same code require transversal inter-block physical CNOTs, thereby
block. Consequently, logical computations based on these ensuring that the constructed logical gadgets are fault-
codes have so far involved additional time overhead. For tolerant.
instance, the leading approaches for implementing se- By applying these constructions to the hypergraph
lective logical operations involve interfacing the qLDPC product (HGP) codes [35], which are 2D homological
codes with rateless ancillae (codes with asymptotically product codes, we obtain a new logical gadget that mea-
vanishing rate), e.g. surface codes, via lattice surgery sures a selective pattern of Pauli product operators on
operations [13, 14, 25]. To maintain the low space over- any subgrid of the logical qubits in parallel (Fig. 1(b)). In
head, only a few ancillae can be used, and consequently, addition, we construct an automorphism gadget [26] that
logical computations have to be serialized. In contrast, translates the logical grid with periodic boundary condi-
since each logical qubit can be independently operated tions for HGP codes with quasi-cyclic base codes. Com-
on, logical computations using more conventional QEC bining these two gadgets with existing transversal/fold-
approaches (such as e.g. surface codes) can be executed transversal gates [27], parallel logical computations with
in a highly parallel fashion. Hence, computations with low space-time overhead can be realized directly. In par-
qLDPC codes seem to incur a severe space-time tradeoff, ticular, we show that a layer of Θ(k) Clifford gates (con-
with the increased time cost due to serialization possibly sisting of Hadamards, S gates, and intra-block CNOTs)
negating the space savings. on a HGP block with k logical qubits can be applied
An alternative approach for implementing logical op- with a constant space overhead in a sublinear (< O(k))
erations in high-rate qLDPC codes while offering logical number of logical cycles.
parallelism involves transversal gates [26, 27]. For exam- Using this broad set of efficient gate constructions, we
ple, transversal inter-block CNOTs give logical CNOTs study how they can be used to efficiently implement im-
between every inter-block pair of encoded logical qubits portant algorithmic subroutines (Fig. 1(c)), identifying
for any two identical CSS codes [28]. While parallel, these additional structures that greatly reduce the required
3

depth for specific algorithms. As examples, we show how cal CSS codes to two distinct codes, and the homomor-
to prepare a block of logical GHZ states, distill and con- phic measurement gadget, a generalization of the Steane
sume magic states in parallel, and implement the quan- measurement gadget [45], which utilizes the homomor-
tum adder [36]—an important subroutine for many use- phic CNOT. These methods apply physical CNOTs asso-
ful quantum algorithms—with low space-time overhead. ciated with some nontrivial homomorphisms (structure-
In addition, when applying our constructions to higher- preserving maps, reviewed in Sec. III) between two quan-
dimensional homological product codes [32], which sup- tum codes, thereby guaranteeing that the stabilizer group
port single-shot logical state preparation, we obtain even is preserved and the process results in a valid logical op-
faster logical gadgets with a constant gate depth. Since eration.
the logical gadgets developed in this work are built upon To generalize these constructions from the restricted
transversal inter-block physical CNOTs, they are natural set of topological codes in Ref. [29] to a much broader
to implement in reconfigurable atom arrays [20] by over- range of high-rate qLDPC codes, we identify new homo-
lapping two code blocks and applying global Rydberg morphisms for homological product codes (of any dimen-
laser pulses. sion) in Sec. IV, a widely-used family of product con-
Before proceeding, we note several recently developed structions. We show that many well-known techniques
methods for realizing parallelizable logical computation for modifying classical codes, such as puncturing and
based on concatenated codes [37–39] as well as color augmenting [34], can be both structure- and distance-
codes on hyperbolic manifold [40]. Our work comple- preserving, providing suitable homomorphisms between
ments these studies by considering product qLDPC codes the modified code and the original classical code. Apply-
with concrete implementations [13] and fault-tolerant ing this to the base classical codes involved in the prod-
protocols. The constructions in our work could poten- uct construction naturally induces a quantum-code ho-
tially be also generalized to other product codes, such as momorphism, giving rise to a homomorphic CNOT and
lifted product codes [5], generalized bicycle codes [14, 41], an associated logical measurement gadget for the logi-
fiber-bundle codes [42], and good qLDPC codes [5–11]. cal qubits. Crucially, the modified codes (both classical
We also note that similar puncturing techniques were em- and quantum) have preserved distances and the homo-
ployed for implementing logical gates on qLDPC codes morphic logical CNOT only involves transversal physi-
within the paradigm of code deformation [43]. cal CNOTs. As such, these gadgets are naturally fault-
The manuscript is organized as follows: We begin tolerant.
by outlining the key insights and the main results in We present an illustrative example of the above homo-
Sec. II. We introduce in Sec. III the background coding- morphic gadget in Fig. 1(a). Deleting (puncturing) a sub-
theory techniques that form the basis of our technical set of bits of the base classical codes of the ancilla code Q′
constructions. Utilizing these techniques, we present a removes a subset of the physical qubits. When choosing
detailed construction of the homomorphic CNOTs and an appropriate logical operator basis (the canonical basis
measurements for generic homological product codes in in Fig. 1(a)), this also removes a subset of the encoded
Sec. IV. With the new logical gadgets at hand, we study logical qubits. We thus obtain a smaller ancilla code Q′
in Sec. V how common computational tasks and key al- that only encodes a subset of the logical qubits of Q, but
gorithm subroutines can be compiled and implemented with a preserved distance. The quantum-code homomor-
using the HGP codes with low space-time overhead. We phism is then given by the natural inclusion map from
further analyze in Sec. VI how the time overhead could be Q′ to those of Q. Transversal CNOTs between the re-
further reduced by using higher-dimensional homological maining physical qubits of Q and Q′ give rise to transver-
product codes. Finally, we discuss the physical imple- sal logical CNOTs between the remaining logical qubits.
mentation of our proposed schemes in Sec. VII. We note Measuring the ancilla logical block Q′ (Fig. 1(b)) then
that readers primarily interested in the broad applica- effectively measures a subset of logical qubits of Q in
tions of our constructions may skip the technical Sec. III parallel. We can also measure a set of Pauli products of
and Sec. IV first and focus on Secs. V-VII. Q in parallel by adding (augmenting) checks to the base
classical codes of the ancilla (see Fig. 2).
This procedure works for general homological product
II. SUMMARY OF KEY RESULTS codes, enabling selective, fast, and parallel Pauli product
measurements of entire blocks of logical qubits. Mea-
A. Parallel Pauli Product Measurements via surements of multiple disjoint Pauli products can be per-
Homomorphic CNOTs formed in parallel with our methods; the main constraint
is that inheriting the product structure, the pattern of
In this work we first construct new fault-tolerant logi- Pauli products needs to form a grid structure (Fig. 2),
cal gadgets for a variety of qLDPC codes (Fig. 1, Fig. 2 which may naturally be present in many structured prob-
and Table I), enabling selective, fast, and parallel logical lems (see below). The general procedure we employ here,
operations. Our construction builds on top of the ho- in which selective and parallel logical operations on a
momorphic (i.e. structure preserving) CNOT [29], which data code are executed using a properly masked ancilla
generalizes the transversal CNOT between two identi- code patch, may also be useful for more general opera-
4

a Canonical basis b c
Logical HGP gadgets
qubits

Grid Pauli product Translation


measurements

Fold-transversal Transversal CNOT


Punctured gates
Classical bit
Classical check
Physical Qubit
Quantum X check
Quantum Z check
Logical Qubit
Logical Pauli Products Algorithms

FIG. 1. Illustration of the homomorphic CNOT and other key gadgets for HGP codes. (a) Each HGP code Q,
encoding a set of logical qubits Q̄, is constructed by taking the tensor product of two classical base codes H1 , H2 . The qubits
and quantum checks can be visualized on a square and inherit the structure of its base classical codes. The canonical basis
provides a convenient way to make use of the logical structure (Sec. IV D 1, [44]). The logical Z and X operators of a logical
qubit (3D balls) at the (i, j) coordinate are supported on the i-th row and the j-th column of the physical qubits, respectively.
For instance, the blue physical qubits indicate the support of the logical X and Z operators associated with the blue logical
qubit at coordinate (1, 1), and similarly for the pink logical qubit at (2, 3). We construct an ancilla HGP code Q′ by deleting a
subset of the bits of the base codes of Q, thereby deleting columns of data qubits and removing logical qubits supported on the
deleted rows or columns. The structured code modification implies that applying physical transversal CNOTs (known as the
homomorphic CNOT [29]) between the corresponding qubits of Q and Q′ gives rise to logical transversal CNOTs between the
corresponding logical qubits of Q̄ and Q̄′ (third column in this example). (b) Non-destructive Pauli measurements on a subset
of data logical qubits in Q̄ via homomorphic CNOTs and the generalized Steane measurement circuit [45]. More specifically,
we initialize logical qubits Q̄′ in ∣0⟩, apply a homomorphic CNOT between Q̄ and Q̄′ , and finally measure Q̄′ in the Z basis.
Doing so measures single-qubit Z operators on the 7-th, 8-th, and 9-th logical qubits of Q in parallel without affecting the
rest of the data logical qubits. This generalizes the standard Steane measurement circuit by allowing a different ancilla code
Q′ from the data code Q. (c) Using this approach, we construct a suite of different gadgets with constant space overhead
and O(1) logical cycles: parallel measurements of a product pattern of Pauli product operators (Sec. V A and Fig. 2), logical
translation for HGP codes with quasi-cyclic base codes (Appendix A 1), fold-transversal gates [26, 27] and transversal CNOTs.
We use these building blocks to implement logical algorithms using only qLDPC blocks with low space-time overhead.

tions if suitable masks can be prepared. When applied to B. Fault-Tolerant Compilation with qLDPC Codes
higher-dimensional homological product codes (Sec. VI),
this also results in logical gadgets with constant depth via
We next apply these new logical gadgets (Sec. V) to
check redundancies and the soundness property [32]. It
enable low space-time overhead implementations of a
may be possible to further apply techniques of correlated
wide variety of large-scale logical quantum circuits on
decoding [46] and algorithmic fault tolerance [47] to re-
HGP codes (Fig. 1(c)), including random Clifford cir-
duce the time cost in the case of the hypergraph product
cuits (Theorem 11 and Table II), GHZ state preparation
code, although this would require generalizing those re-
(Fig. 3), magic state distillation and consumption (Fig. 4
sults to the case of mixed types of QEC codes. Addition-
and Fig. 5), and quantum addition (Fig. 6).
ally, for specific base classical codes with a quasi-cyclic
structure, we can also form a quantum code automor- The cost of QEC is usually quantified in terms of its
phism [26] from the cyclic permutation of the underly- space-time overhead, as various compilation methods can
ing classical code, giving rise to a gadget that translates often trade between space and time [48–50]. As discussed
the logical qubits in a structured way. Building upon the in Sec. I, the need for serialization in existing general
parallel PPMs gadget and the translation gadget, we fur- qLDPC gate schemes may often negate the benefits of
ther construct a variety of useful gadgets for HGP codes constant space overhead when considering the space-time
in Appendix A, including selective inter-block teleporta- cost. Our methods, in contrast, enable the parallel imple-
tion, logical cyclic shift, and parallel single-qubit gates, mentation of many logical operations while maintaining
which enable complex logical computations. constant space overhead, potentially improving the over-
all space-time overhead.
5

Using the homomorphic measurement gadgets de- III. PRELIMINARIES


scribed above and in Sec. IV, we form a “Grid PPMs”
(GPPMs, Fig. 2) gadget for HGP codes that can measure A. Notation
a product pattern of PPMs on any subgrid of the logi-
cal qubits in parallel in one logical cycle (consisting of d
We use bold symbols to denote a set of objects. We
code cycles for a distance-d code). When combined with
denote [n] as the set of integers {1, 2, ⋯, n} for some n ∈
known transversal and fold-transversal gates [26, 27], we
Z+ , {n1 → n2 } the set of integers {n1 , n1 + 1, ⋯, n2 } with
show that the GPPMs gadget generates the full Clifford
n2 ≥ n1 .
group for an HGP code. In addition, we construct a log-
ical translation gadget that translates the logical qubit Given a vector v ∈ Fn over some field F and a subset
grid of a quasi-cyclic HGP code (with quasi-cyclic base of indices S ⊆ [n], we denote v∣S as the restriction of v
classical codes) by simply permuting the physical qubits on S, i.e. a subvector of v with only entries indexed by
(see Table I, Appendix A 1, and Fig. 7). S. Similarly, given a matrix M ∈ Fm×n over some field F
and a subset of column indices S, we denote H∣S as the
By selecting a family of quasi-cyclic HGP codes with restriction of H on S, i.e. a submatrix of H with only
competitive code parameters, we can execute parallel log- columns in S.
ical computations with not only a constant space over- Let Q be some set of qubits and O be some set of coor-
head but also lower space-time cost compared to similar dinates. We say Q ≃ O if Q are assigned to coordinates
operations with conventional approaches based on the O. Let O0 ⊆ O. We refer to Q∣O0 as the subset of qubits
surface code. As shown in Table II and Theorem 11 (see with coordinates O0 . For two sets of qubits Q and Q′
Appendix. B for details), a generic layer of Θ(k) Clifford assigned with the same set of coordinates O, we refer to
gates (consisting of Hadamards, S gates, and CNOTs) transversal CNOTs between them as pairs of CNOTs on
acting on k logical qubits on a quasi-cyclic HGP block each coordinate, i.e. ⊗q∈O CNOT(Qq , Q′q ).
can be implemented in at most O(k 3/4 ) logical cycles, We denote e⃗i as a unit column vector with the i-th
compared to Θ(k) for other existing schemes (Table II). entry being 1. We do not specify the dimension of the
This low space-time overhead is fundamentally enabled vector in this notation, which should be clear from con-
by the parallelism of the GPPMs gadget, as existing text.
selective gadgets involving lattice surgery with rateless We denote Pn as the n-qubit Pauli group.
codes [13, 14, 25] would have to execute computations se-
quentially to maintain constant space overhead and result
in a linear logical depth. We also note that the O(k 3/4 ) B. Classical codes, quantum codes, and chain
time overhead is based on a specific construction (which complexes
might not be optimal), and the practical cost of struc-
tured circuits may be even lower.
In this section, we review the basics of classical linear
Turning our attention to fault-tolerant compilation codes, quantum stabilizer codes, and their representation
for common algorithmic subroutines, we show that the as chain complexes.
logical parallelism can be further enhanced (and conse- A [n, k, d] classical linear code C over F2 is a k-
quently, the time overhead further reduced) by compiling dimensional subspace of Fn2 . It can be specified as the
specific algorithms with more structured layers of gates. row space of a generator matrix G ∈ Fk×n 2 , or the kernel
(n−k)×n
We show that we can prepare a k-logical-qubit GHZ state of a check matrix H ∈ F2 , with HGT = 0 mod 2.
(see Fig. 3) in parallel with O(1) space overhead in O(1) The distance d of the code is the minimum Hamming
logical cycles, using measurement-based preparation and weight of all codewords.
the ability to measure multiple ZZ Pauli products in A [[n, k, d]] quantum stabilizer code Q is a 2k -
parallel. Noting that the bulk of operations in magic dimensional subspace of the 2n -dimensional n-qubit
state factories can be done in parallel when using high- Hilbert space. It is specified as the common +1
rate encodings, using transversal CNOTs and the par- eigenspace of an Abelian subgroup S of Pn that does
allel GPPMs, we show how to distill/consume k magic not contain −I. The non-trivial logical operators of the
states (see Fig. 4 and Fig.√5) in parallel with O(1) space code are given by N (S)/S, where N denotes the nor-
overhead in O(1) and O( k log k) logical cycles, respec- malizer with respect to Pn . The distance of the code is
tively, using HGP codes encoding k logical qubits. The the minimum Hamming weight of all nontrivial logical
latter, in particular, enables many practical algorithms operators.
involving parallel non-Clifford gates. Finally, we present For a Calderbank-Shor-Steane (CSS) stabilizer
an efficient implementation of the quantum adder [36] code [51, 52], the stabilizer generators can be divided
with HGP blocks as such an example (see Fig. 6), again into X-type operators and Z-type operators, repre-
utilizing the fact that through auxiliary Bell pairs com- sented by the X- and Z-check matrix HX ∈ Fr2X ×n and
monly used for space-time trade-off [4, 49, 50], much HZ ∈ Fr2Z ×n , respectively. Each row r of HX (HZ )
of the adder structure can be executed in parallel via represents a X (Z) type n-qubit Pauli operator ⊗ni=1 Xiri
transversal CNOTs and the GPPMs gadget. (⊗ni=1 Ziri ), where Xi (Zi ) denotes the Pauli operator
6

on the i-th qubit. The commutativity of the stabilizers where δ is the Kronecker delta function and (∂xj j )0 is
requires that HX HZT = 0 mod 2, which is also called the defined as the identity map.
CSS condition.
It is straightforward to check that the boundary maps
A length-n chain complex (over F2 ) B
of the product complex in Def. 1 satisfy:
∂n ∂n−1 ∂2 ∂1
Bn Ð→ Bn−1 ÐÐ→ ⋯ Ð→ B1 Ð→ B0 , (1) ∂x⃗i −⃗ei ∂x⃗i = 0 and ∂x⃗i ∂yj⃗ = ∂yj⃗∂x⃗i (i ≠ j). (5)
is a collection of F2 vector spaces {Bi }ni=0 and linear Clearly, a product complex is a high-dimensional gener-
boundary maps between them {∂i ∶ Bi → Bi−1 }ni=1 that alization of the chain complex (see Eq. (1)). Intuitively,
satisfy ∂i−1 ∂i = 0. Let ∂ ∶= {∂i }ni=1 . Informally, we can it can be viewed as a D-dimensional hypercube, and its
write ∂ 2 = 0. projection at a point x ⃗ along the i-th direction resembles
A classical code C with a check matrix H can be rep- a chain complex. We can define the i-th type boundaries
resented by a length-1 chain complex: as ∂ i ∶= {∂x⃗i }x⃗∈ZD . Informally, we can write Eq. (5) as
H
C1 Ð→ C0 , (2) (∂ i )2 = 0 and [∂ i , ∂ j ] = 0(i ≠ j), (6)
where the basis of C1 and C0 are associated with classical indicating that the linear maps along any direction form
bits and checks, respectively. valid boundary maps and maps along different directions
A CSS quantum stabilizer code Q with check matri- commute.
ces HX and HZ can be represented by a length-2 chain Note that in Def. 1, for simplicity, we allow the indices
complex: xi of the base chain complexes to take any integer values,
T
HZ HX making the projection of D along any direction infinite-
Q2 ÐÐ→ Q1 ÐÐ→ Q0 , (3) length chain complexes. In practice, we typically apply
where the basis of Q2 , Q1 , and Q0 are associated with Z some cutoff T to the indices by, e.g. setting Dx⃗ = 0 for
checks, qubits, and X checks, respectively. Note that the any ∣⃗
x∣∞ > T .
maps are valid boundary maps due to the CSS condition: Since a quantum code is defined on a 1D chain complex
HX HZT = 0 mod 2. (see Eq. (3)), we need to derive a 1D chain complex from
Because of the above relation between codes and chain the product complex, which is called the total complex:
complexes, we will refer to a classical code C or a quan- Definition 2 (Total complex of a product complex).
tum code Q interchangeably as their representing chain Let D be a product complex out of D base chain com-
complex. plexes with vectors spaces {Dx⃗ }x⃗ and boundary maps
{∂x⃗i }i∈[D],⃗x . We define its total chain complex T =
{{Tk }k , {δk }k } ∶= Tot(D) as follows:
C. Homological product codes from product
complexes Tk ∶= ⊕ Dx⃗ , (7)
∣⃗
x∣=k

In this section, we review the homological product and the boundary maps:
codes [30–33] and show how they are constructed from
the tensor product of chain complexes. Technically, the ⎛ ⎞
terminology “homological product codes” could refer to δk ( ⊕ ax⃗ ) = ∑ ⊕ ∂y⃗,⃗x ax⃗ , (8)
∣⃗
x∣=k x∣=k ⎝∣⃗
∣⃗ y ∣=k−1 ⎠
different constructions that cover the product of quantum
codes [30, 32]. However, in this work, we only consider a for any ax⃗ ∈ Dx⃗ and
subset of them – the product of classical codes, or equiv-
alently, length-1 chain complexes, (albeit referred to as ∂i ⃗ − y⃗ = e⃗i for some i ∈ [D]
x
high-dimensional hypergraph product codes [31]). We ∂y⃗,⃗x ∶= { x⃗ , (9)
0, otherwise
closely follow the notation in Ref. [33].
Given D base chain complexes, we can obtain a prod-
uct complex by taking the tensor product of them: Intuitively, the total complex is obtained by projecting
the D-dimensional complex along the “diagonal” direc-
Definition 1 (Product complex). Let {B i }i∈[D] be D tion.
chain complexes, where B i = {{Bxi i }xi , {∂xi i }xi } (here, Once we obtain a total chain complex from a product
we do not specify the length of each chain complex, complex (which can have a length longer than 2), we
i.e. the range of xi ). We define a D-dimensional can define a quantum code from a length-2 subcomplex.
product complex D = {{Dx⃗ }x⃗=(x1 ,⋯,xn )T ∈ZD , {∂x⃗i ∶ Dx⃗ → In this work, we will focus on product complexes with
Dx⃗−⃗ei }i∈[D],⃗x∈ZD } ∶= Prod({B i }i∈[D] ) as the tensor prod- length-1 base complexes {C i }i∈[D] (classical codes). In
uct of these chain complexes, where this case, a total complex T = Tot(Prod({C i }i∈[D] )) will
D D be of length D:
Dx⃗ ∶= ⊗ Bxi i , ∂x⃗i ∶= ⊗(∂xj j )δi,j , (4) δD−1
δD δ1
i=1 j=1 TD Ð→ TD−1 ÐÐ→ ⋯ Ð→ T0 . (10)
7

Furthermore, we will primarily focus on D = 2, 3, 4. and measurement (which can be done by simply perform-
For D = 2, we obtain the standard hypergraph prod- ing d QEC cycles and transversally measuring the qubits,
uct code [35], with planar surface codes being a special respectively, for any distance-d CSS code). Ref. [29] has
instance. For D = 3 and D = 4, we obtain 3D and 4D ho- constructed homomorphic measurement gadgets for per-
mological product codes, with 3D and 4D surface/toric forming one PPM on a toric code or a hyperbolic surface
code being special instances, respectively. code using an ancilla code that encodes a single logical
qubit. However, their construction relies on the notion
of covering spaces and the topological properties of codes
D. Homomorphic CNOT and homomorphic and it was not clear how to generalize their constructions
measurement gadget to algebraically constructed qLDPC codes.

In this section, we briefly review the general frame-


work of the homomorphic CNOT and the homomorphic E. Modifying classical codes
measurement gadget introduced in Ref. [29].
Definition 3 (Homomorphic CNOT). Let Q and Q′ be Here, we review some well-known techniques for mod-
two quantum codes associated with two chain complexes ifying classical codes, which we will utilize later to in-
{{Qi }2i=0 , {∂i }2i=1 }, and {{Q′i }2i=0 , {∂i′ }2i=1 }, respectively. duce structure-preserving modifications on the quantum
Let γ = {γi ∶ Q′i → Qi }2i=0 be a homomorphism between homological product codes for implementing the homo-
the two chain complexes, i.e., the following diagram is morphic gadgets in Sec. III D.
commutative: Definition 4 (Puncturing and shortening). Let C be a
(n−k)×n
∂2 ∂1 [n, k, d] classical code with a check matrix H ∈ F2
Q2 Q1 Q0
and a generator matrix G ∈ F2 . Let S ⊆ [n] be a set of
k×n
γ2 γ1 γ0 (11) bit indices. Puncturing H on S gives a new check matrix
∂2′ ∂1′ H S , which is defined as a submatrix of H with columns
Q′2 Q′1 Q′0
in S deleted, i.e.
Then physical Q-controlled CNOTs specified by γ1 , i.e. H S ∶= H∣[n]/S . (12)
a physical CNOT controlled by the i-th qubit of Q and
targeted the j-th qubit of Q′ is applied if and only if
Moreover, the generator matrix of H S is GS , which is
γ1 [i, j] = 1, give some Q-controlled logical CNOT gates
obtained by shortening G on S:
between Q and Q′ . We refer to such a logical gadget as a
homomorphic CNOT associated with the homomorphism 1. Find the subcode of C with a generator matrix M ∈
γ. (k−m)×n
F2 , for some m ≤ k, such that:
The above homomorphic CNOT gadget is a valid log-
ical operation since the conditions that the stabilizers rs(M ) = span{h ∈ rs(G) ∣ h∣S = 0∣S∣ }. (13)
are preserved under such a gadget are equivalent to the
diagram in Eq. (11) being commutative [29]. In other 2.
words, finding a homomorphism between two quantum
codes directly leads to a logical gadget that implements GS ∶= M S . (14)
some inter-block logical CNOTs.
Using the homomorphic CNOT in Def. 3, one can im-
plement a homomorphic measurement gadget on a data Obviously, puncturing and shortening are dual to each
quantum code Q by constructing a specific ancilla code other: puncturing the check matrix of a code corresponds
Q′ and implementing the generalized Steane measure- to shortening its generator matrix (on the same set of
ment (see Fig. 1(b)) that utilizes the inter-block homo- bits). This gives a way of constructing a new code C ′
morphic CNOTs. Specifically, by initializing the logical from an old code C by puncturing its check matrix on
qubits of Q′ in the Z (X) basis, applying the Q- (Q′ -) a subset of bits. We refer to such a transformation as
controlled homomorphic CNOTs, and measuring Q′ in puncturing a code on some set of bits, for simplicity. In
the Z (X) basis, we can measure products of Pauli Z general, the new code C ′ has n′ ≤ n and k ′ ≤ k. For
(X) logical operators of Q. generic puncturing, there is no guarantee on the new code
In general, the homomorphic measurement gadget im- distance, which could either increase, decrease, or remain
plements N Pauli product measurements (PPMs) on the the same.
data code non-destructively and in parallel, where N
equals the number of logical qubits in Q′ . In addition, it Definition 5 (Augmenting and expurgating). Let C be a
(n−k)×n
is easy to guarantee the fault tolerance of the gadget by [n, k, d] classical code with a check matrix H ∈ F2
r0 ×n
using a large-distance ancilla, constant-depth homomor- and a generator matrix G ∈ F2 . Let H0 ∈ F2
k×n
be
phic CNOTs, and fault-tolerant ancilla state preparation some new checks. Augmenting H with H0 gives a new
8

check matrix H +H0 , which is defined as appending the and S = [∣S∣]. Based on Def. 4, we know that puncturing
new checks in H0 to H, i.e. H on S corresponds to shortening Gc on S, i.e. the new
generator matrix can be written as
H
H +H0 ∶= ( ). (15) ⎛ hT∣S∣+1 ⎞
H0
⎜ hT∣S∣+2 ⎟
GS = ⎜
⎜Ik−∣S∣ , ⋯
⎟.
⎟ (19)
The generator matrix of H +H0 is G−H0 , which is obtained ⎜ ⎟
by removing the codewords in rs(G) that do not satisfy ⎝ hTk ⎠
the extra constraints imposed by H0 , a process called ex-
purgating: Since the k −∣S∣ rows of GS are the same as the last k −∣S∣
rows of Gc , up to some extra zeros, the distance of the
rs(G−H0 ) = rs(G) ∩ ker(H0 ), (16) new code is equal to or greater than d.
Moreover, the transformation from Gc to GS entails
where rs(●) denotes the row space. a concise transformation on the codewords by the punc-
Augmenting and expurgating are also dual to each turing operation. Let C̄ ≃ [k] denote the k codewords of
other: augmenting the check matrix of a code corre- C, which we refer to as logical bits, for simplicity. Punc-
sponds to expurgating its generator matrix (with respect turing on the bits indexed by S simply corresponds to
to the same set of extra checks). This also gives a way of removing the logical bits indexed by S (up to shortening
constructing a new code C ′ from an old code C by adding other logical bits by some zero entries).
some extra checks. We refer to such a transformation as
augmenting a code with some new checks, for simplicity.
IV. HOMOMORPHIC CNOT AND
In general, the new code C ′ has n′ = n, k ′ ≤ k and d′ ≥ d. MEASUREMENTS FOR HOMOLOGICAL
For the purpose of this work, we will need to mod- PRODUCT CODES
ify classical codes in a way that preserves the code dis-
tance. The augmenting-expurgating operation trivially
In this section, we present our main technical results
satisfies this requirement since it only removes a subset
— constructing nontrivial logical homomorphic CNOT
of codewords. However, the same does not hold for the
and measurements (see Def. 3) for generic homological
puncturing-shortening operation in general since some
product codes (see Sec. III C).
bits are removed during such an operation. Neverthe-
less, as we will show in the following, we can make sure
that the distance is preserved if we only puncture on a A. Quantum-code homomorphisms induced by
specific subset of bits for any given code. classical-code homomorphisms
Given any [n, k, d] classical code C with a check matrix
(n−k)×n
H ∈ F2 and a set of bits labeled by the column As introduced in Sec. III D, constructing a homomor-
indices of H, i.e. B ≃ [n], we can find a subset of n − k phic CNOT between two quantum codes Q and Q′ com-
bits BNI such that the columns of H indexed by BNI are prises finding a homomorphism γ ∶ Q′ → Q. However,
linearly independent. Without loss of generality, we can finding a nontrivial homomorphism between two generic,
assume that BNI are the last n−k bits since otherwise we non-topological quantum codes is challenging [29]. For-
can simply permute BNI to the last n − k bits. Then, by tunately, utilizing the product structure of homological
performing row elementary operations, we can transform product codes (Sec. III C), we can reduce the task of
H to a canonical form: finding homomorphisms between two homological prod-
uct codes to finding homomorphisms between their base
Hc = (h1 , h2 , ⋯, hk , In−k ) , (17)
classical codes, which, as we will show later, is a much
(n−k)×1 easier task.
where hi ∈ F2 . With this canonical Hc , we can
Let {C i }i∈[D] and {C ′i }i∈[D] be two sets of base classi-
easily obtain the generator matrix, which is also in the
cal codes for constructing two D-dimensional homologi-
canonical form:
cal product codes Q and Q′ , respectively. Let {γ i ∶ C ′i →
⎛ hT1 ⎞ C i }i∈[D] be a set of homomorphisms between the classical
⎜ hT2 ⎟ codes, i.e. the following diagram is commutative:
Gc = ⎜Ik , ⎟. (18)
⎜ ⋯ ⎟ ∂1i
⎝ hTk ⎠ C1i C0i
γ1i γ0i (20)
The complementary of BNI , BI ∶= [n]/BNI (the first
∂1′i
k bits in the canonical form), are referred to as the in- C1′i C0′i
formation bits in the classical code literature [34]. Now,
we show that puncturing on any set of bits S ⊆ BI that In the following, we will show that a homomorphism γ ∶
are information bits does not reduce the code distance. Q′ → Q can be essentially constructed by taking tensor
Again, without loss of generality, we assume BI = [k] products of the classical-code homomorphisms {γ i }i∈[D] .
9

Recall that to construct a homological product Q, we Proof. We need to prove that the following diagram is
first construct a product complex D = Prod({C i }D i=1 ) as commutative
the tensor product of all the base classical codes (see
Def. 1). Then we project D onto a length-D chain com- Tk
δk
Tk−1
plex T = Tot(D) (see Def. 2). Finally, for D ≥ 2, we
define the quantum code Q ⊆ T as a length-2 subcom-
γk γk−1 (26)
plex of T . The same construction is applied to Q′ , i.e.

δk
Tk′ ′
Tk−1
Q′ ⊆ T ′ ∶= Tot(D′ ), where D′ ∶= Prod({C ′i }i∈[D] ).
To construct a homomorphism between Q and Q′ , we
first construct a homomorphism between D and D′ by Let a′ = ⊕∣⃗x∣=k a′x⃗ ∈ Tk′ , where a′x⃗ ∈ Dx′⃗ . According to
simply taking the tensor product of the classical-code Eq. (8) and Eq. (25), we have
homomorphisms:
δk γk a′ = δk ( ⊕ γx⃗D a′x⃗ ) = ∑ ( ⊕ ∂y⃗,⃗x γx⃗D a′x⃗ ), (27)
Proposition 6 (Classically induced homomorphism for ∣⃗
x∣=k x∣=k ∣⃗
∣⃗ y ∣=k−1
product complexes). The linear map γ D = {γx⃗D ∶ Dx′⃗ →
Dx⃗ }x⃗ , where and
D
γx⃗D ∶= ⊗ γxi i , (21) γk−1 δk′ a′ = ∑ γk−1 ( ⊕ ∂y′⃗,⃗x a′x⃗ ) = ∑ ( ⊕ γyD ′
⃗ ∂y⃗,⃗

⃗ ).
x ax
i=1 ∣⃗
x∣=k ∣⃗
y ∣=k−1 x∣=k ∣⃗
∣⃗ y ∣=k−1
(28)
is a homomorphism between D′ and D. To prove Eq. (27) equals Eq. (28), we only need to show
Proof. We need to show that γ D preserves the boundary ∂y⃗,⃗x γx⃗D a′x⃗ = γyD ′
⃗ ∂y⃗,⃗

⃗ − y⃗ = e⃗i for some i ∈ [D],
⃗ . If x
x ax
maps of the product complexes. More concretely, we need ∂y⃗,⃗x = ∂x⃗ (see Eq. (9)), and
i

to show that the following diagram is commutative for


⃗ and i:
any x ∂y⃗,⃗x γx⃗D = ∂x⃗i γx⃗D = γx⃗D−⃗ei ∂x⃗′i = γyD ′
x,
⃗ ∂y⃗,⃗ (29)
i
∂x

Dx⃗ Dx⃗−⃗ei according to Proposition 6 (see Eq. (23)); Otherwise,
′ ′
D
γx D
γx−⃗ (22) ∂y⃗,⃗x γx⃗D = γyD x = 0 since ∂y⃗,⃗
⃗ ∂y⃗,⃗ x = 0.
x = ∂y⃗,⃗
⃗ ⃗ ei
′i
∂x
Dx′⃗ ⃗
Dx′⃗−⃗ei
B. Classical-code homomorphisms
Based on Eq. (4) and Eq. (21), we have
D D According to Proposition 7, we can find a homomor-
∂x⃗i γx⃗D = ⊗(∂xj j )δi,j γxj j = ⊗ γxj j −δi,j (∂x′jj )δi,j = γx⃗D−⃗ei ∂x⃗′i , phism between two homological product codes by simply
j=1 j=1
(23) finding a set of homomorphisms between their base clas-
where we have utilized the assumption that γ j ∶ C j′ → C j sical codes. In this section, we construct a few useful
is a homomorphism, i.e. classical-code homomorphisms based on the puncturing
and the augmenting operations on classical codes (see
∂xj j γxj j = γxj j −1 ∂x′jj . (24) Sec. III E).
We first show that the puncturing (see Def. 4) and
the augmenting (see Def. 5) operations on a classical
With the classically induced homomorphism γ D ∶ D′ → code are structure-preserving and they naturally induce
D, we can transform it to a homomorphism between the a homomorphism between the old code and the modified
total complexes γ ∶ T ′ → T , which also serves as the code, which we call the puncturing-augmenting homo-
homomorphism between the subcomplexes Q′ ⊆ T ′ and morphism:
Q⊆T:
Proposition 8 (Puncturing-Augmenting homomor-
Proposition 7 (Classically induced homomorphism for H
phism for classical codes). Let C ∶ C1 Ð→ C0 be a [n, k, d]
homological product codes). The linear map γ = {γk ∶
classical code, S ⊆ [n] a subset of bit indices, and H0 ∈
Tk′ → Tk } from T ′ to T , where m×(n−∣S∣)
F2 a set of extra checks. Without loss of gen-
γk ∶= ⊕ γx⃗D , (25) H S,+H0
∣⃗
x∣=k
erality, assume that S = [∣S∣]. Let C ′ ∶ C1′ ÐÐÐÐ→ C0′
be another classical code obtained by puncturing C on
with {γx⃗D } defined in Eq. (21), is a homomorphism S and then augmented with H0 . Then the linear map

from T to T . Note that the direct sum in Eq. (25) γ = {γ1 ∶ C1′ → C1 , γ0 ∶ C0′ → C0 }, where
means that γk is in a block-diagonal form, i.e. γk Tk =
γk (⊕∣⃗x∣=k Dx⃗ ) = ⊕∣⃗x∣=k (γx⃗D Dx⃗ ). γ also serves as a homo- 0∣S∣×(n−∣S∣)
γ1 = ( ), γ0 = (In−k , 0(n−k)×m ) , (30)
morphism from Q′ ⊆ T ′ to Q ⊆ T . In−∣S∣
10

is a homomorphism from C ′ to C, i.e. For example, as shown in Fig. 1(a,b), by puncturing


the classical codes on selected subsets of bits, we remove
C1 H
C0 a subset Q0 of the qubits Q of Q when constructing Q′ .
Let γ = {γ2 , γ1 , γ0 } ∶ Q′ → Q be the homomorphism in-
γ1 γ0 (31)
duced by the classical puncturing-augmenting homomor-
C1′ H S,+H0
C0′ phisms (see Proposition 8). The qubits Q′ are identified
with Q/Q0 under γ1 , i.e. γ1 (Q′i ) = Qi for i ∈ [∣Q/Q0 ∣],
is commutative. where we have labeled the qubits such the Q0 are the
last ∣Q0 ∣ qubits of Q. Deleting Q0 also deletes a subset
Proof. Based on the definition of H S,+H0 , we have of logical qubits in Q when constructing Q′ . Specifi-
cally, let L̄ be the set of nontrivial logical operators of
HS Q. We can choose a representation of the logical qubits
H = (α, H S ), H S,+H0 = ( ). (32) Q̄ = {Q̄i }ki=1 , such that the logical X and Z operators
H0
(X̄i , Z̄i ) (X̄i , Z̄i ∈ L̄) of Q̄i form conjugating pairs, i.e.
for some α ∈ F2
(n−k)×∣S∣
. Then, according to Eq. (30), [X̄i , Z̄j ] = 0 for i ≠ j and {X̄i , Z̄i } = 0. We find a similar
basis for the logical qubits Q̄′ of Q′ with a logical opera-
k−∣Q̄ ∣
Hγ1 = H S = γ0 H S,+H0 . (33) tor basis {(X̄i′ , Z̄i′ )}i=1 0 , where Q̄0 ⊆ Q̄ denotes the set
of logical qubits that are removed. The logical operators
of Q̄′ are identified with those of Q̄/Q̄0 under γ1 , i.e.

Note that in Proposition 8, we have assumed that S γ1 (X̄i′ ) = X̄i , γ1 (Z̄i′ ) = Z̄i , (34)
are the first ∣S∣ bits for simplicity. In general, for any
S ⊆ [n], the bits [n − ∣S∣] of C ′ are identified with the bits for i ∈ [k − ∣Q̄0 ∣]. Note that, again, we have labeled
[n]/S of C. Then, γ1 can be defined as the inclusion map the logical qubits of Q such that Q̄0 are the last ∣Q̄0 ∣
from [n − ∣S∣] to [n] with such an identification. logical qubits. With a slight abuse of notation, we write
If a homomorphism in Proposition 8 only involves γ1 (Q̄′i ) = Q̄i .
puncturing (augmenting) of the classical code, we refer
to it as a puncturing (augmenting) homomorphism. The homomorphic CNOT gate (specified by γ1 ) be-
tween Q and Q′ is implemented by physical transver-
sal Q-controlled CNOTs between Q/Q0 and Q′ . This
amounts to applying logical transversal Q-controlled
C. Homomorphic measurement gadget for generic
homological product codes CNOTs between Q̄/Q̄0 and Q̄′ . Specifically, the physical
CNOTs transform the logical operators of the two codes
as follows:
In this section, we sketch the homomorphic measure-
ment gadget that can perform selected and parallel PPMs (X̄i , Z̄i ) → (X̄i X̄i′ , Z̄i ),
on a generic homological product code. (35)
To perform a selected set of PPMs on a data code (X̄i′ , Z̄i′ ) → (X̄i′ , Z̄i Z̄i′ ),
Q, we first prepare a carefully designed ancilla code Q′ ,
which is another homological product code of the same for any i ∈ [k − ∣Q̄0 ∣], and
dimension. According to Def. 3, we can construct a
homomorphic CNOT gadget from Q to Q′ if we can (X̄i , Z̄i ) → (X̄i , Z̄i ), (36)
find a homomorphism between Q and Q′ . According
to Proposition 7, such a homomorphism can be con-
structed by essentially taking the tensor product of the for any i ∈ {k − ∣Q̄0 ∣ + 1 → k}. Then, using the generalized
homomorphisms between the base classical codes. We Steane measurement circuit shown in Fig. 1(b), we can
construct such classical-code homomorphisms by using perform a parallel, non-destructive measurement of the
the puncturing-augmenting homomorphisms presented in logical Z operators of Q̄/Q̄0 using the ancilla Q̄′ .
Proposition 8. Under such a construction, the base codes As we will show later, we can also measure certain
of Q′ are constructed by puncturing and/or augmenting products of logical Z operators of Q̄ by also augmenting
the base codes of Q, which can remove some classical new checks to the base codes of Q when constructing Q′ .
codewords. As we will show in Sec. V and Sec. VI, the Note that the above homomorphic measurement gad-
logical operators of Q and Q′ are essentially given by get can be both parallel and selective since, depending
distributing their base classical codewords to different on the puncturing and augmenting pattern we perform
rows/columns. As such, we can obtain a smaller an- on the base codes of Q, we can obtain different ancilla
cilla code Q′ that encodes fewer logical qubits. Then, codes with different logical qubits, and thereby different
using the generalized Steane measurement gadget (see patterns of PPMs on Q. The number of parallel PPMs
Fig. 1(b)), we can achieve selected measurements on a being performed equals the number of logical qubits in
subset of logical qubits of Q using Q′ . Q′ .
11

D. Homomorphic measurement gadget for HGP Now, we arrange the quantum bits and checks of Q
codes on a 2D grid and label them with their coordinates. As
shown in Fig. 1(a), by laying the bits/checks of the first
Following the general description in Sec. IV C for and the second classical code vertically and horizontally,
generic homological product codes, we concretely con- respectively, we have the following identification of the
struct, as an example, homomorphic measurement gad- quantum bits and checks with the Cartesian product of
gets for the HGP codes. the classical bits and checks:
We first identify a canonical logical operator basis that Q = B1 × B2 ∪ C1 × C2
defines a canonical set of logical qubits for a generic HGP
≃ [n1 ] × [n2 ] ∪ {n1 + 1 → n1 + r1 } × {n2 + 1 → n2 + r2 },
code. In such a basis, the logical qubits form a 2D grid
and, as we will show later, such a basis facilitates the SZ = C1 × B2 ≃ {n1 + 1 → n1 + r1 } × [n2 ],
construction of our homomorphic measurement gadget. SX = B1 × C2 ≃ [n1 ] × {n2 + 1 → n2 + r2 },
(39)

1. Hypergraph product codes and their canonical logical where we denote r1 ∶= n1 −k1 and r2 ∶= n2 −k2 as the num-
operator basis ber of (independent) checks of H1 and H2 , respectively.
With these coordinates, each basis element in Q2 , Q1 , or
∂11 ∂12 Q0 is associated with the corresponding object (Z check,
Let C 1 ∶ C11 Ð→ C01 and C 2 ∶ C12 Ð→ C02 be two length-1 qubit, or X check) placed at their assigned coordinate.
chain complexes. As shown in Eq (37), For instance, the basis element e⃗i ⊗ e⃗j in Q1 is associated
with a qubit at the coordinate (i, j), which we denote as
Q0 C01 ⊗ C02 Qi,j .
I⊗∂12 A complete set of logical X and Z operators of Q are
HX
∂11 ⊗I given by [27, 44]
Q1 C01 ⊗ C12 C11 ⊗ C02
f ⊗h
I⊗∂12 X̄ = {( ) ∣ f ∈ ker(H1 ), h ∈ rs(H2 )● } ,
T
HZ 0
∂11 ⊗I (40)
C11 ⊗ C12 h′ ⊗ f ′
Q2 Z̄ = {( ) ∣ h′ ∈ rs(H1 )● , f ′ ∈ ker(H2 )} ,
0
where rs(Hα )● denotes the complementary space [53] of
(37) rs(Hα ) in Fn2 α for α = 1, 2.
we can construct a 2D homological product code Q ∶ We now find a canonical basis for the logical operators
T
HZ HX in Eq. (40) such that they form conjugate pairs and they
Q2 ÐÐ→ Q1 ÐÐ→ Q0 , also called a HGP code, as the total admit a canonical form analogous to that of a classical
complex of the tensor product of C 1 and C 2 . code in Eq. (18). In addition, the logical qubits in such a
Specifically, we have: Q2 = C11 ⊗ C12 , whose basis are canonical basis will be arranged on a 2D grid. Without
associated with the Z checks SZ ; Q1 = (C01 ⊗ C12 ) ⊕ (C11 ⊗ loss of generality, we assume that each Hα is row-reduced
C02 ), whose basis are associated with the qubits Q; Q0 = to their canonical form,
C01 ⊗ C02 , whose basis are associated with the X checks
SX . 1 , h2 , ⋯, hkα , Inα −kα ),
Hα,c = (hα α α
(41)
We assign C 2 with a [n2 , k2 , d2 ] classical code with a nα −kα
(n −k )×n
check matrix H2 ∈ F2 2 2 2 in the standard way. The via elementary row operations, where hα j ∈ F2 . Note
basis of C12 and C02 are associated with the bits B2 and that this is always the case if we permute the informa-
the checks C2 of the code, respectively, and ∂12 = H2 . tion bits of each classical code to the first few bits (see
However, to be consistent with the literature, we assign Sec. III E). Using the canonical form of Hα , we can derive
C 1 with the transpose of another [n1 , k1 , d1 ] classical code their generator matrices whose rows span ker(Hα ):
(n −k )×n
with a check matrix H1 ∈ F2 1 1 1 . In this case, the ⎛ hαT
1 ⎞
1 1
basis of C1 and C0 are associated with the checks C1 ⎜ hαT ⎟
and the bits B1 , respectively, and ∂11 = H1T . Gα = ⎜Ikα , 2 ⎟. (42)
⎜ ⋯ ⎟
Under such an assignment, we have a [[n = n1 n2 +(n1 − ⎝ hαT ⎠

k1 )(n2 − k2 ), k = k1 k2 , d = min{d1 , d2 }]] HGP code with
check matrices Let enj denote a unit n-dimensional column vector with
ekj α
HX = (In1 ⊗ H2 , H1T ⊗ In2 −k2 ), j ∶= ( α ). Then we
the j-th entry being 1, and let bα
(38) hj
HZ = (H1 ⊗ In2 , In1 −k1 ⊗ H2T ). have

Note that we have assumed that both H1 and H2 are full ker(Hα ) = rs(Gα ) = span{bα
j }j∈[kα ] ,
(43)
rank. rs(Hα )● = rs(Hα,c )● = span{enj α }j∈[kα ]
12

Substituing Eq. (43) into Eq. (40), we can find a the ancilla code. In Theorem 9, we prove that the gad-
canonical basis for X̄ and Z̄ forming conjugating pairs get implements the desired logical measurements and is
{(X̄i,j , Z̄i,j )}i∈[k1 ],j∈[k2 ] , where: fault-tolerant.

b1i ⊗ enj 2 eni 1 ⊗ b2j Algorithm 1: Horizontal PPMs for HGP code
X̄i,j = ( ), Z̄i,j = ( ). (44)
0 0 Input : An HGP code Q = HGP(H1 , H2 ) with a
[n1 , k1 , d1 ] base vertical code and a
It is easy to verify the commutation relation for the [n2 , k2 , d2 ] base horizontal code; A
paired logical operators in Eq. (44) since collection of disjoint horizontal hyperedges
Eh = {ei }, where ei ⊆ [k2 ].
T
X̄i,j Z̄i,j = (b1T
i ei′ )(ej
n1
bj ′ ) = δi,i′ δj,j ′ mod 2.
n2 T 2
(45) Output : A horizontal PPMs gadget.
1 Let S = [k2 ]/(⋃e∈Eh e), and HRep Eh
∈ Fr×n
2
2
the check
A key feature for such a canonical basis in Eq. (44) is matrix of the ∣Eh ∣ disjoint repetition codes, each
that each pair of logical operators (X̄i,j , Z̄i,j ) are sup-
E
+H h ,S
supported on ei ∈ Eh . Let H2′ = H2 Rep be the
ported on the j-th column and i-th row of the qubit check matrix obtained by first augmenting the checks
grid, respectively, and they overlap at exactly one physi- Eh
in HRep and then puncturing on S. Construct an
cal qubit with coordinate (i, j) on the [k1 ]×[k2 ] subgrid. ancilla code Q′ = HGP(H1 , H2′ ) with qubits Q′ .
See Eq. (39) for the coordinate system and Fig. 1(a) for // Construct an ancilla code by performing
an example of Q̄1,1 and Q̄2,3 . As such, we can think of appropriate puncturing and augmenting on the
the set of logical qubits Q̄ = {Q̄i,j }i∈[k1 ],j∈[k2 ] as arranged horizontal classical code
on a [k1 ] × [k2 ] 2D grid, which are in one-to-one corre- 2 Let O denote the coordinates of the qubits Q of Q,
spondence with the [k1 ] × [k2 ] subgrid of physical qubits O0 = [n1 ] × S, and
O1 = {n1 + 1 → n1 + (n1 − k1 )} × {n2 + (n2 − k2 ) + 1 →
(see the upper left physical block in Fig. 1(a)).
n2 + (n2 − k2 ) + r}. We have Q ≃ O and
Q′ ≃ O/O0 ∪ O1 .
// See Fig. 2(b) for an illustration of the
2. A basic homomorphic measurement gadget coordinates and the extra qubits outside the
solid box in the middle panel for an
Let Q = HGP(H1 , H2 ) be a HGP code with a illustration of O1 .
[n1 , k1 , d1 ] base vertical code and a [n2 , k2 , d2 ] base hori-

3 Prepare Q′ in ∣0⟩⊗∣Q ∣ and measure the stabilizers of Q′
zontal code. Recall that in the canonical logical operator for d = min{d1 , d2 } rounds.
basis (see Eq. (44)), the logical qubits of Q are arranged 4 Apply transversal Q-controlled CNOTs between
on a [k1 ] × [k2 ] grid, i.e. Q̄ = {Q̄i,j }i∈[k1 ],j∈[k2 ] . Let Q∣O/O0 and Q′ ∣O/O0 .
Eh = {ei } be a collection of disjoint horizontal hyper- 5 Transversally measure Q′ in the Z basis.
edges, i.e., ei ⊆ [k2 ] and ei ∩ ej = ∅ for i ≠ j. We present // Implement the generalized Steane measurement
circuit in Fig. 1(b)
a gadget for measuring k1 × ∣Eh ∣ logical Pauli products,
which are horizontal Pauli products specified by Eh across
all the k1 rows: ⋃i∈[k1 ] {⊗j∈e Z̄i,j }e∈Eh , in parallel.
Eh
To simplify the notation, let Hrep denote the check Theorem 9. The horizontal-PPMs gadget in Alg. 1
matrix of ∣Eh ∣ disjoint repetition codes, each supported performs logical measurements of k1 × ∣Eh ∣ PPMs,
Eh
on ei ∈ Eh , i.e., Hrep is the vertical concatenation of {Hi ∈ ⋃i∈[k1 ] {⊗j∈e Z̄i,j }e∈Eh , of a HGP code in parallel and
(∣e ∣−1)×n fault-tolerantly.
F2 i 2
}, where the rows of Hi are simply parities of
any two bits of ei . For example, for n2 = 6 and Eh = Proof. Let H2,c = (h1 , h2 , ⋯, hk2 , In2 −k2 ) be the canonical
{{1, 2, 3}, {4, 5}}, we have form of H2 . The corresponding generator matrix is then
⎛ hT1 ⎞
⎛1 1 0 0 0 0⎞ ⎜ hT ⎟
Eh
Hrep = ⎜ 0 1 1 0 0 0 ⎟. (46) G2 = ⎜Ik2 , 2 ⎟ . Without loss of generality, assume that
⎝0 0 0 1 1 0⎠ ⎜ ⋯ ⎟
⎝ hT ⎠k2
We present the horizontal PPMs gadget in Alg. 1. The the hyperedges in Eh are ordered, i.e. Eh = {ei }ti=1 , where
key is to construct an ancilla code by puncturing and aug- ei = {∑i−1
j=1 ∣ej ∣ + 1 → ∑j=1 ∣ej ∣}. According to Def. 5, the
i

menting the original horizontal classical code according +H


Eh
generator matrix of H2 rep , G2,−H Eh , is given by remov-
to Eh . Specifically, we puncture on all the bits not in rep

Eh and augment repetition codes supported on each of ing the codewords in G2 that do not satisfy the extra
Eh
the hyperedges in Eh . This removes all the columns of constraints imposed by the augmented checks Hrep . It is
(t+∣S∣)×n2
logical qubits with indices out of Eh and merges columns straightforward to find G2,−H Eh ∈ F2 and
rep
of logical qubits indexed by each of the hyperedges in
Eh , which guarantees that only Pauli products associated G2,−H Eh [i, ] = ∑ G2 [j, ], (47)
with Eh are measured using the merged logical qubits in rep
j∈ei
13

for i ∈ [t], and Finally, we show that the entire protocol is fault-
tolerant. Since we only puncture H2 on the information
t
bits, the distance of H2′ is preserved, i.e. d′2 ≥ d2 (see
G2,−H Eh [i, ] = G2 [ ∑ ∣ej ∣ + i, ] (48)
rep
j=1
Sec. III E). Since H2′ is still full-rank, the distance of Q′
satisfies d′ = min{d1 , d′2 } ≥ d = min{d1 , d2 }. Now, the log-
for i ∈ {t + 1 → t + ∣S∣}. Note that we denote M [j, ] as ical Steane measurement circuit is clearly fault-tolerant
the j-th row of a matrix M . Namely, each of the first as it uses a large-distance ancilla code and only involves
t codewords of G2,−H Eh are given by merging the code- fault-tolerant gadgets: computational basis state prepa-
rep
words of G2 indexed by ei and the last ∣S∣ codewords of ration with d code cycles, transversal logical gates, and
G2 are preserved. Finally, according to Def. 4, the gener- transversal readout.
+H
Eh
ator matrix of H2′ ∶= H2 rep , G′2 , is given by shortening
,S

G2,−H Eh on S, which simply corresponds to removing the V. PARALLELIZABLE LOGICAL


rep
last ∣S∣ codewords of G2,−H Eh and deleting the columns COMPUTATION WITH HYPERGRAPH
rep
t×(n2 −∣S∣) PRODUCT CODES
indexed by S, i.e., G′2 ∈ F2 and

G′2 [i, ] = ∑ G2 [j, ]∣[n2 ]/S . (49) In this section, we present new schemes for realiz-
j∈ei ing parallel logical computations using only HGP codes.
The new schemes leverage the transversal (homomor-
Let ker(H2 ) = span{b2i }i∈[k2 ] , where b2i = G2 [i, ]T , and phic) CNOTs between two distinct HGP codes, and the
rs(H2 )● = span{eni 2 }i∈[k2 ] . According to Eq. (49), we related selective homomorphic measurements, that we
have constructed in Sec. IV. Although this section aims to be
self-contained and only quote the results in Sec. IV in a
ker(H2′ ) = rs(G′2 ) = span{( ∑ b2j )∣[n2 ]/S }i∈[t] . (50) non-technical way, readers are encouraged to quickly go
j∈ei
through Sec. IV, particularly Sec. IV D, to get familiar
In addition, one can derive that with the notation and high-level ideas.
In Sec. V A, we first put the coding-theoretical and
rs(H2′ )● = span{(en∑2i−1 ∣e ∣+1 )∣[n2 ]/S }i∈[t] . (51) physical-level results in Sec. IV together and obtain a
j
j=1
new fault-tolerant logical gadget for a generic HGP code,
Then, according to the canonical logical operator basis in that performs selective PPMs on any subgrid of the log-
Eq. (44), the logical operators of Q′ are identified with ical qubits in parallel. Then, in Sec. V B, we consider
those of Q via their shared coordinates: logical-level computations with HGP codes by utilizing
the new parallel PPMs gadget, combined with known

X̄i,j ≃ X̄i,∑j−1 ∣ej ∣+1 , logical transversal/fold transversal gates.
k=1
′ (52)
Z̄i,j ≃ ⊗ Z̄i,k
k∈ej
A. Grid Pauli product measurements for HGP
According to Proposition 7 and 8, we can construct a codes
homomorphism γ = {γ2 , γ1 , γ0 } ∶ Q′ → Q induced by the
classical puncturing-augmenting homomorphism from H ′ Here, we present the construction of a homomorphic
to H, where γ1 identifies qubits with the same coordi- measurement gadget for HGP codes that measures Pauli
nates, i.e. γ1 ∶ Q′ ∣O/O0 → Q∣O/O0 . Finally, the logical products on any subgrid of the logical qubits selectively
action associated with the transversal CNOTs specified and in parallel. We refer to such a gadget as a “Grid
by γ1 can be calculated: PPMs” (GPPMs) gadget (see Def. 10) and will use this as
′ ′
an elementary gadget for executing logical computations
Z̄i,j → Z̄i,j ⊗ Z̄i,k , (53) with HGP codes later in this work.
k∈ej
The GPPMs gadget is essentially built upon the
for any (i, j) ∈ [k1 ] × [t], and homomorphic measurement gadget we introduced in
Sec. IV D 2 (see Alg. 1). Let Q be an HGP code con-

X̄i,k → X̄i,k X̄i,j , (54) structed by taking the hypergraph product of a vertical
[n1 , k1 , d1 ]-classical code H1 and a [n2 , k2 , d2 ]-horizontal
up to some stabilizers, for any (i, j) ∈ [k1 ]×[t] and k ∈ ej . classical code H2 . The horizontal Z-PPMs gadget mea-
Other logical operators of Q′ and Q remain unchanged. sures horizontal Z-type PPMs, ⋃i∈[k1 ] {⊗j∈e Z̄i,j }e∈Eh ,
Eq. (53) and Eq. (54) indicate that the constructed specified by a set of horizontal hyperedges Eh across all
logical gate implements the logical CNOTs between each the rows (see the horizontal empty squares in Fig. 2(c)
logical qubit Q̄′i,j and {Q̄i,k }k∈ej . Therefore, the Steane for an illustration). The key of the gadget is to first con-
measurement circuit utilizing such logical CNOTs imple- struct an ancilla code Q′ by puncturing some bits of H2 ,
ments the logical PPMs ⋃i∈[k1 ] {⊗j∈e Z̄i,j }e∈Eh in parallel. thereby removing any action on the corresponding qubits,
14

a b

Step 2 Step 2

Step 1 Step 1 Classical bit


Classical check
Physical Qubit
Quantum X check
Quantum Z check
Logical Qubit

FIG. 2. Illustration of parallel Grid Pauli product measurements (GPPMs) for HGP codes. (a) An example for
measuring the single-qubit Z operator of the top-left logical qubit in Q̄. An ancilla code Q′ is constructed by puncturing on
the second and the third bits of the horizontal base code of Q; another mask code Q′′ is constructed by puncturing on the first
bit of the vertical base code of Q′ . In the first step, the bottom two logical qubits of Q′ are reset to ∣+⟩ using the mask code Q′′
and the Q′′ -controlled homomorphic CNOT; in the second step, the desired Z measurement on the top-left logical qubit of Q is
obtained using Q′ and the Q-controlled homomorphic CNOT. (b) Another example for measuring the weight-four Z operator
supported on the top-left four logical qubits in Q̄. An ancilla code Q′ is constructed by first puncturing on the third bit of the
horizontal base code of Q and then augmenting a check that connects the first two bits; another mask code Q′′ is constructed
by augmenting a check that connects the first two bits of the vertical base code of Q′ . In the first step, the bottom logical qubit
of Q′ is reset to ∣+⟩ while the top two logical qubits are prepared to a Bell state using Q′′ and the Q′′ -controlled homomorphic
CNOT; in the second step, the desired weight-four Z operator on the top-left four logical qubits of Q is measured using the Q′
and the Q-controlled homomorphic CNOT. (c) Illustration of a general GPPMs gadget that measures a grid pattern of PPMs
on a subgrid of the logical qubits. The PPMs (the 3D diamonds) are specified by the product of two collections of hyperedges,
where each hyperedge (the empty squares) is a set of rows or columns.

and then augmenting new checks to it, thereby measuring puncturing-augmenting operation of H1 actually induces
Pauli products given by the checks. We then implement a puncturing-augmenting homomorphism from C1 to C1′ .
the homomorphic Q-controlled CNOT between Q and Q′ This is because if H1′ is obtained by puncturing (aug-
and measure Q′ to complete the PPM. menting) H1 , then H1T is obtained by augmenting (punc-
We can similarly construct a vertical PPMs gadget turing) H1′T . Consequently, the homomorphic CNOT
that measures vertical X-PPMs specified by a set of between Q and Q′ now reverses direction and becomes
vertical hyperedges Ev across all the columns. We can Q′ -controlled both physically and logically. As such, we
simply achieve this by performing the same puncturing- should prepare the logical qubits of Q′ in the X basis,
augmenting operation on the vertical code H1 of Q, in- apply Q′ -controlled homomorphic CNOTs, and finally
stead of the horizontal code H2 . Note, however, that the measure Q′ transversely in the X basis. Then, this gad-
quantum code homomorphism γ = {γ2 , γ1 , γ0 } ∶ Q → Q′ get implements the logical PPMs ⋃j∈[k2 ] {⊗i∈e X̄i,j }e∈Ev
(see Def. 3 and Sec. IV D 2) now reverses direction, since in parallel.
the base vertical complex C1 and C1′ are associated with In the following, we show how to construct a GPPMs
the transpose of the corresponding vertical codes, and the gadget that measures PPMs on any subgrid of the logi-
15

cal qubits [k1 ] × [k2 ], which could contain PPMs across would perform weight-2 Z̄i,1 Z̄i,2 measurements across all
different columns and rows, by combining the horizontal the rows on Q. To obtain the desired weight-4 measure-
Z-PPMs gadget and the vertical X-PPMs gadget. ment, we again introduce another mask code Q′′ . We
As the simplest example, we show how to perform a construct Q′′ by augmenting an extra check to H1′ that
Z measurement for only the top-left (1, 1) logical qubit. checks the first two bits. This merges the first two logical
As illustrated in Fig. 2(a), by puncturing the horizontal qubits in Q′′ . Then, applying the vertical X-PPMs gad-
code on all but the very first bit, we can simultaneously get with Ev = {{1, 2}, {3}, {4}, ⋯, {k1 }} between Q′ and
remove all but the first column of the logical qubits of Q′′ performs a X̄1,1′ ′
X̄2,1 measurement on the first two
Q when constructing the ancilla code Q′ . Applying the ′
logical qubits of Q and single-qubit X measurements on
horizontal PPMs gadget with horizontal hyperedges Eh = remaining logical qubits. This creates a Bell pair for the
{{1}} would then perform single-qubit Z measurements first two while masking (resetting to ∣+⟩ states) the rest of
on the first-column logical qubits of Q. the logical qubits. Finally, the horizontal Z-PPMs gadget
To only measure Q̄1,1 , we introduce another code Q′′ , between Q and Q′ performs the desired Z̄1,1 Z̄1,2 Z̄2,1 Z̄2,2
which we call the mask code, that is obtained by punc- measurement.
turing the vertical code of Q′ on the first bit. As shown Finally, we can generalize the above protocol and per-
in Fig. 2(a), doing so removes the first logical qubit of Q′ . form the following pattern of PPMs in parallel on a HGP
We can then perform single-qubit X measurements on all code:
but the first logical qubit of Q′ with the mask code Q′′
by utilizing the vertical PPMs gadget with hyperedges Definition 10 (Grid PPMs). Given a canonical repre-
Ev = {{i}}i∈[k1 ]/[1] . Combining these elements together, sentation of logical qubits in an HGP code on a 2D grid
we obtain a two-step protocol for measuring the (1, 1) [k1 ] × [k2 ], and two sets of disjoint hyperedges Er and Ec ,
logical qubit of Q: where each hyperedge is a collection of rows or columns,
respectively, then we define a pattern of Grid PPMs of a
1. Prepare all the logical qubits of Q′ and Q′′ in ∣0⟩ type P ∈ {X, Z} as:
and ∣+⟩ states, respectively. Then perform vertical
X-PPMs on Q′ with Ev = {{i}}i∈[k1 ]/[1] using Q′′ , GPPMs(P, Er , Ec ) ∶= { ⊗ P̄q }er ∈Er ,ec ∈Ec , (55)
which resets all but the first logical qubit of Q′ into q∈er ×ec

∣+⟩ states.
where P̄q denotes the logical Pauli operator X̄ (Z̄) of the
2. Perform a horizontal Z-PPMs on Q with Eh = logical qubits Q̄q with coordinates q for P = X (Z).
{{1}} using Q′ . Note that only Q̄1,1 is meausred
since the rest of the first-column logical qubits of For completeness, we provide the concrete protocol for
Q are not entangled with the corresponding logi- implementing a Z-type GPPMs in Alg. 2. Note that
cal qubits in Q′ , which are reset to ∣+⟩ by the first step 2 of Alg. 2 merges columns of logical qubits of Q′
homomorphic measurement, via the homomorphic according to Ec and step 4 further prepares these merged
CNOT gate. logical qubits into vertical disjoint GHZ states according
to Er across all the columns. Together, they make sure
Obviously, the above scheme can be readily generalized that the final step measures the desired PPMs on disjoint
to performing parallel single-qubit Z measurements on a grids according to Er × Ec . Note that we can construct
subgrid of the logical grid, i.e. logical qubits supported a GPPMs gadget measuring X-type PPMs using a two-
on the intersection of any subset of rows Rows = {ri } step protocol similar to Alg. 2, except that we now con-
and columns Cols = {cj }. This can be done by punctur- struct the ancilla code and the mask code by puncturing-
ing H2 on [k2 ]/Rows and puncturing H1′ on Cols when augmenting the vertical classical code and the horizontal
constructing Q′ and Q′′ , respectively. classical code, respectively, and consequently, the homo-
Moreover, we can generalize the above scheme to morphic CNOTs, e.g. in Fig. 2(a), all reverse direction.
measure some pattern of Pauli product measurements For a constant-rate HGP code encoding k logical
(PPMs) on a subgrid of the logical grid. As an exam- qubits, each pattern of GPPMs is implemented in par-
ple, we show how to measure a weight-4 Pauli product allel with a constant space overhead since the data, the
Z̄1,1 Z̄1,2 Z̄2,1 Z̄2,2 supported on the intersection of the first ancilla, and the mask code are all of size O(k). Mean-
two columns and rows in Fig. 2(b). We first construct an while, it only takes d + O(1) code cycles (only step 3 of
ancilla patch Q′ by puncturing H2 on all but the first Alg. 2 takes d cycles while other steps are of constant
two bits and then augmenting an extra check that checks depth). Let a logical cycle refer to d code cycles, then
the first two bits. Doing so removes all but the first two each GPPM can be implemented efficiently with O(1)
columns of logical qubits of Q. In addition, the remaining space overhead in O(1) logical cycles.
two columns of logical qubits merge into one column by Note that it is also possible to implement PPMs with
the augmented checks, i.e. the logical operators of each other patterns, e.g. PPMs with a mixture of X and Z
pair of logical qubits in each row are now equivalent up Paulis, if combining the homomorphic CNOT with other
to some stabilizers in Q′ . Now, applying the horizontal Clifford operations such as the fold-transversal H-SWAP
Z-PPMs gadget with Eh = {{1, 2}} between Q and Q′ gate in Table I during the Steane measurement. In this
16

Algorithm 2: Grid PPMs for HGP code gates, consisting of Hadamards, S gates, and intra-block
Input : An HGP code Q = HGP(H1 , H2 ); Two sets
CNOTs, acting on k logical qubits of a [[n, k, d]] HGP
of hyperedges Er and Ec code and compare its space-time cost to that using sur-
Output : A Grid PPMs gadget GPPMs(Z, Er , Ec ). face codes with the same distances. As shown in Table II,
// Note that classical Pauli frame updates although implementing such a sequence of PPMs using
based on the measurement outcomes are HGP data codes and lattice surgery with rateless ancil-
neglected here for simplicity. lae [13, 14, 25] (ancillae with vanishing encoding asymp-
1 Let Eh = Ec and Sh = [k2 ]/(⋃eh ∈Eh eh ). Construct Ev totically, e.g. surface codes) has a lower space overhead
and Sv as follows: For each ev ∈ Er , if ∣ev ∣ = 1, compared to using only surface codes, their space-time
append ev to Sv ; Otherwise (∣ev ∣ ≥ 2), append the cost is essentially the same, since the Θ(k) gates would
parities of their components, i.e. have to be executed sequentially in Θ(k) logical cycles
{{ev [i], ev [i + 1]}}i∈[∣ev ∣−1] , to Ev .
to maintain the constant space overhead. As such, the
// Set the checks (Eh and Ev ) to be augmented
and the bits (Sh and Sv ) to be punctured former scheme is essentially trading time for space. In
for the horizontal and vertical codes, contrast, introducing the GPPMs gadget for the HGP
respectively. code enables the parallel implementation of these gates
2 Construct an ancilla code Q′ = HGP(H1′ , H2′ ) by in less than O(k) logical cycles and outperforms surface
augmenting checks in Hrep Eh
(with length n2 ) to H2 codes with lattice surgery also in terms of the total space-
and then puncturing on Sh . Construct another mask time cost.
code Q′′ = HGP(H1′′ , H2′′ ) by augmenting checks in The ability to implement generic Clifford gates with
Ev
Hrep (with length n1 ) to H1′ and then puncturing on a sublinear depth for HGP codes utilizing the GPPMs
Sv . is summarized in Theorem 11, for which we provide the
// See Fig. 2 for illustrations.
proof in Appendix. B.
3 Prepare the logical qubits of Q′ and Q′′ transversely in
∣0⟩ and ∣+⟩ by preparing their physical qubits
transversely in ∣0⟩ and ∣+⟩ states, respectively, and Theorem 11 (Parallizable Clifford gates for HGP
measuring d rounds of stabilizers. codes). The gadgets in Table I, excluding the translation
4 Apply physical transversal CNOTs from Q′′ to Q′ gadget, generate the full Clifford group on a generic HGP
(applying pairs of CNOTs on qubits with the same code. Furthermore, a layer of Θ(k) Clifford gates, con-
coordinate, see Fig. 2 for examples) and measure Q′′ sisting of Hadamards, S gates, and CNOTs, on k logical
transversely in the X basis. qubits of a quasi-cyclic HGP code can be implemented
// This resets a subset of the logical qubits with O(1) space overhead and in O(k 3/4 ) logical cycles
of Q′ to ∣+⟩ and prepares a subset to GHZ using the gadgets in Table I.
states.
5 Apply physical transversal CNOTs from Q to Q′ and
measure Q′ transversely in the Z basis. // This Note that the costs in Theorem 11 is not necessarily
finally measures the desired Z-PPMs on Q optimal, and further reductions in the space-time cost
using Q′ . may be possible. As we will show in Sec. V C 2, we can
also distill and consume magic states for implementing
parallel non-Clifford gates utilizing these parallel Clifford
work, we focus only on these CSS-type GPPMs as el- operations. In combination, we can realize logical com-
ementary gadgets and execute logical computation by putation with an asymptotically lower space-time cost
combining them with other transversal/fold-transversal using HGP codes when compared to surface codes with
gates, as will be discussed in the next section. lattice surgery.

B. Logical computation using GPPMs with low


space-time-overhead C. Fault-tolerant compilation with qLDPC codes

In Theorem 11, we show that the GPPMs gadget devel- Armed with a broad new set of native gate operations,
oped in this work (see Def. 10), when combined with stan- we now consider how various key algorithmic subrou-
dard transversal operations as well as the fold-transversal tines can be efficiently implemented using qLDPC codes.
gates developed in Ref. [26, 27], generate the full Clifford The circuit-depth upper bound O(k)3/4 in Theorem 11
group on k logical qubits encoded in a HGP code. All is for implementing a generic (or worst-case) layer of
the HGP gadgets that we use in this work for logical Clifford operations. For many practical computational
computation are listed in Table I. tasks/subroutines, we can compile them into layers of
To realize logical computation with low space-time structured Clifford operations such that they can be im-
overhead, we further require that Clifford operations on plemented in much fewer, even a constant number of, log-
different qubits can be implemented in parallel. Here, we ical cycles. We present some task-specific and algorithm-
consider the implementation of a layer of Θ(k) Clifford tailored examples in the following sections.
17

Logical gadgets Physical operation Logical operation Time


⊗n ⊗n ⊗k ⊗k
∣0⟩/∣+⟩ state preparation ∣0⟩ / ∣+⟩ → d QEC cycles ∣0⟩ /∣+⟩ O(d)
⊗k ⊗k
Z/X basis measurements MZ⊗n /MX
⊗n
M Z /M X O(1)
′ ′
Inter-block CNOTs ⊗(i,j)∈O/O0 CNOT(Qi,j , Qi,j ) ⊗(i,j)∈Ō/Ō0 CNOT(Q̄i,j , Q̄i,j ) O(1)
State preparation + Inter-block CNOTs
GPPMs {⊗q∈er ×ec Z/X q }er ∈Er ,ec ∈Ec O(d)
+ transversal measurements
H-SWAP (H ⊗n ) (⊗(i,j)∈O+ SWAP(Qi,j , Qj,i )) (H̄ ⊗k )(⊗(i,j)∈Ō+ SWAP(Q̄i,j , Q̄j,i )) O(1)

(⊗i∈[n1 ] S(Qi,i ) (⊗i∈{n1 +1→2n1 −k1 } S (Qi,i )
CZ-S (⊗i∈[k1 ] S̄(Q̄i,i ) (⊗(i,j)∈Ō+ CZ(Q̄i,j , Q̄j,i )) O(1)
(⊗(i,j)∈O+ CZ(Qi,j , Qj,i ))
Translation Translations of blocks of qubits T̄α,β , (α, β) ∈ Ō O(1)

TABLE I. Summary of the HGP logical gadgets we utilize for logical computation. All the gadgets, unless specially
noted, are applied on a generic [[n, k, d]] HGP code Q out of a vertical [n1 , k1 , d1 ]-classical code H1 and a horizontal [n2 , k2 , d2 ]-
classical code H2 (see Fig. 1(a) for an illustration). The physical qubits are denoted {Qi,j }(i,j)∈O with coordinates O ∶= [n1 ] ×
[n2 ] ∪ {n1 + 1, ⋯, 2n1 − k1 } × {n2 + 1, ⋯, 2n2 − k2 }, and the logical qubits are denoted {Q̄i,j }(i,j)∈Ō with coordinates Ō ∶= [k1 ] × [k2 ]
(see Fig. 1(a) and Eq. (39) for the coordinates of the physical and logical qubits). We denote O+ ∶= {(i, j) ∈ O ∣ j > i} as the
upper blocks of O, and similarly for Ō+ . The fold-transversal H-SWAP and CZ-S gates require the HGP to be symmetric, i.e.
H1 = H2 . The translation gadget, which translates the logical qubit along any direction under periodic boundary conditions, i.e.
T̄α,β ∶ Q̄i,j → Q̄(i+α) mod k1 ,(j+β) mod k1 , further requires that the base code is quasi-cyclic (see Appendix A 1). The inter-block
CNOTs are applied between Q and another HGP code Q′ that is obtained by puncturing/augmenting the base codes of Q,
during which a subset of physical qubits O0 and logical qubits Ō0 of Q are removed (puncturing) and other checks added
(augmenting, see Fig. 1(a)). Transversal physical CNOTs between pairs of qubits identified by O/O0 give transversal logical
CNOTs between pairs of logical qubits identified by Ō/Ō0 . In the case of Q′ ≃ Q and O0 = Ō0 = ∅, we recover the standard
transversal logical CNOTs between two blocks of CSS codes. All the gadgets can be implemented with a constant space
overhead, i.e. using O(k) physical qubits and the gadget times are listed in units of code cycles (number of QEC syndrome
extraction rounds). The inter-block CNOTs (with Q′ ≄ Q) and the GPPMs (see Def. 10) are introduced in this work, under the
general framework of homomorphic gates and measurements [29]; The translation gadget is explicitly constructed in this work,
under the general framework of autonomorphism gates [26]; The state preparation and transversal measurements are standard
logical operations for any CSS codes; The H-SWAP and CZ-S gates are introduced in Ref. [27], under the general framework
of fold-transversal gates [26]. See also Fig. 1(c) for an illustration of some of the gadgets.

Space Time Space-Time


Surface
Θ(kd2 ) Θ(d)a Θ(kd3 ) = Θ(k5/2 )
(lattice surgery)
HGP
(lattice surgery, Θ(k) Θ(k) × d Θ(k2 d) = Θ(k5/2 )
rateless ancillae)
HGP
Θ(k) O(k3/4 ) × d O(k7/4 d) = O(k9/4 )
(GPPMs)
a This analysis only applies to conventional schemes based on
lattice surgery; transversal gates may modify this cost

TABLE II. Comparison of the space-time cost of Θ(k) Clif-


ford gates, consisting of Hadamards, S gates, and CNOTs, on
k logical qubits using (1) surface codes with lattice surgery
gates (2) HGP codes using lattice surgery with rateless ancil- Step 1: Step 2: Step 3: Step 4:
lae (3) HGP codes using GPPMs, assuming long-range con-
nectivity. We
√ assume individual HGP blocks satisfy the scal-
ing d = Θ( k), where k denotes the number of logical qubits FIG. 3. A protocol for generating a GHZ state on
per block, and compare to surface codes with the same dis- all logical qubits of an HGP code using four GPPMs
tances. In practice, the code distance will be chosen based gadgets. The Pauli products to be measured by each GPPMs
on the target error suppression, and the computation can be gadget are indicated by the 3D diamonds of a particular color.
divided√into independent blocks that still satisfy the scaling
d = Θ( k).
18

1. GHZ state generation As shown in Fig. 4(c), we can further reduce the task
of reactive measurements in the X/Y basis in Fig. 4(b)
As shown in Fig. 3, a GHZ state across all logical qubits to a reactive state preparation in the X/Y basis. By
on a HGP code block with a M × N grid of logical qubits introducing another ancilla patch with qubits reactively
can be generated with O(1) space overhead and in O(1) initialized in the X/Y basis, and performing a transver-
logical cycles by transversally preparing all the logical sal Bell measurement between the two patches, we can
qubits in the ∣+⟩ state and performing the following se- obtain the X/Y reactive measurement outcomes of the
quence of GPPMs: data patch from the Bell measurement outcomes.
We can implement the reactive state preparation sub-
GPPMs(Z, {{r}}r∈[M ] , {{2j − 1, 2j}}j∈⌊N /2⌋ ) routine efficiently using the GPPMs gadget. As shown in
Fig. 4(d), we first consider using only the diagonal logical
→ GPPMs(Z, {{r}}r∈[M ] , {{2j, 2j + 1}}j∈⌊(N −1)/2⌋ )
(56) qubits in a symmetric HGP code. We can prepare the
→ GPPMs(Z, {{2i − 1, 2i}}i∈⌊M /2⌋ , {{1}}) diagonal qubits in an arbitrary pattern of ∣+⟩ / ∣i⟩ states
→ GPPMs(Z, {{2i, 2i + 1}}i∈⌊(M −1)/2⌋ , {{1}}), in three steps:

where the four GPPMs measure the PPMs in Fig. 3 rep- 1. Prepare all the diagonal qubits in ∣+⟩ states.
resented by the blue, red, grey, and purple diamonds,
2. Apply the fold-transversal CZ-S gate (see Table I)
respectively.
to convert all the diagonal ∣+⟩ states to ∣i⟩ states.

3. Apply a GPPMs(X, E0 , E0 ), where E0 = {{i}}i∈S


2. Magic state distillation and consumption and S contains the indices of the diagonal qubits
to be prepared in the X basis.
Magic state distillation
As another example, we consider distilling magic states The above procedure implements the √reactive state
in parallel using only qLDPC codes. At a high level, we preparation subroutine on the diagonal k qubits with
can distill block(s) of k magic states in parallel encoded in O(k) physical qubits and in O(1) logical cycles. There-
[[n, k, d]] code patch(es) using M identical patches. As √
fore, each round of the distillation circuit in Fig. 4 can
each qLDPC patch has a constant encoding rate, such a also be run on the diagonal k logical qubits with O(k)
parallel distillation scheme is still space efficient as long physical qubits and O(1) code cycles.
as M is not too large. Moreover, doing so mostly requires Note that the main obstacle of performing the above
inter-block Clifford operations, which are generally easier distillation task on all logical qubits instead of the diago-
than intra-block operations. Most of the operations are nal ones boils down to preparing an entire block of logical
transversal, i.e. the same operation is applied to the same qubits reactively in the X/Y basis (see Fig. √ 4(d)). In Ap-
set of qubits across different qLDPC patches. However, pendix A, we show how to realize it in O( k log k) log-
the conditional Clifford fixups (or equivalently, the reac- ical cycles by imposing an additional translational sym-
tive measurements in Ref. [2, 50]) can break the transver- metry of the HGP codes. At a high level, by using a
sal structure of the circuit. As such, we will need our family of quasi-cyclic classical codes, we can obtain HGP
GPPMs gadget to perform selected operations on certain codes with a translational automorphism, i.e., the logical
code patches. Therefore, the entire distillation scheme is qubit grid can be translationally shifted with periodic
also time-efficient as long as these selected operations can boundary conditions by simply permuting √ the physical
be implemented in parallel using the GPPMs. qubits. Then, we can repeatedly generate k ∣i⟩ states
As shown in Fig.4(a), we consider the “8-to-CCZ” dis- using the diagonal logical qubits (utilizing the CZ-S gate)
tillation circuit that converts 8 noisy ∣T ⟩ states into one and distribute them to other qubits via the translational
less noisy ∣CCZ⟩ state [48, 50, 54]. We set the input to be automorphism. Finally, we can selectively reset a sub-
four HGP code patches, three of which encode ∣+⟩ states set of logical qubits to ∣+⟩ states efficiently using the X-
while the remaining encodes ∣T ⟩ states. Then, the distil- type GPPMs. Therefore, by using HGP codes with ad-
lation circuit is implemented by a sequence of transversal ditional translational symmetry, we can perform magic
Z-type Pauli product rotations across the four patches state distillation in Fig.
√ 4 on k logical qubits with O(1)
and transversal X measurements on the ∣T ⟩ patch. Each space overhead in O( k log k) logical cycles per distilla-
of the transversal Pauli product rotations can be imple- tion round.
mented by introducing another code patch that encodes We note that the same protocol can be applied to dis-
∣T ⟩ transversally, performing a joint transversal PPM, tilling ∣T ⟩ states in parallel using, e.g. a 15-to-1 distilla-
and finally measuring the introduced ∣T ⟩ patch reactively tion protocol [50], with the same scaling of the space and
depending on the PPM outcomes (see Fig. 4(b)). Since the time overhead.
each logical qubit on the ∣T ⟩ patch is measured in X or Parallel non-Clifford gates by consuming magic
Y basis reactively, such measurements are not transver- states
sal, and thus are the most expensive components of the With Θ(k) magic states distilled on qLDPC patches in
distillation task. parallel, we can also consume them and perform parallel
19

a
c

d
b

FIG. 4. One round of parallel magic state distillation on diagonal logical qubits of HGP codes with O(1) space
overhead and in O(1) logical cycles. Each thick grey line indicates a block HGP code encoding k logical qubits. An
operation involving different thick lines refers to transversal operations on all the logical qubits of the corresponding HGP
codes, unless specially noted. Each yellow operation denotes a Pauli product rotation exp(−iP ϕ) with a multi-qubit Pauli
operator P and an rotation angle ϕ; Each blue operation denotes a Pauli product measurement. The right-going and left-
coming double lines denote classical outputs and inputs, respectively. (a) The 8-to-CCZ distillation logical circuit that converts
8 blocks of noisy ∣T ⟩ states into one block of less noisy ∣CCZ⟩ states [50]. (b) Each of the Pauli product rotations in (a) can be
implemented by supplementing an extra block of ∣T ⟩ states, performing joint transversal PPMs, and finally measuring the ∣T ⟩
block reactively in X or Y basis, depending on the previous PPMs. (c) The reactive measurements of the ∣T ⟩ block in (b) can
be implemented by introducing another ancilla block, whose logical qubits are initialized reactively in ∣+⟩ or ∣i⟩ states, and then
performing transversal Bell measurements. (d) The reactive state preparation of the ancilla block in (c) can be implemented by
(1) initializing the logical qubits transversely in ∣+⟩ states, (2) applying the fold-transversal CZ-S gate to convert the diagonal
qubits to ∣i⟩ states, (3) performing a pattern of GPPMs to reset some of the diagonal qubits to ∣+⟩ states.

or

or

or
b

or

FIG. 5. Parallel inter-block Toffoli gates on HGP codes by consuming ∣CCZ⟩ states in parallel on diagonal logical
qubits with O(1) space overhead and in O(1) logical cycles. (a) A ∣CCZ⟩ consumption circuit by performing joint PPMs
between the data blocks and the ∣CCZ⟩ blocks and transversally measuring the ∣CCZ⟩ blocks, followed by reactive CZs on the
data blocks [50]. The reactive CZs are implemented by coupling the data blocks via transversal CNOTs to extra ancilla blocks
(indicated in orange), which are then reactively measured in a single-qubit or Bell basis. (b) The reactive measurements on each
pair of the ancilla blocks in (a) can be implemented by two GPPMs on each block followed by transversal Bell measurements.
Note that we have neglected the Pauli corrections in the circuit for simplicity, which can be implemented simply by updating
the Pauli frame.
20

non-Clifford gates. For instance, as shown in Fig. 5(a), The adder inputs two k-qubit registers ∣a⟩ = ⊗ki=1 ∣ai ⟩
we can implement parallel Toffoli gates on three [[n, k, d]] and ∣b⟩ = ⊗ki=1 ∣bi ⟩ representing two integers a and b, re-
HGP patches by consuming three patches of distilled spectively, and outputs two registers ∣a⟩ and ∣a + b⟩. Note
∣CCZ⟩ states. The ∣CCZ⟩ states are consumed via the that the adder is a unitary quantum circuit, so the in-
transversal Z-type PPMs together with the data patches, put can also be a superposition of integers and the cor-
and the transversal X measurements that follow. Then, responding output will be a superposition of the added
reactive CZ gates on the data patches are applied de- integers.
pending on the PPMs outcomes. We follow Ref. [50] and We follow the circuit in Ref. [50], which is a variant of
convert these reactive CZs into reactive PPMs by intro- the Gidney ripple-carry adder [36, 56], that performs a
ducing six ancilla patches (indicated by the orange blocks k-qubit addition using k −1 temporary-AND Toffolis. We
in Fig. 5), interacting them with the data patches via refer readers to Fig. 16 of Ref. [50] (and related texts) for
the transversal CNOTs, and reactively measuring them more details of the circuit. As shown in Fig. 6(a), the cir-
in either X/Z basis or a Bell basis in a pairwise fashion. cuit consists of k − 2 repeated segments (the first and the
These reactive measurements are, again, not transversal last segments are different), each computing the addition
operations since qubits on the same patch may need to be of the i-th bit of a and b. The i-th and the (i + 1)-th seg-
measured in different bases. Thus, we need to implement ments are connected by a shared carry bit that is simul-
them using the selective GPPMs gadget. taneously the output of the i-th segment and the input of
As shown in Fig. 5(b), we can realize the reactive mea- the (i+1)-th segment. Because of these shared carry bits,
surement on a pair of the ancilla patches in Fig. 5(a) by the computation is generically sequential. Nevertheless,
first performing non-destructive X/Z-type GPPMs selec- as shown in Fig. 6, one can parallelize the computation
tively on the subset of qubits to be measured in the single- on different segments by introducing bridge qubits for the
qubit basis, and then performing the transversal destruc- carry bits [50]. More specifically, we introduce an output
tive Bell measurements. Both the GPPMs in Fig. 5(b) carry qubit di for the i-th segment and a pair of input
and the transversal Hadamard gates in Fig. 5(a) can be carry qubits ei+1 and ci+1 in a Bell state for the (i + 1)-th
implemented in parallel in O(1) logical cycles if the task segment. As shown in Fig. 6, we can now execute all the
is restricted again only on the diagonal logical qubits of segments in parallel and finally, perform a Bell measure-
symmetrical HGP codes (the fold-transversal H-SWAP ment between di and ei+1 to effectively teleport di back
gate implements transversal Hadamards on the diagonal in time as the input carry bit ci+1 of the (i + 1)-th seg-
qubits).
√ Therefore, we obtain a protocol that implements ment. Such a circuit can also be easily verified using ZX

k Toffoli gates in parallel on diagonal logical qubits by calculus [50].
consuming k ∣CCZ⟩ states with O(k) physical qubits in The circuit in Fig. 6(a) is now almost parallel, except
O(1) logical cycles. that there is a reactive CZ on each pair of the a and
Similar to the magic state distillation task, we can also b bits depending on the measurement of the next c bit.
extend the magic state consumption task to all k logical These reactive CZs come from the uncompute step of
qubits (beyond√ the diagonal ones) with O(k) physical the temporary-AND Toffolis, and can be combined with
qubits in O( k log k) logical cycles by using HGP codes the reactive CZs that come after consuming the ∣CCZ⟩
with additional translation symmetries. The trick is to states at the computing step of the temporary-AND Tof-
implement the transversal Hadamards in Fig. 5(a) on a folis. See Ref. [36] and Ref. [50] for more details. Thus,
HGP patch by first implementing the fold-transversal H- to perform these reactive CZs, we can introduce some an-
SWAP gate, and then using the translational automor- cilla qubits, let them interact with the a, b, and d qubits
phism, combined with GPPMs, to cancel the extra swaps via transversal CNOTs, and finally remove them via re-
on the non-diagonal qubits. See Appendix. A 5 for more active measurements (same as Fig. 5(a)). Now, the entire
details. circuit can be implemented exactly in parallel, except for
In conclusion, by using HGP codes with additional the final reactive measurement of the ancilla qubits.
translational symmetries, we can not only distill k magic Given this repeated and parallel structure, we can im-
states but also consume them and implement non- plement the adder using qLDPC patches. As shown in
Clifford
√ gates in parallel with O(1) space overhead in Fig. 6(b), we can encode the five types of qubits into
O( k log k) logical cycles. five identical [[n, k, d]] HGP patches, which we call a-
, b-, c-, d-, and e-patch, respectively. Then the circuit
in Fig. 6(a) can be implemented using HGP patches in
3. Quantum adder Fig. 6(b) that involves mainly inter-block and transversal
operations, except for the final reactive measurements of
With the ability to distill and consume magic states the six ancilla patches (the orange blocks). These re-
in parallel, we can explore computation subroutines that active pairwise measurements are the same as those in
require many parallel non-Clifford gates. As an example, Fig. 5(a), except that they now also depend on the X
we consider the quantum adder [36], which is an impor- measurements of the c patch as well as the Bell mea-
tant subroutine of many useful quantum algorithms such surements of the d and the e patches. Note that these
as the factoring algorithm [55]. reactive measurements need to be executed sequentially,
21

b
a

Magic State Factory

FIG. 6. An efficient parallel implementation of a quantum adder using quasi-cyclic HGP codes. (a) The Gidney
adder circuit [36, 50] with temporary-AND Toffolis a has repeated sectors, each sandwiched by two dashed lines. Different
sectors are connected by the bridge qubits that is teleported across different blocks back in time [50]. Specifically, each output
carry qubit di is teleported back in time as the input carry qubit ci+1 (of the next bit), utilizing the Bell measurements (BM) and
the Bell state preparation (indicated by the leftmost verticle double lines). The right-going and left-coming double lines next
to an operation denote classical outputs and inputs, respectively. (b) We can implement all the sectors of (a) approximately
in parallel by encoding different qubits of the same type, e.g. {ai }, into an HGP code and performing mostly inter-block
operations. In particular, the temporary-AND Toffolis in different sectors can be implemented in parallel using transversal
∣CCZ⟩ distillation and consumption (see Fig. 4 and Fig. 5, as well as Sec. V C 2). Similar to the magic state consumption circuit
in Fig. 5, the ancilla blocks (the orange lines) first interact with the a, b, and c blocks via the transversal inter-block CNOTs
(with details omitted here) and are finally measured reactively in a pairwise fashion. Different from Fig. 5, here, the ancilla
reactive measurements need to be executed sequentially and qubits in the same block need to be measured in order depending
on the previous outcomes (the details of the Pauli feedforwards that can be tracked in software are omitted here). The gate
with three arrows at the top right corner denotes a cyclic permutation of the logical qubits in an HGP code.
a Toffolis with a ∣0⟩-initialized target qubit, which can have a reduced space-time cost compared to regular Toffolis [36]

i.e. the basis of the next RMs on the same block will de- transversal structure. Fortunately, we can realize such a
pend on the outcome of the previous RMs, fundamentally mismatched Bell measurement by simply cyclically shift-
because the adder task is generically sequential. Never- ing the e block and then performing a transversal Bell
theless, these are simply ancilla patches to be consumed measurement. As presented in Appendix A 3, we can im-
and the data patches (a- and b- patches) are free to per- plement such a cyclic shift of the e block in O(1) logical
form other computation tasks in parallel. To this end, the cycles by combining the translational automorphism of
entire qLDPC-based √ adder scheme in Fig. 6(b) can be im- a translational-symmetrical HGP code and the GPPMs
plemented with c1 k log k + c2 k logical cycles, where c1 gadget.
and c2 are constants associated mainly with the parallel
magic state distillation and the sequential ancilla RMs,
respectively. We expect that c2 ≪ c1 and the adder can
be implemented approximately in parallel for practical √ quantum adder
To conclude, we can implement a k-bit
integer sizes. in parallel using qLDPC codes in O( k log k) logical cy-
cles by leveraging the parallel magic state distillation and
Finally, as shown in Fig. 6(b), in addition to the RMs, consumption protocols that we developed in Sec. V C 2.
there are two extra operations that are not transversal.
The first operation is the Z-measurement on the first
qubit of the c-block after the first transversal CNOT.
This is due to the fact that the addition of the first bits a0 We note that there are many other algo-
and b0 does not have any input carry bit, which requires rithms/subroutines that demand the parallel imple-
us to reset the carry qubit c0 to ∣0⟩ via a Z measurement. mentation of non-Clifford gates, such as the quantum
This can be easily implemented using a Z-type GPPMs random-access memory [57] and various quantum state
selecting only the first logical qubit of the c-block. Fi- preparation gadgets [58]. We thus expect similar
nally, as shown in Fig. 6(a), the final Bell measurements techniques that leverage the parallel qLDPC-encoded
between the d and e blocks are performed between the i- non-Clifford gates can be exploited for a broad class of
th d qubit and the (i+1)-th e qubit, which also breaks the computational tasks with low space-time overhead.
22

VI. SINGLE-SHOT LOGICAL GATES FOR correction, due to the fact that all the physical qubits
3D/4D HOMOLOGICAL PRODUCT CODES of the block need to realize the same operation to realize
a targeted logical operation. Since the new homomor-
As described in Sec. IV, the homomorphic measure- phic CNOTs and measurements are built upon transver-
ment gadget we developed for the homological product sal physical CNOTs between two alike code patches, we
codes work generally for any dimension D ≥ 2 by sim- expect that they can also be efficiently implemented by
ply puncturing/augmenting their base classical codes. In overlapping the two patches and then applying global
particular, we can generalize the GPPMs gadget for the pairwise CNOTs. Combined with recent proposals for
2D HGP code measuring a grid pattern of PPMs to a D- the efficient implementation of various qLDPC codes in
dimensional gadget for a D-dimensional code measuring neutral atom arrays [13, 16], utilizing again the natural
a D-dimensional-hypercube pattern of PPMs selectively control parallelism afforded by optical tools, we expect
and in parallel. that all required operations can be efficient implemented.
Although higher-dimensional (3D or 4D) homologi- In this work, we further observe that due to the
cal product codes tend to have larger block sizes, they large-scale parallelism on the algorithmic level, many
have redundant check matrices inherently due to their key subroutines such as the quantum adder again in-
higher-dimensional product construction, i.e. the syn- volve the same, repeated operations at the logical qubit
dromes satisfy extra linear constraints referred to as level. This parallelism is then particularly well-suited to
metachecks [32]. These metachecks could help reduce LDPC codes with transversal operations, and indicates
the number of repeated syndrome measurements in the that sophisticated operations on dense block encodings
presence of measurement errors. For example, as we can be controlled efficiently at both the logical and phys-
show in Appendix D, 4D homological product codes, ical level, offering unique opportunities for dramatically
whose checks satisfy the soundness property [32], support reducing the costs of large-scale computation.
single-shot preparation of computational-basis states.
This enables homomorphic measurements with constant
depth. VIII. DISCUSSION AND OUTLOOK
Here, in Def. 12, we explicitly present a parallel PPMs
gadget for 3D homological product codes by generalizing In this paper, we presented a suite of new methods
the GPPMs gadget for the HGP codes straightforwardly, for performing logical gates with homological product
and the construction for 4D codes follows. As we show codes, enabling fast and parallelizable logical operations.
in Appendix C, the logical qubits of a 3D homological Crucially, our methods eliminate the need for surface- or
product codes can be arranged on a cube, and we can repetition-code-like structures in the construction of the
construct a “Cube” PPMs (CPPMs) gadget that mea- logical gate, removing a key bottleneck on parallelism
sures a pattern of PPMs in parallel on any subcube of of previous approaches [13, 14, 61]. Moreover, the con-
the logical qubits in Def. 12. See Appendix C for details. struction is remarkably simple, making use of well-known
Definition 12 (Cube PPMs). Given a canonical repre- modifications to the base classical codes of the homolog-
sentation of logical qubits in a 3D homological product ical product codes. This enables a high degree of paral-
code on a 3D cube [k1 ] × [k2 ] × [k3 ], and three sets of hy- lelism and hardware-efficient implementation, which are
peredges Ex , Ey and Ez , where each hyperedge is a collec- crucial in practice.
tion of indices in the X, Y , and Z direction, respectively, Building on top of this set of basic operations, we fo-
we define a pattern of Cube PPMs of a type P ∈ {X, Z} cus on the parallel, efficient implementation of key algo-
as: rithmic subroutines, initiating the study of fault-tolerant
compilation with native qLDPC code operations. We re-
CPPMs(P, Ex , Ey , Ez ) ∶= { ⊗ P̄q }ex ∈Ex ,ey ∈Ey ,ez ∈Ez , port efficient implementations of large GHZ state prepa-
q∈ex ×ey ×ez ration, magic state distillation and consumption, cul-
(57) minating in the efficient implementation of a quantum
where P̄q denotes the logical Pauli operator X̄ (Z̄) of the adder.
logical qubits Q̄q with coordinates q for P = X (Z). Our results open up many exciting areas of future re-
search. While we have proposed a variety of useful log-
ical gadgets, there is ample room to further expand the
VII. PHYSICAL IMPLEMENTATION range of accessible operations, and achieve additional re-
ductions in their space-time cost. In particular, the idea
Our proposal is particularly natural to implement in of masking an ancilla qLDPC block and preparing inho-
dynamically-reconfigurable qubit architectures [20, 59, mogeneous logical states for executing selective and par-
60], such as neutral atom arrays, where the qubits can allel logical operations (see Fig. 2) could be exploited to
be dynamically rearranged and parallel two-qubit gates design new logical gadgets with even lower time over-
can be applied with global controls. The experiments of head. Additionally, in order to make full use of the
Ref. [20] showed that parallel control over logical qubits protocols for efficiently distilling and consuming magic
can dramatically simplify the implementation of error states in Sec. V C 2, we also need to prepare/inject ini-
23

tial noisy magic states with infidelities below some dis- 2326767, CCF-2312755, PHY-2012023, CCF-2313084),
tillation threshold [62] as the input to the magic state DOE/LBNL (DE-AC02-05CH11231), NTT Research,
factory. It will therefore be interesting to generalize ex- Samsung GRO, the Center for Ultracold Atoms (a
isting protocols for high-fidelity magic state injection [63– NSF Physics Frontiers Center, PHY-1734011), and the
65] to various qLDPC codes. In Sec. VI, we show how to Packard Foundation (2020-71479). D.B. acknowledges
apply our constructions to higher-dimensional homologi- support from the NSF Graduate Research Fellowship
cal product codes and measure PPMs in parallel and in Program (grant DGE1745303) and The Fannie and John
constant depth. Some of these higher-dimensional codes, Hertz Foundation. J.P.B.A. acknowledges support from
e.g. the 3D surface code [66–68], also support transver- the Generation Q G2 fellowship and the Ramsay Cen-
sal non-Clifford gates. As such, it would be interesting to tre for Western Civilisation. After the completion of this
explore a richer set of constant-depth logical operations project, we became aware of related work studying the
with these codes, ideally with high encoding rates [40], in implementation of logical operations on qLDPC codes
the future. Similarly, it will also be interesting to general- using improved lattice surgery [79, 80].
ize our constructions to other qLDPC codes with product
constructions, such as the lifted product code [5, 14, 41],
fibre bundle code [42], and balanced product code [6].
Another important direction is efficient decoding and
numerical simulations of our protocol. We expect general
purpose decoding algorithms such as BP-OSD [41, 69, 70]
and hypergraph union-find [46, 71] to achieve good per-
formance, and one may be able to further exploit the
product structure and expansion properties of these
codes to improve performance [72–74]. In addition, the
use of correlated decoding techniques [46] and principles
of algorithmic fault tolerance [47] may further reduce the
time overhead of our construction, allowing only O(1)
rounds of syndrome extraction in certain cases.
Finally, with these new techniques and vastly-
expanded set of operations, a frontier of future research
will be to perform end-to-end compilations of large scale
algorithms, and demonstrate a concrete space-time sav-
ing over current schemes in the full algorithmic setting.
In addition to the quantum adder described here, quan-
tum simulation may be another key area of interest,
where in many contexts all logical qubits realize the same
structured evolution [75], and thus are well-suited to par-
allelism in LDPC blocks. This could be explored both for
efficient trotterized Hamiltonian evolution [76], as well
as parallelized operations using qubitization for studying
electronic spectra in materials [77, 78].

ACKNOWLEDGMENTS

We acknowledge helpful discussions with John


Preskill, Christopher Pattison, Shouzhen Gu, Han
Zheng, Nithin Raveendran, Asit Pradhan, and Daniel
Litinski, Nishad Maskara, Madelyn Cain, Christian
Kokail. We especially thank Shilin Huang for ini-
tial discussions and insightful comments. We ac-
knowledge support from the ARO (W911NF-23-1-
0077), ARO MURI (W911NF-21-1-0325, W911NF-20-
1-0082), AFOSR MURI (FA9550-19-1-0399, FA9550-
21-1-0209, FA9550-23-1-0338), DARPA (HR0011-24-9-
0359, HR0011-24-9-0361, ONISQ W911NF2010021, IM-
PAQT HR0011-23-3-0012), IARPA Entangled Logi-
cal Qubits program (ELQ, W911NF-23-2-0219) NSF
(OMA-1936118, ERC-1941583, OMA-2137642, OSI-
24

Appendix A: Additional gadgets for logical


operations on HGP codes

In this section, we present additional logical gadgets


used for the HGP codes in the main text. We first present
the logical translation gadget listed in Table I for HGP
codes with quasi-cyclic base classical codes. Then, we
show how to implement parallel logical Hadamard gates
(without extra swaps) and parallel ∣i⟩-state preparation
utilizing the translation gadget. Such gadgets enable us
to implement parallel magic state distillation and injec-
tion (see Sec. V C 2) on all logical qubits of HGP codes,
extending from the diagonal qubits. We also present a
gadget for performing selective inter-block teleportation
as well as a gadget for cyclically shifting all logical qubits. FIG. 7. Illustration of the logical translation gadget
for HGP codes with quasi-cyclic base codes. Physi-
cal block-translations corresponding to products of horizontal
1. Logical translation gadget and vertical block-cyclic-shifts give rise to translation of the
logical block under periodical boundary conditions.
The logical translation gadget is based on an automor-
phism of a quantum code γ = {γ2 , γ1 , γ0 } ∶ Q → Q such
that the following diagram commutes: Note that the direct sum in Eq. (A2) indicates that
γ1 takes a block-diagonal form with respect to the two
T
HZ HX blocks of qubits in Eq. (37).
Q2 Q1 Q0
For a symmetric HGP code with a base check matrix
γ2 γ1 γ0 (A1) H0 , we assign ∂11T = ∂12 = H0 . Furthermore, we consider
T
HZ HX a quasi-cyclic base code [34], whose check and generator
Q2 Q1 Q0
matrix are in the following form:
Clearly, this is a special case of the homomorphism be-
tween two quantum codes γ ∶ Q′ → Q with Q′ = Q. We H0 ∈ Rl rb ×nb , G0 ∈ Rl 1×nb with G0 [1, 1] = 1, (A4)
again work in the standard basis where each basis vector
of Q2 , Q1 , and Q0 represents a Z check, a qubit, and a where Rl ∶= F2 [x]/(xl − 1) denotes the quotient polyno-
X check, respectively. If γ1 is a permutation matrix, the mial ring, x represents a circulant matrix of size l that
physical permutation of the qubits according to γ1 pre- shifts the entries by 1, and 1 represents the l × l identity
serves the stabilizer group and thus implements a logical matrix. l is also denoted as the lift size in the literature.
gate. Such a gate is called an automorphism gate [14, 26]. Based on the form of G0 , this code encodes l codewords,
In the following, we will construct a special type of auto- which can be cyclically shifted by cyclically shifting each
morphism gate for HGP codes that implements a trans- of the nb blocks of bits. Moreover, the same block shifts
lation of all the logical qubits in the canonical basis. of the bits correspond to cyclically shifting the rb blocks
Based on Proposition 7, we can also construct an au- of checks. Thus, it admits an automorphism {σc,i , σb,i },
tomorphism for a homological product code by taking where σc,i and σb,i denote the block-cyclic-shift matrix
the tensor product of automorphisms of its base classical by i for the checks and the bits, respectively. For exam-
codes. In the particular case of a HGP code Q, which is ⎛x 0⎞
constructed from two base length-1 chain complexes C 1 ple, for nb = 2, σb,1 = ⎜ ⎟. Finally, we can construct
and C 2 (see Eq. (37)), we can construct an automorphism ⎝0 x⎠
γ = {γ2 , γ1 , γ0 } ∶ Q → Q, where an automorphism for the HGP code as

γ2 = γ11 ⊗ γ12 , ⎛ σb,i ⊗ σb,j 0 ⎞


γ1 = (γ01 ⊗ γ12 ) ⊕ (γ11 ⊗ γ02 ), (A2) γ1 = ⎜ ⎟, (A5)
⎝ 0 σc,i ⊗ σc,j ⎠
γ0 = γ01 ⊗ γ02 ,
where the two blocks of shifts in Eq. (A5) are applied to
where {γ1i , γ0i }
is an automorphism for C i (i = 1, 2) such
the two blocks of qubits given by the product of the classi-
that the following diagram commutes:
cal bits and checks, respectively (see Eq. (39) and Fig. 7).
∂1i Moreover, the qubits can be further divided into l × l
C1i C0i blocks, each undergoing the same translation by (i, j) un-
γ1i γ0i (A3) der periodic boundary conditions (see Fig. 7). It is easy
∂1i to verify that the canonical logical qubits {Q̄x,y }x∈[l],y∈[l]
C1i C0i (there are l × l logical qubits in total since each base code
25

encodes l logical bits) are also translated by (i, j) under Algorithm 3: Selective teleportation between
periodic boundary conditions, i.e. two identical HGP codes
Input : Two identical HGP codes Q and Q′ with
P̄x,y → P̄(x+i) mod l, (y+j) mod l , (A6) logical qubits Q̄ and Q̄′ , respectively; A
subset of logical qubits Q̄0 ⊆ Q̄ of Q.
for P = X, Z. We denote such a gadget as T̄i,j . We an Output : A gadget Tel(Q̄0 → Q̄′0 ) that teleports Q̄0
example for T̄1,1 with l = 2, nb = 3, and rb = 2 in Fig. 7. to Q̄′0 in O(min{cw(Q̄0 ), rw(Q̄0 )}) logical
Finally, we note that not all quasi-cyclic classical codes cycles.
are in the required form of Eq. (A4). Generic quasi-cyclic 1 if cw(Q̄0 ) ≥ rw(Q̄0 ) then
codes might have multiple rows in their block generator // Perform column-by-column teleportations
matrix G0 , corresponding to disjoint blocks of codewords, 2 for Each column j of logical qubits Q̄0 ∣j of Q̄0 do
where only cyclic permutation within each block is per- // Teleport Q̄0 ∣j to Q̄′0 ∣j by implementing
mitted; their block generator matrix might not be in the the teleportation circuit in
canonical form, i.e. starting with an identity matrix, Fig. 11(a) in parallel using
which is required to define the canonical logical opera- generalized versions of the GPPMs
gadget.
tor basis used in our work. Generator matrices that sat-
// First, measure the ZZs in Fig. 11(a)
isfy Eq. (A4) are referred to as one-generator systematic- in parallel using selective ancillae
circulant (OGSC), and algebraic conditions for obtaining and homomorphic CNOTs
codes with OGSC generator matrices have been explored 3 Prepare an ancilla code Q′′ that only contains
in the literature [81]. Although we are not aware of any the j-th column of logical qubits (by using
asymptotically good family of OGSC codes that achieve the puncturing techniques described in
cosntant encoding rates and linear distances, we present Sec. IV D) in the Z basis; Then “mask” the
several finite-size examples in Table III through numer- logical qubits Q̄′′ ∣j /Q̄′′ ∣j by resetting them to
ical search, which feature even better parameters than ∣+⟩ using another mask code (see Fig. 2).
those based on random expander graphs [12, 13, 74]. 4 Apply the Q-controlled homomorphic CNOT
between Q and Q′′ and then Q′ -controlled
homomorphic CNOT between Q′ and Q′′ .
2. Selective inter-block teleportation 5 Transversally measure Q′′ in the Z basis.
// Then, measure the Xs in Fig. 11(a)
6 Perform X measurements on Q̄0 ∣j using a
Here, we present a gadget that teleports any subset GPPM gadget.
Q̄0 of the logical qubits Q̄ of a generic HGP code Q
to the corresponding logical qubits Q̄′0 (with the same 7 else
coordinates) of another identical code Q′ . Let cw(Q̄0 ) 8 Perform row-by-row teleportations, similar to the
column-by-column teleportation described above.
(rw(Q̄0 )) denote the number of columns (rows) of the
logical qubit grid that Q̄0 are supported on. We present
such a teleportation gadget Tel(Q̄0 → Q̄′0 ) in Alg. 3
in O(min{cw(Q̄0 ), rw(Q̄0 )}) logical cycles. The gadget
remains to do a vertical cyclic shift of this leftmost
performs the teleportation in either a column-by-column
column.
fashion or a row-by-row fashion using generalized versions
of the GPPMs gadget.
2. Teleport the first column of logical qubits of Q to
another identical code Q′ in O(1) logical cycles us-
3. Logical cyclic shift ing the selective teleportation gadget in Alg. 3, per-
form a vertical logical translation T̄1,0 on Q′ , and
Here, we present a gadget for performing a cyclic then teleport the first column of logical qubits back
logical shift on a [[n, k, d]] HGP code Q with OGSC to Q.
base classical codes by combining the logical transla-
tion gadget in Sec. A 1 and the GPPMs gadget. Let
{Q̄i,j }i∈[M ],j∈[N ] , where M N = k, be the 2D grid of the 4. Parallel logical ∣i⟩ state preparation
logical qubits. We label them in a zigzag pattern, i.e.
Q̄l ∶= Q̄⌈l/N ⌉,l mod N . Here, to keep the notation simple,
⊗k
we set a mod a = a for any a ∈ Z. Then, we can per- Here, we present a gadget for preparing ∣i⟩ for a
form a cyclic shift, Q̄l → Q̄(l+1) mod k , in the following [[n, k, d]] HGP code. We first prepare two identical HGP
two steps: ⊗k
codes QA and QB , both initialized in ∣0⟩ states. Then,
1. Perform a horizontal logical translation T̄0,1 . This we apply the following sequence of operations iteratively
realizes most of the cyclic shifts, except for the for QA :
rightmost column of logical qubits {Q̄N i }i∈[M ] ,
which are permuted to the leftmost column. It thus D
MX → CZ-S → T̄i,i , (A7)
26

Classical-Code Parameter Quantum-Code Parameter Classical Check Matrix Classical Generator Matrix Lift Size
⎛ x2 x2 x2 ⎞
[9, 3, 4] [[117, 9, 4]] ⎜ ⎟ (1, x, 1 + x) 3
⎝ x x2 0 ⎠
⎛ x2 x2 x2 0 ⎞
⎜ 2 ⎟
[12, 3, 6] [[225, 9, 6]] ⎜ x 0 x2 x2 ⎟
⎜ ⎟ (1, 1 + x2 , x2 , 1 + x2 ) 3
⎜ ⎟
2 2 2
⎝x x x x ⎠
⎛ x3 x3 0 x3 ⎞
⎜ 3 2 3 2⎟
[16, 4, 8] [[400, 16, 8]] ⎜x x x x ⎟
⎜ ⎟ (1, 1 + x + x2 , 1 + x, x + x2 ) 4
⎜ ⎟
3 3 2
⎝x x x 0 ⎠
⎛ x4 0 x4 x3 ⎞
⎜ ⎟
[20, 5, 9] [[625, 25, 9]] ⎜ 0 x3 x3 x4 ⎟
⎜ ⎟ (1, x + x2 + x3 , 1 + x2 + x3 , x + x2 ) 5
⎜ ⎟
⎝ x3 x4 0 x3 ⎠

TABLE III. Parameters and code matrices of finite-size OGSC classical codes and the resulting HGP codes.


for i ∈ [ k/2], and the following sequence of operations
iteratively for QB :
D
MX → CZ-S → T̄−i,−i , (A8)

for i ∈ [ k/2 − 1]. MX D
denotes a subroutine for mea-
suring all diagonal logical qubits in the X basis non-
destructively, using Alg. 4 in O(log k) logical cycles. As
shown in Fig.
√ 8, each sequence in Eq. (A7) or Eq. (A8) FIG. 8. Illustration of one sequence of operations of
generates k ∣i⟩ states on the diagonal qubits utiliz- ⊗k
the iterative gadget for preparing ∣i⟩ . The orange
ing the CZ-S gate and then distributes them to non-
region and the white region represent logical qubits in 0 and
diagonal qubits utilizing the logical translation gadget i states, respectively.
(see Sec. A 1). The two sequences of operations then fill
QA and QB with two complementary half blocks of ∣i⟩
states, respectively. Finally, we merge the ∣i⟩ states in QB Algorithm 4: The MX D
subroutine in Eq. (A7)
into QA by performing the following transversal opera- for measuring the diagonal qubits of a HGP code
tions: Initially, each pair of qubits in A and B are either Q in X basis non-destructively.
stabilized by ⟨ȲA , Z̄B ⟩ or ⟨Z̄A , ȲB ⟩; Performing transver- 1 Prepare an identical ancilla code Q′ in ∣+⟩ .
⊗k

sal X̄A X̄B measurements project all the pairs into the √
2 For simplicity, assume that k = 2m for some m ∈ Z.
same entangled state stabilized by ⟨X̄A X̄B , ȲA Z̄B , Z̄A ȲB ⟩
3 for t ∈ [m] do
(up to some Pauli corrections); Final transversal Z mea- // Reset the non-diagonal logical qubits of
surements on B project each pair into a product state
Q′ to ∣0⟩ by recursively measuring
stabilized by ⟨YA , ZB ⟩, which indicates that the Y states subgrids that do not overlap with the
in B are all merged into A. diagonal line i = j. See Fig. 9 for an
Since each sequence in Eq. (A7) or Eq. √ (A8) takes illustration of this step.
O(log k) logical cycles and there are √ O( k) sequences 4 Apply the GPPM(Z, Et , Et′ ) gadget to Q′ , where
√ √
in total, the entire gadget takes O( k 0 log k) logical cy- Et ∶= ⋃j=0,1,⋯,2t−1 −1 {{ 2tk (2j)+1}, ⋯, { 2tk (2j +1)}}
cles. and Et′ ∶= √ √
⋃j=0,1,⋯,2t−1 −1 {{ 2tk (2j + 1) + 1}, ⋯, { 2tk (2j + 2)}}.
5 Apply the GPPM(Z, Et′ , Et ) gadget to Q′ .
5. Parallel logical Hadamard gates
6 Perform transversal CNOTs from Q′ to Q.
7 Transversally measure Q′ in the X basis.
Here, we provide a gadget for implementing logi-
cal Hadamard gates transversely on logical qubits of
a [[n, k, d]] symmetric HGP code. We first apply the
fold-transversal H-SWAP gate, which applies the desired utilizing the GPPMs gadget in a similar fashion as that
transversal Hadamards up to extra swaps along the diag- for transversely preparing the ∣i⟩ states.
onal (see Table I), then cancel the extra logical swaps by To implement the logical swaps on a code Q, we pre-
27

rest are initialized in ∣+⟩. Such a selective initialization


can be implemented by measuring the diagonal qubits in
Z basis in O(log k) cycles using Alg. 7 (with Z and X
flipped and up to an extra X measurements using a single
X-GPPMs gadget) and then distributing the ∣0⟩ states
to L′′′ ′′′
i by performing a logical translation T̄i,i . The X
measurements in Fig. 11(a) on Li can be implemented
similarly using ancilla code Q′′′ whose logical qubits L′′i
are initialized in ∣+⟩ while the rest are initialized in ∣0⟩.

Overall, the transversal Hadamard gates, implemented
by a H-SWAP gate and √ O( k) sequences of line swaps
FIG. 9. Illustration for measuring all the non-diagonal in Eq. (A9), take O( k log k) logical cycles.
qubits of an HGP code in log depth for step 3 of
Alg. 4 at t = 1. Performing the single-qubit measurements
can be viewed as “filling” an empty patch except for the di-
Appendix B: Proof of Theorem 11
agonal. The first time step fills the blue and the red squares
with two GPPMs gadget. This leaves two sub-squares to be
filled. This procedure can then be applied recursively to fill In this section, we provide the proof of Theorem 11 re-
the entire square in log depth. Note that later steps might garding the parallel implementation of arbitrary Clifford
fill the regions that have already been filled by the previous gates (consisting of Hadamards, S gates, and CNOTs)
steps, but importantly, the diagonal line will not be filled. using the gadgets in Table I. We first prove that a layer
of O(k) Clifford gates can be implemented in parallel
b c in O(k 3/4 ) logical cycles using the gadgets in Table I,
including the translation gadget. Then, it will become
a d apparent that the translation gadget is essential only for
the parallelism, but not necessary for generating the full
Clifford group. We note that this task of implementing
Clifford gates in parallel is a compilation problem with a
restricted gate set and we only provide an upper bound
on the circuit depth using a constructive compilation.
We consider a layer of random Clifford gates containing
O(k) Hadamard gates, O(k) S gates, and O(k) random
CNOTs, supported on the logical qubits Q̄∣H , Q̄∣S , and
FIG. 10. Illustration for one sequence of operations of Q̄∣CNOT of a HGP code Q, respectively. We implement
the gadget for swapping logical qubits of a symmetric these three types of gates separately.
HGP code along the diagonal. (a) to (b): teleportation First, we note that we can teleport any subset Q̄0 of
of the two mirrored lines of logical qubits from Q to Q′ and the logical qubits of Q transversely to the corresponding
Q′′ . (b) to (c): apply the logical translation gadget to Q′ and logical√qubits of another identical code Q′ , and vice versa,
Q′′ . (c) to (d): teleportation back into Q. in O( k) logical cycles using the selective teleportation
gadget in Alg. 3.
To implement the Hadamard gates, we teleport Q̄∣H
pare two identical ancilla codes Q′ and Q′′ . Let Li de- transversely to Q̄′ ∣H of another code Q′ . Then, we apply
note a line of logical qubits {Q̄j,j+i }j∈[√k] (only includ- the transversal Hadamard gates (without extra swaps) on
√ √ √
ing qubits with valid coordinates ∈ [ k] × [ k]) with an all the logical qubits of Q′ in O( k log k) logical cycles
offset i to the diagonal. The swap gadget √ amounts to using the subroutine described in Sec. A 5. Finally, we
swapping the “twin” lines Li ↔ L−i for i ∈ [ k − 1]. As teleport Q̄′ ∣H back to Q̄∣H .
illustrated in Fig. 10, each such swap can be implemented We implement the S gates using teleported gates.
by the following sequence of operations: As shown in Fig. 11(b), we prepare another identical
code Q′ , where Q̄′ ∣S are initialized in ∣i⟩ states while
Tel(Li → L′i ); Tel(L−i → L′′−i ) → T̄−2i,−2i
′ ′′
; T̄2i,2i the rest are initialized in ∣+⟩ states. Then transversal
(A9) CNOTs between Q̄ and Q̄′ followed by transversal mea-
→ Tel(L′−i → L−i ); Tel(L′′i → Li ),
surements of Q̄ teleport the logical qubits from Q to Q′
where each of the teleportation between two identified with the desired S gates applied. The selective initial-
lines of qubits across two codes, e.g. Tel(Li → L′ ) from ization of Q′ can be implemented by first preparing all
Li to L′i , can be implemented by the teleportation circuit the logical
√ qubits in ∣i⟩ using the subroutine in Sec. A 4
in Fig. 11(a), where the ZZ measurements on Li and L′i in O( k log k) logical cycles, followed by resetting the
are implemented using another identical ancilla code Q′′′ , qubits Q̄′ /Q̄′ ∣S to ∣+⟩
√ using GPPMs in a column-by-
whose logical qubits L′′i are initialized in ∣0⟩ while the column fashion in O( k) logical cycles.
28

a b c

FIG. 11. Circuits for implementing (a) teleportation (b) teleported S gate (c) measurement-based CNOT.

a b ing of two Bell measurements (followed by measuring the


ancilla). The Z (and similarly, X-) Bell measurements
required for all the vertical CNOTs in a column can be
implemented using a single GPPMs gadget as long as
they do not share ancillae. We can assume that we have
enough ancillae since otherwise we can simply teleport
part of the vertical CNOTs (at most half) to another
empty patch and implement them separately. As a result,
all √
the vertically-aligned CNOTs can be implemented in
O( k) logical cycles and similarly, all the horizontally

c d aligned CNOTs can be implemented in O( k) logical
cycles in a row-by-row fashion.
Finally, we finish the proof by showing that the
“TRBL”-CNOTs can be implemented in O(k 3/4 ) logi-
cal cycles (same for the “TLBR”-CNOTs). As shown in
Fig. 12(b), for any “TRBL”-CNOT acting on a pair of
qubits Q̄i,j and Q̄i′ ,j ′ , where i > i′ and j < j ′ , we imple-
ment it by introducing an ancilla Q̄i′ ,j (see the empty
circles in Fig. 12(b)) and implementing the circuit in
Fig. 11(c), where the Z- and X-Bell measurements are
applied on horizontal and vertical pairs, respectively. We
group the CNOTs into different clusters according to the
FIG. 12. Illustration for implementing a layer of ran-
dom CNOTs using the gadgets in Table I. (a) Classifica-
ancilla they share. We further partition these clusters
tion of all the CNOTs into three types: the “Aligned”-CNOTs into two types: dense clusters with more than m CNOTs
(black), the “TLBR”-CNOTs (red), and the “TRBL”-CNOTs and sparse clusters otherwise, where m is some constant
(blue). (b) The “TRBL”-CNOTs form different clusters ac- integer that we will specify later (see Fig. 12(b) for an
cording to their shared ancilla (empty circles) and the clusters illustration with m = 1). We can implement the sparse
are partitioned into sparse clusters (the right two) and dense clusters in a column-by-column and row-by-row fashion,
clusters (the left one). (c) to (d): Shifting and “symmetriz- similar to that for implementing the “Aligned”-CNOTs.
ing” the CNOTs of a dense cluster such that each CNOT is Specifically, we implement them in ≤ m sequences and for
mirrored along the diagonal line i = j. each sequence, we pick one CNOT from each cluster and
implement all these picked CNOTs by first performing all
the required vertical X-Bell √ measurements in a column-
To implement the CNOTs, we first classify them into by-column fashion in O( k) logical cycles and then per-
three types: the “Aligned”-CNOTs, acting on logical forming all the required √ Z-Bell measurements in a row-
qubits within the same row or the same column (see the by-row fashion in O( k) logical cycles. In total, imple- √
black CNOTs in Fig. 12(a)); the “TLBR”-CNOTs, act- menting these sparse clusters thus takes TS = O(m k)
ing on pairs of qubits oriented from the top left to the logical cycles.
bottom right (see the red CNOTs in Fig. 12(a)); and the Lastly, we implement the dense clusters one-by-
“TRBL”-CNOTs, acting on pairs of qubits oriented from one and for each dense cluster with n qubit pairs
the top right to the bottom left (see the blue CNOTs in {{Q̄ri ,β , Q̄α,ci }}i∈[n] sharing a common ancilla Q̄α,β , we
Fig. 12(a)). The “Aligned”-CNOTs are the easiest to im- implement it in parallel in O(1) logical cycles. The strat-
plement. We implement the vertically aligned CNOTs in egy is to first shift and “symmetrize” these pairs such
a column-by-column fashion. For each qubit pair in a col- that each pair is mirrored along the diagonal line i = j
umn, we introduce a distinct ancilla on the same column (see Fig. 12(a) to (b) for an illustration), and then im-
and implement the measurement-based CNOT consist- plement these symmetrized CNOTs in parallel using the
29

CZ-S gate (up to some Hadamards), which applies pair- describe in the following. As shown in Eq. C1,
wise CZs folded along the diagonal. Specifically, we first
teleport the cluster to another empty code Q′ in O(1) Q0 C01 ⊗ C02 ⊗ C03
logical cycles by first teleporting the row and then the
column. Without loss of generality, assume that α < β. MX
Then, we shift the entire cluster such that the ancilla
Q̄′α,β is on the diagonal (β, β) by applying the transla- Q1 C01 ⊗ C02 ⊗ C13 C01 ⊗ C12 ⊗ C03 C11 ⊗ C02 ⊗ C03
tional gate T̄β−α,0 . Now, each pair (Q̄′ri ,β , Q̄′α,ci ) gets HX ,
shifted to (Q̄′β−α+ri ,β , Q̄′β,ci ). Then, to symmetrize these Q2 C01 ⊗ C12 ⊗ C13 C11 ⊗ C02 ⊗ C13 C11 ⊗ C12 ⊗ C03
pairs, we swap the column qubits Q̄′β−α+ri ,β ↔ Q̄′ci ,β for
T
i ∈ [n]. Each of the swaps can be done by introducing an HZ

ancilla within the same column and performing pairs of Q3 C11 ⊗ C12 ⊗ C13
Bell measurements (similar to implementing a CNOT).
(C1)
We can assume that there are enough empty ancillae and
a 3D homological product code is constructed by taking
the target qubit locations do not overlap with the orig-
the total complex of the tensor product of three length-
inal qubit locations so that the n swaps can be done in
∂1i
O(1) logical cycles using the parallel GPPMs (otherwise, 1 complexes {C1i Ð→ C0i }i=1,2,3 . We associate the first
we can teleport at most half of the qubit pairs to another three vector spaces Q3 , Q2 and Q1 of the total complex
code and implement them separately and in parallel). Fi- with Z checks, qubits, X checks, respectively. The extra
nally, we apply the fold-transversal CZ-S gate to imple- vector space Q0 is associated with X meta checks that
ment the symmetrized CNOTs (up to some Hadamards check the X checks: MX HX = 0. We assign the base
that can be addressed separately, as described earlier) complexes with three classical codes with check matrices
and revert the above process to teleport the qubits back {Hi }i=1,2,3 as follows:
to their original position in Q. Since each of the dense
clusters can be implemented in O(1) logical cycles and ∂11 = H1 , ∂12 = H2 , ∂13 = H3T . (C2)
there are at most k/m such dense clusters, implementing
all the dense clusters takes TD = O(k/m) logical cycles.
Then the check matrices HX and HZ and the X meta
check matrix MX are given by
To sum up, implementing √ all the “TRBL”-CNOTs
thus takes T = TS + TD = O(m k) + O(k/m) logical cy-
HZ = (H1T ⊗ I ⊗ I, I ⊗ H2T ⊗ I, I ⊗ I ⊗ H3 ) ,
cles. By choosing m = Θ(k 1/4 ), we have T = O(k 3/4 ),
which completes the proof of Theorem 11. ⎛ I ⊗ H2 ⊗ I H1 ⊗ I ⊗ I 0 ⎞
⎜ ⎟

= ⎜ I ⊗ I ⊗ H3
T
H1 ⊗ I ⊗ I ⎟,
Finally, we comment that the full Clifford group can HX 0 ⎟ (C3)
⎜ ⎟
be generated without using the translation gadget and ⎝ 0 I ⊗ I ⊗ H3 I ⊗ H2 ⊗ I
T

assuming that the base codes are quasi-cyclic. The con-
struction for any selective H, S, or CNOT uses essentially MX = (I ⊗ I ⊗ H3T , I ⊗ H2 ⊗ I, H1 ⊗ I ⊗ I) .
the same ingredients as described above, although differ-
ent Clifford gates might have to be executed sequentially Based on Eq. (C3), we can derive a canonical basis of
in the absence of the translation gadget. logical operators using the Künneth formula [30, 82]:

⎛ 0 ⎞
⎜ ⎟
X̄ = {⎜
⎜ 0 ⎟ ∣ f ∈ rs(H1 )● , g ∈ rs(H2 )● , h ∈ ker(H3 )},

⎜ ⎟
⎝ f ⊗g⊗h ⎠
⎛ 0 ⎞
⎜ ⎟ ′
Appendix C: Parallel PPMs for 3D homological Z̄ = {⎜
⎜ 0 ⎟ ∣ f ∈ ker(H1 ), g ′ ∈ ker(H2 ), h′ ∈ rs(H3 )● }.

product codes ⎜ ⎟
⎝ f ⊗ g ′ ⊗ h′


(C4)
In this section, we provide more details on constructing Again, without loss of generality, we assume that each
the parallel PPMs gadget in Def. 12 on any subcube of check matrix Hα can be row-reduced to their canonical
the logical qubits of a 3D homological product code. form, from which we can derive the canonical form of
ker(Hα ) and rs(Hα )● in Eq. (43). Then, we can find
Similar to that for the HGP code, the construction a canonical basis for the logical operators in Eq. (C4)
here works for a canonical basis of logical qubits that we forming conjugate pairs {(X̄i,j,k , Z̄i,j,k )}i∈[k1 ],j∈[k2 ],k∈[k3 ] ,
30

where: Lemma 16 (Soundness is sufficient for single-shot state


preparation). For a CSS code with a (t, f )-sound X
⎛ 0 ⎞ (Z) check matrix HX (HZ ) of single-shot distance dSS ,
⎜ ⎟ there exists a (q, f ) single shot protocol for preparing ∣0⟩L

=⎜ ⎟,
X̄i,j,k 0 ⎟
⎜ ⎟ (∣1⟩L ), where q = 21 min{t, dSS }.
⎝ ei ⊗ enj 2 ⊗ b3k
n1

(C5) Proof. We consider the case for preparing ∣0⟩L by measur-
⎛ 0 ⎞ ing one round of X checks, and the other case is mirrored.
⎜ ⎟

=⎜ ⎟. Let s be a (random) measured syndrome pattern in the
Z̄i,j,k 0 ⎟
⎜ ⎟ absence of measurement errors, and s corresponds to a
⎝ bi ⊗ bj ⊗ enk 3
1 2
⎠ Z error E0 such that HX E0 = s. Let se be a syndrome
error that adds to s. Let MX be the metacheck matrix
The logical operators are all supported on B1 × B2 × for HX that satisfies MX HX T
= 0 mod 2. We apply the
B3 ≃ [n1 ] × [n2 ] × [n3 ] and the logical qubits Q̄ = following two-stage correction protocol:
{Q̄i,j,k }(i,j,k)∈[k1 ]×[k2 ]×[k3 ] can be arranged on a [k1 ] ×
[k2 ] × [k3 ] cube, where the logical operator pairs of Q̄i,j,k • Find a minimum-weight syndrome correction sr
intersects on the physical qubit Qi,j,k . such that the corrected syndrome s′ ∶= s + se + sr
With this canonical logical basis, we can implement passes the meta checkes, i.e., s′ ∈ ker(MX ).
the Cube PPMs gadget on a 3D code Q in Def. 12 us-
ing essentially the same two-step protocol as that for the • If s′ is a valid syndrome, i.e. s′ ∈ Im(HX ), find a Z
GPPMs for HGP codes (see Alg. 2 and Fig. 2). So we Pauli correction Er that matches the corrected syn-
omit the details here and only sketch the protocol: (1) drome, i.e. HX Er = s + se + sr ; Otherwise, declare
Construct an ancilla Q′ by performing puncturing and a logical failure.
augmenting on H1 and H2 according to Ex and Ey , and
then construct a mask code Q′′ by performing punctur- Now, we prove that the residual error E = Er E0
ing and augmenting on H3 according to Ez . (2) Prepare of the above protocol satisfies ∣E∣r ≤ f (2∣se ∣) if ∣se ∣ <
the ancilla code Q′ in the logical Z basis and reset some
1
2
min{t, dSS }. First, we prove by contradiction that
logical qubits to ∣+⟩ and some to GHZ states using Q′′ . the corrected syndrome s′ is a valid syndrome. As-
(3) Perform the desired CPPMs on Q using Q′ . sume s′ is not a valid syndrome. Since s is a valid
syndrome, se + sr must not be a valid syndrome. How-
ever, ∣se + sr ∣ ≤ 2∣se ∣ < dSS (by the minimum-weight
Appendix D: Single-shot state preparation for assumption of sr ). This would imply that there ex-
3D/4D homological product codes ists a s0 ∈ Ker(MX )/Im(HX ) with ∣s0 ∣ < dSS , which
leads to a contradiction. Therefore, the corrected syn-
Definition 13 (Reduced weight). Given a binary check drome s′ will be a valid syndrome. Next, we show that
matrix H ∈ Fm×n and an error e ∈ Fn2 , we define the the residual error E has a small reduced weight. Since
2
reduced weight of e w.r.t. H as ∣e∣H ∶= min{∣e∗ ∣, He∗ = ∣HZ E∣ = ∣HZ (Er E0 )∣ = ∣se + sr ∣ ≤ 2∣se ∣ < t, we have, by the
He}. soundness property in Eq. (D1),

Definition 14 (Soundness). Let t be an integer, and ∣E∣r ≤ f (∣se + sr ∣) ≤ f (2∣se ∣). (D3)
f ∶ Z → R be some monotonically increasing function with
f (0) = 0. Given a binary check matrix H ∈ Fm×n 2 , we say
it is (t, f )-sound if for any e ∈ Fn2 such that ∣He∣ < t, we
have Proposition 17 (4D homological product codes support
single-shot state preparation). A 4D homological product
∣e∣H ≤ f (∣He∣). (D1) code out of four identical [n1 , k1 , d1 ] classical base codes
support (q, f )-single shot state preparation in both the X
Definition 15 (Single-shot state preparation). For a
and the Z basis, where q = 21 d1 and f (x) = x3 /4.
state preparation protocol that prepares a ∣0⟩L (∣+⟩L )
state by measuring one round of X (Z) checks associated Proof. According to Ref. [32], a 4D homological prod-
with HX (HZ ) and applies corresponding correction, we uct code inherently has (t, f )-soundness for both their X
say that such a protocol is (q, f )-single shot if for any and Z checks, where t = d1 and f (x) = x3 /4. Moreover,
syndrome error se with ∣se ∣ < q that occurs during the it has a single-shot distance dSS = ∞. Then, according
check measurement, the corrected output differs from ∣0⟩L to Lemma 16, it supports (q, f )-single shot state prepa-
(∣+⟩L ) by an error E that satisfies: ration in both X and Z basis, where q = 21 d1 .
∣E∣HX (∣E∣HZ ) ≤ f (2∣se ∣). (D2)
31

[1] A. G. Fowler, M. Mariantoni, J. M. Martinis, and A. N. qldpc codes with optimized rydberg gates, arXiv preprint
Cleland, Surface codes: Towards practical large-scale arXiv:2404.18809 (2024).
quantum computation, Physical Review A 86, 032324 [18] G. Q. AI, Suppressing quantum errors by scaling a sur-
(2012). face code logical qubit, Nature 614, 676 (2023).
[2] D. Litinski, A Game of Surface Codes: Large-Scale Quan- [19] V. V. Sivak, A. Eickbusch, B. Royer, S. Singh, I. Tsiout-
tum Computing with Lattice Surgery, Quantum 3, 128 sios, S. Ganjam, A. Miano, B. L. Brock, A. Z.
(2019). Ding, L. Frunzio, S. M. Girvin, R. J. Schoelkopf,
[3] M. E. Beverland, P. Murali, M. Troyer, K. M. Svore, and M. H. Devoret, Real-time quantum error correc-
T. Hoeffler, V. Kliuchnikov, G. H. Low, M. Soeken, tion beyond break-even, arXiv preprint arXiv:2211.09116
A. Sundaram, and A. Vaschillo, Assessing requirements 10.48550/arxiv.2211.09116 (2022).
to scale to practical quantum advantage, arXiv preprint [20] D. Bluvstein, S. J. Evered, A. A. Geim, S. H. Li,
arXiv:2211.07629 10.48550/arxiv.2211.07629 (2022). H. Zhou, T. Manovitz, S. Ebadi, M. Cain, M. Kalinowski,
[4] C. Gidney and M. Ekerå, How to factor 2048 bit RSA in- D. Hangleiter, J. P. B. Ataides, N. Maskara, I. Cong,
tegers in 8 hours using 20 million noisy qubits, Quantum X. Gao, P. S. Rodriguez, T. Karolyshyn, G. Semeghini,
5, 1 (2019). M. J. Gullans, M. Greiner, V. Vuletić, and M. D. Lukin,
[5] P. Panteleev and G. Kalachev, Quantum LDPC Codes Logical quantum processor based on reconfigurable atom
with Almost Linear Minimum Distance, IEEE Transac- arrays, Nature 2023 , 1 (2023).
tions on Information Theory 68, 213 (2022). [21] R. S. Gupta, N. Sundaresan, T. Alexander, C. J.
[6] N. P. Breuckmann and J. N. Eberhardt, Balanced Prod- Wood, S. T. Merkel, M. B. Healy, M. Hillenbrand,
uct Quantum Codes, IEEE Transactions on Information T. Jochym-O’Connor, J. R. Wootton, T. J. Yoder, A. W.
Theory 67, 6653 (2020). Cross, M. Takita, and B. J. Brown, Encoding a magic
[7] P. Panteleev and G. Kalachev, Asymptotically good state with beyond break-even fidelity, arXiv preprint
Quantum and locally testable classical LDPC codes, Pro- arXiv:2305.13581 (2023).
ceedings of the Annual ACM Symposium on Theory of [22] H. Levine, A. Haim, J. S. Hung, N. Alidoust, M. Kalaee,
Computing , 375 (2022). L. DeLorenzo, E. A. Wollack, P. A. Arriola, A. Khalajhe-
[8] A. Leverrier and G. Zémor, Quantum Tan- dayati, Y. Vaknin, et al., Demonstrating a long-coherence
ner codes, arXiv preprint arXiv:2202.13641 dual-rail erasure qubit using tunable transmons, arXiv
10.48550/arxiv.2202.13641 (2022). preprint arXiv:2307.08737 (2023).
[9] S. Gu, C. A. Pattison, and E. Tang, An efficient decoder [23] S. Ma, G. Liu, P. Peng, B. Zhang, S. Jandura, J. Claes,
for a linear distance quantum LDPC code, Proceedings of A. P. Burgers, G. Pupillo, S. Puri, and J. D. Thomp-
the Annual ACM Symposium on Theory of Computing , son, High-fidelity gates with mid-circuit erasure conver-
919 (2022). sion in a metastable neutral atom qubit, arXiv preprint
[10] I. Dinur, M.-H. H. Hsieh, T.-C. C. Lin, and T. Vidick, arXiv:2305.05493 (2023).
Good Quantum LDPC Codes with Linear Time De- [24] M. da Silva, C. Ryan-Anderson, J. Bello-Rivas,
coders, Proceedings of the Annual ACM Symposium on A. Chernoguzov, J. Dreiling, C. Foltz, J. Gaebler,
Theory of Computing , 905 (2022). T. Gatterman, D. Hayes, N. Hewitt, et al., Demon-
[11] T.-C. Lin and M.-H. Hsieh, Good quantum LDPC codes stration of logical qubits and repeated error correc-
with linear time decoder from lossless expanders, arXiv tion with better-than-physical error rates, arXiv preprint
preprint arXiv:2203.03581 (2022). arXiv:2404.02280 (2024).
[12] M. A. Tremblay, N. Delfosse, and M. E. Beverland, [25] S. R. Cohen and J. D. Thompson, Quantum computing
Constant-Overhead Quantum Error Correction with with circular Rydberg atoms, PRX Quantum 2, 030322
Thin Planar Connectivity, Physical Review Letters 129, (2021).
050504 (2022). [26] N. P. Breuckmann and S. Burton, Fold-Transversal
[13] Q. Xu, J. P. Bonilla Ataides, C. A. Pattison, N. Raveen- Clifford Gates for Quantum Codes, arXiv preprint
dran, D. Bluvstein, J. Wurtz, B. Vasić, M. D. Lukin, arXiv:2202.06647 (2022).
L. Jiang, and H. Zhou, Constant-overhead fault-tolerant [27] A. O. Quintavalle, P. Webster, and M. Vasmer, Parti-
quantum computation with reconfigurable atom arrays, tioning qubits in hypergraph product codes to implement
Nature Physics , 1 (2024). logical gates, arXiv preprint arXiv:2204.10812 (2022).
[14] S. Bravyi, A. W. Cross, J. M. Gambetta, D. Maslov, [28] P. W. Shor, Fault-tolerant quantum computation, arXiv
P. Rall, and T. J. Yoder, High-threshold and low- preprint arXiv:quant-ph/9605011 (1996).
overhead fault-tolerant quantum memory, Nature 627, [29] S. Huang, T. Jochym-O’Connor, and T. J. Yoder,
778 (2024). Homomorphic Logical Measurements, arXiv:2211.03625
[15] O. Higgott and N. P. Breuckmann, Constructions and (2022).
performance of hyperbolic and semi-hyperbolic Floquet [30] S. Bravyi and M. B. Hastings, Homological
codes, arXiv preprint arXiv:2308.03750 (2023). Product Codes, arXiv preprint arXiv:1311.0885
[16] J. Viszlai, W. Yang, S. F. Lin, J. Liu, N. Nottingham, 10.48550/arxiv.1311.0885 (2013).
J. M. Baker, and F. T. Chong, Matching generalized- [31] W. Zeng and L. P. Pryadko, Higher-Dimensional Quan-
bicycle codes to neutral atoms for low-overhead fault- tum Hypergraph-Product Codes with Finite Rates, Phys-
tolerance, arXiv preprint arXiv:2311.16980 (2023). ical Review Letters 122, 230501 (2019).
[17] C. Poole, T. Graham, M. Perlin, M. Otten, and [32] E. T. Campbell, A theory of single-shot error correction
M. Saffman, Architecture for fast implementation of for adversarial noise, Quantum Science and Technology
32

4, 025006 (2019). error-correcting codes exist, Physical Review A 54, 1098


[33] N. P. Breuckmann and J. N. Eberhardt, Quantum (1996).
Low-Density Parity-Check Codes, PRX Quantum 2, [52] A. M. Steane, Error Correcting Codes in Quantum The-
10.1103/prxquantum.2.040101 (2021). ory, Physical Review Letters 77, 793 (1996).
[34] W. C. Huffman and V. Pless, Fundamentals of error- [53] The space V that satisfies V ∩ rs(Hα ) = 0 and Fn 2
α
=
correcting codes (Cambridge university press, 2010). V ⊕ rs(Hα ).
[35] J. P. Tillich and G. Zemor, Quantum LDPC codes with [54] C. Jones, Low-overhead constructions for the fault-
positive rate and minimum distance proportional to the tolerant Toffoli gate, Physical Review A - Atomic, Molec-
square root of the blocklength, IEEE Transactions on ular, and Optical Physics 87, 022328 (2013).
Information Theory 60, 1193 (2014). [55] P. W. Shor, Algorithms for quantum computation: Dis-
[36] C. Gidney, Halving the cost of quantum addition, Quan- crete logarithms and factoring, Proceedings - Annual
tum 2, 74 (2018). IEEE Symposium on Foundations of Computer Science,
[37] H. Yamasaki and M. Koashi, Time-Efficient FOCS , 124 (1994).
Constant-Space-Overhead Fault-Tolerant Quan- [56] S. A. Cuccaro, T. G. Draper, S. A. Kutin, and D. P.
tum Computation, arXiv preprint arXiv:2207.08826 Moulton, A new quantum ripple-carry addition circuit,
10.48550/arxiv.2207.08826 (2022). arXiv preprint quant-ph/0410184 (2004).
[38] S. Yoshida, S. Tamiya, and H. Yamasaki, Concate- [57] V. Giovannetti, S. Lloyd, and L. Maccone, Quantum ran-
nate codes, save qubits, arXiv preprint arXiv:2402.09606 dom access memory, Physical review letters 100, 160501
(2024). (2008).
[39] H. Goto, Many-hypercube codes: High-rate quan- [58] Y. Zhang, D. Niu, A. Shabani, and H. Shapourian, Quan-
tum error-correcting codes for high-performance tum Volume for Photonic Quantum Processors, arXiv
fault-tolerant quantum computation, arXiv preprint preprint arXiv:2208.11724 10.48550/arxiv.2208.11724
arXiv:2403.16054 (2024). (2022).
[40] G. Zhu, S. Sikander, E. Portnoy, A. W. Cross, and B. J. [59] D. Bluvstein, H. Levine, G. Semeghini, T. T. Wang,
Brown, Non-clifford and parallelizable fault-tolerant log- S. Ebadi, M. Kalinowski, A. Keesling, N. Maskara,
ical gates on constant and almost-constant rate homo- H. Pichler, M. Greiner, V. Vuletić, and M. D. Lukin, A
logical quantum ldpc codes via higher symmetries, arXiv quantum processor based on coherent transport of entan-
preprint arXiv:2310.16982 (2023). gled atom arrays, Nature 2022 604:7906 604, 451 (2022).
[41] P. Panteleev and G. Kalachev, Degenerate Quantum [60] J. M. Pino, J. M. Dreiling, C. Figgatt, J. P. Gaebler,
LDPC Codes With Good Finite Length Performance, S. A. Moses, M. S. Allman, C. H. Baldwin, M. Foss-Feig,
Quantum 5, 585 (2019). D. Hayes, K. Mayer, C. Ryan-Anderson, and B. Neyen-
[42] M. B. Hastings, J. Haah, and R. O’Donnell, Fiber bundle huis, Demonstration of the trapped-ion quantum CCD
codes: Breaking the n1/2polylog(n) barrier for Quantum computer architecture, Nature 2021 592:7853 592, 209
LDPC codes, in Proceedings of the Annual ACM Sym- (2021).
posium on Theory of Computing (2021) pp. 1276–1288, [61] L. Z. Cohen, I. H. Kim, S. D. Bartlett, and B. J. Brown,
arXiv:2009.03921. Low-overhead fault-tolerant quantum computing using
[43] A. Krishna and D. Poulin, Fault-Tolerant Gates on Hy- long-range connectivity, Science Advances 8, 10.1126/sci-
pergraph Product Codes, Physical Review X 11, 011023 adv.abn1717 (2022).
(2021). [62] S. Bravyi and A. Kitaev, Universal quantum computa-
[44] A. O. Quintavalle and E. T. Campbell, ReShape: A De- tion with ideal Clifford gates and noisy ancillas, Physical
coder for Hypergraph Product Codes, IEEE Transactions Review A 71, 022316 (2005).
on Information Theory 68, 6569 (2022). [63] Y. Li, A magic state’s fidelity can be superior to the
[45] A. M. Steane, Active stabilization, quantum computa- operations that created it, New Journal of Physics 17,
tion, and quantum state synthesis, Physical Review Let- 023037 (2015).
ters 78, 2252 (1997). [64] L. Lao and B. Criger, Magic state injection on the ro-
[46] M. Cain, C. Zhao, H. Zhou, N. Meister, J. Ataides, tated surface code, in Proceedings of the 19th ACM In-
A. Jaffe, D. Bluvstein, and M. D. Lukin, Correlated de- ternational Conference on Computing Frontiers (2022)
coding of logical algorithms with transversal gates, arXiv pp. 113–120.
preprint arXiv:2403.03272 (2024). [65] C. Gidney, Cleaner magic states with hook
[47] H. Zhou, C. Zhao, M. Cain, D. Bluvstein, C. Ducker- injection, arXiv preprint arXiv:2302.12292
ing, H.-Y. Hu, S.-T. Wang, A. Kubica, and M. D. Lukin, 10.48550/arxiv.2302.12292 (2023).
Algorithmic fault tolerance for fast quantum computing, [66] M. Vasmer and D. E. Browne, Three-dimensional surface
arXiv preprint arXiv:2406.17653 (2024). codes: Transversal gates and fault-tolerant architectures,
[48] C. Gidney and A. G. Fowler, Efficient magic state fac- Physical Review A 100, 012312 (2019).
tories with a catalyzed ∣CCZ⟩ to 2∣T ⟩ transformation, [67] A. Kubica, B. Yoshida, and F. Pastawski, Unfolding the
Quantum 3, 135 (2019). color code, New Journal of Physics 17, 083026 (2015).
[49] A. G. Fowler, Time-optimal quantum com- [68] H. Bombı́n, Gauge Color Codes: Optimal Transversal
putation, arXiv preprint arXiv:1210.4626 Gates and Gauge Fixing in Topological Stabilizer Codes,
10.48550/arxiv.1210.4626 (2012). New Journal of Physics 17, 10.48550/arxiv.1311.0879
[50] D. Litinski and N. Nickerson, Active volume: An ar- (2013).
chitecture for efficient fault-tolerant quantum comput- [69] J. Roffe, D. R. White, S. Burton, and E. Campbell, De-
ers with limited non-local connections, arXiv preprint coding across the quantum low-density parity-check code
arXiv:2211.15465 (2022). landscape, Physical Review Research 2, 043423 (2020).
[51] A. R. Calderbank and P. W. Shor, Good quantum [70] J. Roffe, LDPC: Python tools for low density parity check
33

codes (2022). cal Review X 11, 011020 (2021).


[71] N. Delfosse, V. Londe, and M. E. Beverland, Toward a [77] R. Babbush, C. Gidney, D. W. Berry, N. Wiebe, J. Mc-
Union-Find Decoder for Quantum LDPC Codes, IEEE Clean, A. Paler, A. Fowler, and H. Neven, Encoding Elec-
Transactions on Information Theory 68, 3187 (2022). tronic Spectra in Quantum Circuits with Linear T Com-
[72] L. Stambler, A. Krishna, and M. E. Beverland, Ad- plexity, Physical Review X 8, 10.1103/physrevx.8.041015
dressing Stopping Failures for Small Set Flip De- (2018).
coding of Hypergraph Product Codes, arXiv preprint [78] G. H. Low and I. L. Chuang, Hamiltonian Simulation
arXiv:2311.00877 (2023). by Qubitization, Quantum 3, 10.22331/q-2019-07-12-163
[73] A. Krishna, I. L. Navon, and M. Wootters, Viderman’s (2016).
algorithm for quantum LDPC codes, arXiv preprint [79] A. Cowtan, Ssip: automated surgery with quantum ldpc
arXiv:2310.07868 (2023). codes, arXiv preprint arXiv:2407.09423 (2024).
[74] A. Grospellier, L. Grouès, A. Krishna, and A. Leverrier, [80] A. Cross, Z. He, P. Rall, and T. Yoder, To appear.,
Combining hard and soft decoders for hypergraph prod- (2024).
uct codes, Quantum 5, 432 (2021). [81] Z. Li, L. Chen, L. Zeng, S. Lin, and W. H. Fong, Efficient
[75] E. T. Campbell, Early fault-tolerant simulations of the encoding of quasi-cyclic low-density parity-check codes,
Hubbard model, Quantum Science and Technology 7, IEEE Transactions on Communications 54, 71 (2006).
015007 (2021). [82] A. Hatcher, Algebraic topology (2005).
[76] A. M. Childs, Y. Su, M. C. Tran, N. Wiebe, and S. Zhu,
Theory of trotter error with commutator scaling, Physi-

You might also like