# US 11,909,392 B2 · Magic state factory constructions for producing CCZ and T states

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,909,392 B2
- Document ID: US11909392B2
- Status: Granted
- Kind: B2
- Application number: 17/296,909
- Filed: 2019-11-27
- Published: 2022-01-27
- Granted: 2024-02-20
- Earliest claimed: 2018-11-29
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Craig Gidney; Austin Greig Fowler
- Web page: https://patentgrep.com/patent/US11909392B2

## CPC

- G06N 10/70: Quantum error correction, detection or prevention, e.g. surface codes or magic state distillation
- G06F 8/20: Software design
- G06F 11/004: {Error avoidance (G06F11/07 and subgroups take precedence)}
- G06N 10/00: Quantum computing, i.e. information processing based on quantum-mechanical phenomena
- G06N 10/20: Models of quantum computing, e.g. quantum circuits or universal quantum computers
- G06N 10/40: Physical realisations or architectures of quantum processors or components for manipulating qubits, e.g. qubit coupling or qubit control
- H03K 19/003: Modifications for increasing the reliability {for protection}
- H03M 13/033: {Theoretical methods to calculate these checking codes}
- H03M 13/2909: {Product codes}
- H03M 13/611: {Specific encoding aspects, e.g. encoding by means of decoding}
- G06F 2111/10: Numerical modelling
- G06F 2201/82: Solving problems relating to consistency
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H03K: PULSE TECHNIQUE (measuring pulse characteristics G01R; modulating sinusoidal oscillations with pulses H03C; transmission of digital information H04L; discriminator circuits detecting phase difference between two signals by counting or integrating cycles of oscillation H03D3/04; automatic control, starting, synchronisation or stabilisation of generators of electronic oscillations or pulses where the type of generator is irrelevant or unspecified H03L; coding, decoding or code conversion, in general H03M)
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

Methods, systems, and apparatus for producing CCZ states and T states. In one aspect, a method for distilling a CCZ state includes preparing multiple target qubits, ancilla qubits and stabilizer qubits in a zero state, performing an X gate for each stabilizer qubit on multiple ancilla qubits or multiple ancilla qubits and one of the target qubits using the stabilizer qubit as a control, measuring the stabilizer qubits, performing, on each of the ancilla qubits, a Z1/4 gate and a Hadamard gate, measuring each of the ancilla qubits, performing, conditioned on each measured ancilla qubit state, a NOT operation on a selected stabilizer qubit, or a NOT operation on the selected stabilizer qubit and a Z gate on one or more respective target qubits, performing, on each target qubit and conditioned on a measured state of a respective stabilizer qubit, a Z gate on the target qubit, and performing an X gate on each of the target qubits.

## Claims

### Claim 1

A method for distilling a CCZ state, the method comprising:
preparing a register of qubits in a zero state, the register comprising a plurality of target qubits, a plurality of ancilla qubits and a plurality of stabilizer qubits;
performing, for each stabilizer qubit, an X gate on i) multiple ancilla qubits, or ii) multiple ancilla qubits and one of the target qubits using the stabilizer qubit as a control;
measuring the stabilizer qubits to determine respective stabilizer qubit states;
performing, on each of the ancilla qubits, a Z1/4 quantum gate and a Hadamard quantum gate;
measuring each of the ancilla qubits to determine respective ancilla qubit states;
performing, conditioned on each determined ancilla qubit state, i) a NOT operation on a selected stabilizer qubit, or ii) a NOT operation on the selected stabilizer qubit and a Z gate on one or more respective target qubits;
performing, on each target qubit and conditioned on a determined state of a respective stabilizer qubit, a Z gate on the target qubit; and
performing an X gate on each of the target qubits to obtain the CCZ state.

### Claim 2 (depends on 1)

The method of claim 1, wherein the plurality of target qubits comprises three target qubits, the plurality of ancilla qubits comprises eight ancilla qubits and the plurality of stabilizer qubits comprises four stabilizer qubits.

### Claim 3 (depends on 2)

