1 of 39

Understanding Defect Diagrams

Craig Gidney

2 of 39

Overview

Part 1:

Defects in�Space

Part 2:

Defects in Spacetime

Part 3:

Parity Sheets

WIP

3 of 39

Part 1

Defects in Space

4 of 39

A "Defect" is an exception to a background pattern

5 of 39

Background pattern of the surface code: the checkerboard

Z

X

LEGEND

X Stabilizer

Z Stabilizer

6 of 39

Examples of surface code defects

Z

X

LEGEND

X Stabilizer

Z Stabilizer

Mixed basis stabilizer (red=X, blue=Z, pink=Y)

a 5-body stabilizer,

not 5 stabilizers

7 of 39

Examples of surface code defects

Z

X

LEGEND

X Stabilizer

Z Stabilizer

Mixed basis stabilizer (red=X, blue=Z, pink=Y)

a 5-body stabilizer,

not 5 stabilizers

8 of 39

How do we classify defects?

These two defects are both�"X boundaries", but what makes them the same type?

Are these also X boundaries?

If not, what are they?

9 of 39

Key concept: Excitations

An excitation is a stabilizer whose value is incorrect.�Typically: -1 instead of +1.

�There are two types of stabilizers and two corresponding types of excitations: X type and Z type.

�CAUTION: the X type excitation goes on the Z type stabilizer. The type name comes from the error that causes the excitation.

Z

X

LEGEND

X Stabilizer

Z Stabilizer

X Excitation

P

Pauli Error

Z Excitation

10 of 39

Operating on excitations

Excitations can be affected by injecting data qubit Pauli errors.�

Pauli errors add an excitation to each anticommuting neighboring stabilizers.�

Two excitations on the same stabilizer cancel out.

X

Z

(move back and forth between this slide and previous slide to see errors affect excitations)

Y

Z

X

LEGEND

X Stabilizer

Z Stabilizer

X Excitation

P

Pauli Error

Z Excitation

11 of 39

You can't locally remove an excitation in the bulk

In this diagram, there is no set of local Pauli errors which can be injected which result in a state with no excitations.

This inability to change the parity of the number of Z excitations (or X excitations) defines the bulk.

Terminology:�The bulk conserves X excitations.�The bulk conserves Z excitations.

Z

X

LEGEND

X Stabilizer

Z Stabilizer

X Excitation

P

Pauli Error

Z Excitation

Can't inject error here

12 of 39

X boundaries absorb X excitations

An X boundary differs from the bulk in that it does not preserve X excitations.

There is a set of local Paulis which, if injected, would remove a lone X excitation.

�Terminology:�X boundaries absorb X excitations.

Z

X

LEGEND

X Stabilizer

Z Stabilizer

X Excitation

P

Pauli Error

Z Excitation

Can't inject error here

X

X

13 of 39

Z boundaries absorb Z excitations

A Z boundary differs from the bulk in that it does not preserve Z excitations.

There is a set of local Paulis which, if injected, would remove a lone Z excitation.

�Terminology:�Z boundaries absorb Z excitations.

Z

X

LEGEND

X Stabilizer

Z Stabilizer

X Excitation

P

Pauli Error

Z Excitation

Can't inject error here

Z

14 of 39

Crossing domain walls turns X into Z

A domain wall differs from the bulk in that it can locally turn an X excitation into a Z excitation (by crossing the wall).

Also turns Z into X.

Terminology:�Domain walls crosslink X/Z excitations.

Z

X

LEGEND

X Stabilizer

Z Stabilizer

X Excitation

P

Pauli Error

Z Excitation

Can't inject error here

Z

Z

X

X

15 of 39

Domain walls can't locally cancel X + Z

Note that the domain wall's conversion involves crossing. A domain wall doesn't enable cancelling adjacent X and Z excitations.

In the diagram to the right, no set of injected Pauli errors can reduce the number of excitations present to be less than 2.

Z

X

LEGEND

X Stabilizer

Z Stabilizer

X Excitation

P

Pauli Error

Z Excitation

Can't inject error here

16 of 39

Twists allow local cancellation of X + Z

A twist allows an X excitation next to a Z excitation to be locally cancelled.��This is strictly more powerful than a domain wall. For example, an X can be turned into a Z by introducing (unabsorbing) X+Z and cancelling the two Xs leaving a Z.���Terminology:�Twists absorb X+Z excitations.

Z

X

LEGEND

X Stabilizer

Z Stabilizer

X Excitation

P

Pauli Error

Z Excitation

Can't inject error here

X

X

Z

Z

Z

17 of 39

Summary of Types of Defect

No Defect

"Bulk"

Type X

"X Boundary"

Type Z

"Z Boundary"

Type H

"Domain Wall"

Type Y

"Twist"

Absorbs X�

Absorbs Z

Absorbs X+Z

Crosslinks X/Z

Conserves X

Conserves Z

18 of 39

Identifying defects

X type defect is nearby iff X excitations can be absorbed locally.

Z type defect is nearby iff Z excitations can be absorbed locally.

Y type defect is nearby iff X+Z excitations can be absorbed locally.

H type defect is nearby iff X excitations crosslink into Z excitations locally.

It doesn't matter how the defects are implemented.�

All that matters is categorizing what X and Z excitations can do.

