GSJ24Factory Class

Implements the magic state cultivation factory from Gidney, Shutty, and Jones (2024) for producing logical >>|<<T⟩ states from physical-level operations.

Magic state cultivation gradually grows the size and reliability of a magic state within a surface code patch, using roughly the same number of physical gates as a lattice surgery CNOT gate of equivalent reliability. The approach refines ideas from Knill (1996), Jones (2016), Chamberland (2020), Gidney (2023/2024), Bombin (2024), and Hirano (2024).

Compared to prior magic state distillation approaches, cultivation uses an order of magnitude fewer qubit-rounds to reach logical error rates as low as 2·10⁻⁹ under 10⁻³ uniform depolarizing circuit noise. Halving the circuit noise to 5·10⁻⁴ improves the achievable logical error rate to 4·10⁻¹¹.

The factory is parameterized by pre-computed simulation data (from Monte Carlo sampling at https://doi.org/10.5281/zenodo.13777072) that maps physical error rates to (logical_error, num_qubits, volume, steps) tuples for supported distance pairs.

Hyper parameters: distance: Tuple (d_color, d_surface) specifying the color code distance and surface code distance used in the cultivation protocol. Supported values are (3, 15) and (5, 15). Larger color code distance (5 vs 3) yields lower logical error rates at the cost of higher qubit count and more time steps.

Reference:

Constructor

GSJ24Factory(syndrome_extraction_depth: int = 4, passthrough: bool = False, *, distance: tuple[int, int] = (3, 15))

Parameters

Name Description
syndrome_extraction_depth
Default value: 4
passthrough
Default value: False

Keyword-Only Parameters

Name Description
distance
Default value: (3, 15)

Methods

provided_isa
required_isa

provided_isa

provided_isa(impl_isa: ISA, ctx: ISAContext) -> Generator[ISA, None, None]

Parameters

Name Description
impl_isa
Required
ctx
Required

required_isa

static required_isa() -> ISARequirements

Attributes

syndrome_extraction_depth

Number of surface code cycles needed per syndrome extraction round. Defaults to 4.

syndrome_extraction_depth: int = 4

passthrough

If True, the output ISA includes the input (physical) ISA instructions alongside the produced logical T states. If False (default), only the logical T states are provided.

passthrough: bool = False

distance

distance: tuple[int, int] = (3, 15)