liveBook · Manning

Magic gate

As explained in Quantum Programming in Depth

A magic gate is a fault-tolerant quantum operation that is not directly supported by a logical architecture and is implemented using magic states.

A magic gate is a fault-tolerant quantum operation unavailable directly from a logical architecture. Magic states supply these operations, extending the supported gate set so programs can approximate arbitrary gates. section 9.3 section 9.8

A typical magic-gate implementation involves:

  • Preparing rough approximations of magic states. section 9.3
  • Refining those states through magic state distillation. section 9.3
  • Using the distilled states with supported logical gates to construct the required operations. section 9.3

The T gate

The T gate is a standard magic gate: T = diag(1, e^{iπ/4}). Its matching magic state is |T⟩ = T|+⟩ = (|0⟩ + e^{iπ/4}|1⟩)/√2. Combined with simple architecture-supported gates, T enables arbitrarily precise approximations of any single-qubit gate. section 9.3

Magic state distillation runs alongside the main computation in a separate area and can become a major resource cost, depending on the program’s gate requirements. section 9.3 section 9.8

Figure 9.5 Physical qubits are noisy, they support a limited set of gates, and these gates are slow. We have to use error correction to enable reliable computation on noisy qubits. We also have to use a special process to implement arbitrary logical gates on logical qubits. These factors affect both the run time of algorithms on the quantum computers and the numbers of qubits required to run them.
figure

Physical-qubit noise, error correction, limited gate sets, and magic-gate construction jointly affect execution time and qubit requirements. section 9.8

How Quantum Programming in Depth covers it

How deep it goes
Defines magic gates, gives the T-gate equations, and outlines distillation without detailing its internal protocol.
Examples
Uses the T gate, its matching T state, arbitrary single-qubit-gate approximation, and parallel distillation as concrete examples.
What it assumes
Assumes logical gates and fault-tolerant computation, while briefly linking magic gates to error correction and noisy physical qubits.
What you can do after
Evaluate how unsupported gates and magic state distillation affect a fault-tolerant algorithm’s runtime and qubit requirements.
How it connects
Connects magic gates with logical qubits, error correction, magic state distillation, and fault-tolerant quantum computation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Quantum Programming in Depth. The section links point to the parts of the book it draws on.