19 of 39

Example: corners have twists

Can you locally cancel an X+Z excitation at a corner?

Yes.

Therefore there is a Y type defect at that corner.

Z

X

LEGEND

X Stabilizer

Z Stabilizer

X Excitation

P

Pauli Error

Z Excitation

Y

Z

Z

20 of 39

Summary of Types of Defect (redux)

No Defect

"Bulk"

Type X

"X Boundary"

Type Z

"Z Boundary"

Type H

"Domain Wall"

Type Y

"Twist"

Conserves X

Conserves Z

Absorbs X�

Absorbs Z

Crosslinks X/Z

Absorbs X+Z

21 of 39

Defect Diagrams: only draw locations of defects

=

Z

X

LEGEND

Y

H

Stabilizer Configuration Diagram

Defect Diagram

Exercise: why is this square Y type instead of H type?

bulk

22 of 39

Implementing defects

Given a defect diagram, you can attempt to find a stabilizer configuration which implements it.

Not all diagrams can be realized. For example, it's impossible to end a domain wall in the bulk without creating a twist defect.

Implementable

Not Implementable

Z

X

LEGEND

Y

H

bulk

23 of 39

Part 2

Defects in Spacetime

24 of 39

Accounting for time dynamics

So far we have only discussed�static stabilizer configurations.

�Computation requires dynamic�stabilizer configurations.

�To account for this we must add�a dimension and consider defects�that may span across time.

time

25 of 39

Going up a dimension

Defects in space:

X boundaries are 1D paths�Z boundaries are 1D paths�Domain walls are 1D paths�Twists are 0D points

Excitations are 0D points�

Excitations are stabilizers with an incorrect value (typically -1 instead of +1).

Defects in spacetime:

X boundaries are 2D surfaces�Z boundaries are 2D surfaces�Domain walls are 2D surfaces�Twists are 1D paths

Excitations are still 0D points� (not 1D, didn't gain a dimension)

Excitations are detection events; places where a measurement set's parity was predictable and seen to be wrong.

26 of 39

Summary of Types of Defect (spacetime redux)

No defect

"Bulk"

Type X

"X Boundary"

Type Z

"Z Boundary"

Type H

"Domain Wall"

Type Y

"Twist"

Conserves X

Conserves Z

�Absorbs X

Crosslinks X/Z

�Absorbs X+Z

�Absorbs Z

27 of 39

Static defects across spacetime

time

time

Stabilizer configurations

over time:

Equivalent spacetime�defect diagram:

X,Y,Z defects around a memory patch

Domain wall ending in a twist via long stabilizers

Z

X

LEGEND

Y

H

28 of 39

Identifying defects (spacetime redux)

X type defect is nearby iff X excitations can be absorbed locally.

Z type defect is nearby iff Z excitations can be absorbed locally.

Y type defect is nearby iff X+Z excitations can be absorbed locally.

H type defect is nearby iff X excitations crosslink into Z excitations locally.

It doesn't matter how the defects are implemented. It doesn't matter whether they span across space, across time, or across both.

All that matters is categorizing what X and Z excitations can do.

29 of 39

What boundary is introduced by transversal resets?

apply Rx to

all data qubits

...

Clearly the resets are an exception to the normal pattern.

They're probably introducing some type of defect. But which type?

...

30 of 39

Getting rid of a detection event by adding errors (1/3)

Reminder: spacetime excitations are detection events. They are stabilizer measurements changing.

Z

X

LEGEND

X Stabilizer

Z Stabilizer

X Excitation

M

Measure Error

Z Excitation

+1

+1

-1

-1

31 of 39

Getting rid of a detection event by adding errors (2/3)

Z

X

LEGEND

X Stabilizer

Z Stabilizer

X Excitation

M

Measure Error

Z Excitation

M

Flipping previous measurement moves where the change was seen.�It moves the detection event.

+1

-1

-1

-1

32 of 39

Getting rid of a detection event by adding errors (3/3)

Z

X

LEGEND

X Stabilizer

Z Stabilizer

X Excitation

M

Measure Error

Z Excitation

M

First stabilizer measurement is random because of resets. Can't notice anything wrong, so no detection�event generated.

M

We locally absorbed an X excitation. This is an X boundary!

-1

-1

-1

-1

33 of 39

Transversal X resets introduce an X boundary in time

Stabilizer configurations

over time

Z

X

LEGEND

Y

H

Defect diagram

=

time

34 of 39

Example of a domain wall + twist in time

Z

X

LEGEND

Y

H

Stabilizer configurations

over time

Defect diagram

time

Ry row above Hadamards

35 of 39

X memory

experiment

Z memory

experiment

as stabilizer configurations

over time

as defect diagrams

36 of 39

X memory

experiment

Z memory

experiment

Showing all defects

Only showing Y defects

37 of 39

S gate as a series of stabilizer configurations

Input

Output

Grow

Y Defect Moves Across Patch

Shrink

Swaps

X Resets

Y Resets above Hadamards

X Measures

38 of 39

S gate as a defect diagram

=

(Cut out windows are to show interior. Actual defects have no windows)

39 of 39

S gate as braiding Y defects

Show all defects

X and Z defects hidden

in middle

Show Y Defects Only

S Gate = = exchange Y defects