The method of claim 2, wherein performing, for each stabilizer qubit, an X gate on i) multiple ancilla qubits, or ii) multiple ancilla qubits and one of the target qubits using the stabilizer qubit as a control, and measuring the stabilizer qubits to determine respective stabilizer qubit states comprises performing a sequence of operations from a first set of operations, the first set of operations comprising:
performing an X gate on a first target qubit using a first stabilizer qubit as a control;
performing an X gate on a first, second, third and fourth ancilla qubit using the first stabilizer qubit as a control;
performing an X gate on the first, the second, the third, the fourth, a fifth, a sixth, a seventh and an eighth ancilla qubits using a second stabilizer qubit as a control;
performing an X gate on a third target qubit using a third stabilizer qubit as a control;
performing an X gate on the first, the second, the fifth and the seventh ancilla qubits using the third stabilizer qubit as a control;
performing an X gate on a second target qubit using a fourth stabilizer qubit as a control;
performing an X gate on the first, second, fifth and sixth ancilla qubits using the fourth stabilizer qubit as a control;
measuring the first stabilizer qubit;
measuring the second stabilizer qubit;
measuring the third stabilizer qubit; and
measuring the fourth stabilizer qubit.

### Claim 4 (depends on 2)

The method of claim 2, wherein performing, for each ancilla qubit and conditioned on a determined state of the respective ancilla qubit, i) a NOT operation on the second stabilizer qubit, or ii) a NOT operation on the second stabilizer qubit and a Z gate on one or more target qubits comprises performing a sequence of operations from a second set of operations, the second set of operations comprising:
performing, conditioned on the state of the first ancilla qubit, a Z gate on each of the three target qubits and a NOT operation on the second stabilizer qubit;
performing, conditioned on the state of the second ancilla qubit, a Z gate on the first and the second target qubits and a NOT operation on the second stabilizer qubit;
performing, conditioned on the state of the third ancilla qubit, a Z gate on the first and the third target qubits and a NOT operation on the second stabilizer qubit;
performing, conditioned on the state of the fourth ancilla qubit, a Z gate on the first target qubit and a NOT operation on the second stabilizer qubit;
performing, conditioned on the state of the fifth ancilla qubit, a Z gate on the second and the third target qubits and a NOT operation on the second stabilizer qubit;
performing, conditioned on the state of the sixth ancilla qubit, a Z gate on the second target qubit and a NOT operation on the second stabilizer qubit;
performing, conditioned on the state of the seventh ancilla qubit, a Z gate on the third target qubit and a NOT operation on the second stabilizer qubit; and
performing, conditioned on the state of the eighth ancilla qubit, a NOT operation on the second stabilizer qubit.

### Claim 5 (depends on 2)

The method of claim 2, wherein performing, for each target qubit and conditioned on a determined state of a stabilizer qubit, a Z gate on the target qubit comprises:
performing, conditioned on the state of the first stabilizer qubit, a Z gate on the first target qubit;
performing, conditioned on the state of the third stabilizer qubit, a Z gate on the third target qubit; and
performing, conditioned on the state of the fourth stabilizer qubit, a Z gate on the second target qubit.

### Claim 6 (depends on 1)

The method of claim 1, wherein performing, for each stabilizer qubit, an X gate on i) multiple ancilla qubits, or ii) multiple ancilla qubits and one of the target qubits using the stabilizer qubit as a control comprises using the stabilizer qubit as an X axis control by applying a Hadamard gate to the stabilizer qubit before and after the stabilizer qubit is used as a control.

### Claim 7 (depends on 1)

The method of claim 1, wherein measuring the stabilizer qubits comprises performing Pauli product measurements on the stabilizer qubits.

### Claim 8 (depends on 1)

The method of claim 1, the method further comprising performing a post selection operation, comprising:
determining whether an error occurred or not using a parity computation; and
in response to determining that an error occurred, discarding the obtained CCZ state.

### Claim 9 (depends on 8)

The method of claim 8, wherein the parity computation is performed on the selected stabilizer qubit.

### Claim 10 (depends on 8)

The method of claim 8, wherein using a post selection operation comprises implementing classical control software.

### Claim 11 (depends on 1)

The method of claim 1, wherein the method is implemented using lattice surgery techniques.

### Claim 12 (depends on 11)

The method of claim 11, wherein the method is implemented to distill a first CCZ state and the method further comprises concurrently distilling a second CCZ state by partially overlapping executions of operations corresponding to the distillation of the first CCZ state and the distillation of the second CCZ state.

### Claim 13 (depends on 12)

