topological nature of the state by measur-
ing the topological entanglement entropy. By
simulating interferometry of toric code exci-
tations, we fully determined their associated
braiding statistics. Furthermore, we prepared
logical states of the distance-5 surface code on
25 qubits and demonstrated error correction
of logical measurements. Although a meaning-
ful implementation of active error correction
on these states is beyond current experimental
capabilities, we realized these states without
stabilizer circuitry, providing a scheme to char-
acterize and understand errors of logical qubits.
Preparation of the ground state
We realized the toric code ground state (Fig. 1A)
by implementing a shallow quantum circuit
on a Sycamore quantum processor ( 22 ). The
toric code Hamiltonian
H¼
X
s
As
X
p
Bp ð 1 Þ
is defined in terms of qubits living on the
edges of a square lattice. The“star”operators
As¼
Y
i∈sZiare products of PauliZoperators
touching each star (Fig. 1A,“+,”blue). The
“plaquette”operatorsBp¼
Y
j∈pXjare pro-
ducts of PauliXoperators on each plaquette
(Fig. 1A, square shape, purple). For the bound-
ary conditions shown in Fig. 1A, there is
only one toric code ground statejiG, with
parity +1 for all star and plaquette operators:
AsjiG ¼BpjiG ¼þ 1 jiG.
Rather than realizing the Hamiltonian ex-
plicitly, we directly prepared the ground state
using the algorithm depicted in Fig. 1B. This
algorithm is motivated by the observation that
the ground state is an equal superposition of
all possible“plaquette configurations”and can
be written as
jiG ¼
1
ffiffiffiffiffiffi
212
p
Y
p
ðÞIþBpji 0
31 ð 2 Þ
where 0ji^31 is the product of single-qubit
states 0ji, and the product is over the 12
plaquettes. We began in the trivial state 0ji^31 ,
where allh i¼As 1 andh i¼Bp 0. For each
plaquetteBp, we performed a Hadamard
gate on the upper qubit, preparing the state
ðÞji 0 þji 1 =
ffiffiffi
2
p
, and then performed CNOT
gates on the other qubits on the plaquette,
effectively realizingIþBp. These operations
were carefully ordered, starting in the middle
and working outward, to avoid conflict be-
tween plaquettes while minimizing circuit
depth. The 12 Hadamard gates create a super-
position of 2^12 bitstrings, and the CNOT gates
transform each of those bitstrings into a con-
figuration in which theZparity on each star is
+1; the final superposition hasXparity +1 on
each plaquette. This circuit exhibits optimal
scaling, with depth linear in system width
( 23 ), specifically 3þ 2 bcðÞN 1 = 2 nearest-
neighbor CNOT layers for a latticeNpla-
quettes wide ( 24 ).
Measurement of topological
entanglement entropy
Topologically ordered states in 2D systems
exhibit long-range quantum entanglement,
characterized by the topological entangle-
ment entropyStopo( 24 , 26 ). Ground states of
2D gapped Hamiltonians typically satisfy the
“area law”scaling of the entanglement entropy:
The leading-order contribution to the entan-
glement entropySAof a subsystemAresults
from local interactions that scale with the
boundary length of the subsystem. Topological
ground states have an additional universal
constant contributionStopo< 0 that arises
from their intrinsic long-range entanglement.
To extractStopo, a linear combination of sub-
system entropies can be constructed so that
the local contributions cancel. For the sub-
systems depicted in Fig. 2A
Stopo¼SAþSBþSCSABSBC
SACþSABC ð 3 Þ
whereABindicates the union ofAandB. Be-
cause the correlation length of the toric code
eigenstates is zero,Stopocan be inferred from
small subsystems. For the toric code ground
state,Stopo=–ln2, reflecting the total quantum
dimension ofℤ 2 topological order ( 27 ), where-
asStopo= 0 is the absence of topological order.
The structure of the toric code Hamiltonian
results in entanglement characterized by inte-
ger multiples of ln2, scaling with the number
of star operatorsAsintersecting the subsystem
boundary (Fig. 2B) ( 28 ). To computeStopo,
one can measure the second Rényi entropy
S(2)=–ln[Tr(r^2 )], whereris the density matrix,
for each subsystem in Eq. 3. Recently intro-
duced randomized methods enable efficient
measurement of Rényi entanglement entropies,
requiring a smaller number of measurements
for large subsystems as compared with full
quantum state tomography ( 29 – 31 ). This en-
ables accurate entropy measurement when
tomography is intractable, such as the nine-
qubit subsystem in Fig. 2A. We applied random
single-qubit unitary gates to the subsystem
of interest and sampled the probability dis-
tribution of the bitstrings. Analyzing statistical
correlations across many random instances
1238 3 DECEMBER 2021•VOL 374 ISSUE 6572 science.orgSCIENCE
Fig. 1. Toric code ground state.(A) Experimentally measured parity values for
a 31-qubit lattice in the toric code ground statejiG. Qubits (“×”) are drawn
on the standard toric code lattice, touching star (As,“+,”blue tile) and plaquette
(Bp, square shape, purple tile) operators. We computed each parity from a
measured probability distribution (measuring eachAsandBpseparately, 10^4
repetitions), which we corrected for readout error using iterative Bayesian
methods ( 31 ) [( 32 ), section II]. Mean parity, 0.92 ± 0.06 (1s). (B) Quantum
circuit to preparejiG, with quantum gates superimposed on experimentally
measured parity values after each step. The circuit consists of Hadamard (H)
and CNOT gates, which we compiled into CZ gates.
RESEARCH | RESEARCH ARTICLES