MagicStateFactory#

qualtran.surface_code.MagicStateFactory

Methods for modeling the costs of the magic state factories of a surface code compilation.

An important consideration for a surface code compilation is how to execute arbitrary gates to run the desired algorithm. The surface code can execute Clifford gates in a fault-tolerant manner. Non-Clifford gates like the T gate, Toffoli or CCZ gate, or non-Clifford rotation gates require more expensive gadgets to implement. Executing a T or CCZ gate requires first using the technique of state distillation in an area of the computation called a “magic state factory” to distill a noisy T or CCZ state into a “magic state” of sufficiently low error. Such quantum states can be used to enact the non-Clifford quantum gate through gate teleportation.

Magic state production is thought to be an important runtime and qubit-count bottleneck in foreseeable fault-tolerant quantum computers.

This abstract interface specifies that each magic state factory must report its required number of physical qubits, the number of error correction cycles to produce enough magic states to enact a given number of logical gates and an error model, and the expected error associated with generating those magic states.

Methods#

n_physical_qubits

View source

The number of physical qubits used by the magic state factory.

n_cycles

View source

The number of cycles (time) required to produce the requested number of magic states.

factory_error

View source

The total error expected from distilling magic states with a given physical error rate.

This includes the cumulative effects of data-processing errors and distillation failures.