The method of claim 12, wherein executions of operations corresponding to distillation of the first CCZ state and distillation of the second CCZ state are reordered prior to the overlapping.

### Claim 14 (depends on 1)

The method of claim 1, further comprising providing the CCZ state for use in subsequent computations.

### Claim 15

A quantum computing device comprising:
a register of qubits comprising multiple target qubits, multiple ancilla qubits, and multiple stabilizer qubits each prepared in a respective initial state;
a plurality of control lines coupled to the register of qubits;
a plurality of control devices coupled to the plurality of control lines; and
one or more classical processors;
wherein the quantum computing device is configured to:
prepare a register of qubits in a zero state, the register comprising a plurality of target qubits, a plurality of ancilla qubits and a plurality of stabilizer qubits;
perform, for each stabilizer qubit, an X gate on i) multiple ancilla qubits, or ii) multiple ancilla qubits and one of the target qubits using the stabilizer qubit as a control;
measure the stabilizer qubits to determine respective stabilizer qubit states;
performing, on each of the ancilla qubits, a Z1/4 quantum gate and a Hadamard quantum gate;
measure each of the ancilla qubits to determine respective ancilla qubit states;
perform, conditioned on each determined ancilla qubit state, i) a NOT operation on a selected stabilizer qubit, or ii) a NOT operation on the selected stabilizer qubit and a Z gate on one or more respective target qubits;
perform, on each target qubit and conditioned on a determined state of a respective stabilizer qubit, a Z gate on the target qubit; and
perform an X gate on each of the target qubits to obtain the CCZ state.

### Claim 16 (depends on 15)

The quantum computing device of claim 15, wherein the quantum computing device comprises a CCZ state factory.

### Claim 17

A method for transforming a CCZ state into three output T states, the method comprising:
obtaining i) three target qubits prepared in a CCZ state, ii) a first ancilla qubit in a T state, iii) a multiple additional ancilla qubits prepared in a zero state, and iv) multiple stabilizer qubits prepared in a zero state;
performing an X gate on a target qubit and an additional ancilla qubit using a first stabilizer qubit as a control and measuring the first stabilizer qubit to determine a state of the first stabilizer qubit;
performing an X gate on multiple target qubits and an additional ancilla qubit using a second stabilizer qubit as a control and measuring the second stabilizer qubit to determine a state of the second stabilizer qubit;
performing a X1/2 gate on an additional ancilla qubit;
performing a Z gate on multiple target qubits and the first ancilla qubit using a third stabilizer qubit as a control;
performing a Hadamard gate on the first ancilla qubit and measuring the first ancilla qubit, an additional ancilla qubit and a third stabilizer qubit to determine respective qubit states;
performing a X1/2 gate on an additional ancilla qubit;
performing a Z gate on a target qubit and an additional ancilla qubit using a fourth stabilizer qubit as a control;
performing a Hadamard gate on an additional ancilla qubit and measuring the additional ancilla qubit and the fourth stabilizer qubit to determine respective qubit states;
performing a NOT operation on a stabilizer qubit using an additional ancilla qubit as a control, and two NOT operations on the additional ancilla qubit and the stabilizer qubit using a different stabilizer qubit as a control;
performing a Z gate on multiple target qubits and an additional ancilla qubit using two stabilizer qubits as a control;
performing a Hadamard gate on an additional ancilla qubit and measuring the additional ancilla qubit and a stabilizer qubit to determine respective qubit states; and
performing multiple classically controlled Pauli operators on the three target qubits conditioned on the determined states of the ancilla qubits.

### Claim 18 (depends on 17)

The method of claim 17, wherein the three target qubits comprise a first, second and third target qubit, the multiple additional ancilla qubits comprise a second, third and fourth ancilla qubit, and the multiple stabilizer qubits comprise a first, second, third, fourth and fifth stabilizer qubit.

### Claim 19 (depends on 18)

The method of claim 18, wherein performing an X gate on a target qubit and an additional ancilla qubit using a first stabilizer qubit as a control comprises:
performing an X gate on the third target qubit using the first stabilizer qubit as a control; and
performing an X gate on a third ancilla qubit using the first stabilizer qubit as a control.

### Claim 20 (depends on 19)

The method of claim 19, wherein performing a X1/2 gate on an additional ancilla qubit comprises performing a X1/2 gate on the third ancilla qubit.
