9 votes
Accepted

Definition of magic $T$ and $H$ states: are there different definitions for them?

Magic state names are not consistent across papers. For example, the state used to perform T gates via gate teleportation, equal to $\frac{1}{\sqrt{2}}\left(|0\rangle + e^{i \pi/4}|1\rangle\right)$ up ...
Craig Gidney's user avatar
  • 36.7k
9 votes

Why are there eight $T$ magic state and twelve $H$ magic states?

It becomes very simple when you look at it in the Bloch representation (Figure by me. Ref: Robustness of Magic and Symmetries of the Stabiliser Polytope) The depicted octahedron is the polytope ...
Markus Heinrich's user avatar
7 votes

Magic state distillation: why is it harder to prepare the encoded $|A_{\pi/4}\rangle$ than $|0 \rangle$

The point is the logical $|0\rangle$ and $|+\rangle$ are (relatively) easy to prepare. You start with any bunch of qubits, it doesn't matter what state. You simply measure the stabilizers of the code ...
DaftWullie's user avatar
  • 57.9k
7 votes
Accepted

Why are there eight $T$ magic state and twelve $H$ magic states?

Your reasoning is in the correct direction, but realize that $C_{1}$ permutes the $3$ Paulis, and adds a $\pm 1$ on any of the Paulis. See for instance Table 1 on page 20 of Entanglement in ...
JSdJ's user avatar
  • 5,449
6 votes
Accepted

Universal Gate Set, Magic States, and costliness of the T gate

The T state $Z^{1/4}|+\rangle$ has four core advantages over most other states: You can physically inject T states at pretty high fidelity. It has a reasonably cheap distillation circuit, as far as ...
Craig Gidney's user avatar
  • 36.7k
5 votes
Accepted

How do magic states circumvent the Eastin-Knill theorem?

The important distinction here is not between Clifford and non-Clifford. It's between transversal and non-transversal. The Eastin-Knill theorem simply says that you cannot create a universal set of ...
DaftWullie's user avatar
  • 57.9k
5 votes

Clifford+T synthesis with imperfect T gates

If your T gates aren't perfect, then you will need to do state distillation to make them good enough that the error you accumulate from using $N$ of them is less than the error you incur from ...
Craig Gidney's user avatar
  • 36.7k
5 votes
Accepted

Is the plus state a magic state for the Hadamard gate?

Start with a state $|\psi\rangle|+\rangle$. Measure the operator $X_1Z_2$ using either lattice surgery or an ancilla qubit and $CZ,CX$ gates. Call this result $m_{xz}$ Then measure the first qubit in ...
Jahan Claes's user avatar
5 votes
Accepted

Good references to learn magic state distillation for fault tolerance

Disclaimer: these links do not all fit the criterion recent. First and foremost, it is important to realize that there is no 'one' magic state, and no 'one' magic state distillation. The term 'magic ...
JSdJ's user avatar
  • 5,449
4 votes

Magic state distillation: why is it harder to prepare the encoded $|A_{\pi/4}\rangle$ than $|0 \rangle$

To prepare $|0_L\rangle$ in a CSS code, all you have to do is separately initialize all the data qubits into $|0\rangle$ and then start measuring the stabilizers of the code. The reason this works is ...
Craig Gidney's user avatar
  • 36.7k
4 votes

Why do magic state consumption circuits work?

First, note that you can phase a qubit by preparing an ancilla equal to it and phasing the ancilla: You can pick $\theta=1/4$ to get a T gate. And because the bottom qubit is being discarded, you can ...
Craig Gidney's user avatar
  • 36.7k
4 votes
Accepted

Is it possible to implement the controlled-S gate, such that the inner gate between the CNOTs belongs to the Clifford?

TL;DR: After sending $D$ across the equals sign, the right hand side is similar to a controlled Pauli operator and the left hand side is a diagonal operator. Their spectra turn out to be incompatible, ...
Adam Zalcman's user avatar
  • 22.3k
4 votes

Magic state distillation of physical vs logical qubit

You would distill at the physical level whenever the fidelity of the output state is lower than the fidelity of your physical operations and storage. For magic states, my guess is you would never do ...
Craig Gidney's user avatar
  • 36.7k
3 votes
Accepted

Does the preparation of magic states need magic gates?

An example of universal quantum computation scheme using magic states can be found in this paper. What is shown there is that if you have access to several copies of noisy magic states, you can purify ...
AG47's user avatar
  • 439
3 votes

Which single-qubit mixed states work for magic state distillation?

I've not kept sufficiently up to date with the most recent literature, however, here are some partial results: Along certain axes of the Bloch sphere, the divide between the octahedron and the ...
DaftWullie's user avatar
  • 57.9k
3 votes

Getting intuition on the state-injection relations for the generalized $\exp(-iP \pi/8)$ $T$-gates (ideally using ZX calculus)

TL;DR: The key idea that helps to translate these circuits into ZX diagrams is the interpretation of two strongly complementary spiders as the copy and parity operations$^1$. As expected, the ZX ...
Adam Zalcman's user avatar
  • 22.3k
3 votes
Accepted

How can sub-logarithmic magic state distillation be possible?

I forgot to consider the fact that $\gamma$ can be reduced by increasing the number of outputs. The number of inputs does have to be at least $\Omega(\log \frac{1}{\epsilon})$, but the number of ...
Craig Gidney's user avatar
  • 36.7k
3 votes

Universal Gate Set, Magic States, and costliness of the T gate

Imagine you're interested in implementing a gate $$ P_k=\left(\begin{array}{cc} 1 & 0 \\ 0 & e^{i\pi/2^k} \end{array}\right), $$ so $Z=P_0$, $S=P_1$ and $T=P_2$. Now imagine that you're going ...
DaftWullie's user avatar
  • 57.9k
3 votes
Accepted

Magic state distillation with the $15$ qubit code. How are the transversal $T$ performed? Also via a (lower level) state injection?

You start with physically injected magic states, expanded into $C_1$. In the case of the surface code you could use e.g. Li injection. The error rate of this part is extremely important, as it limits ...
Craig Gidney's user avatar
  • 36.7k
3 votes
Accepted

Magic state distillation with the 15 qubit code. Why is the failure $O(p^2)$ if we include $|+_L\rangle$ preparation and decoding?

Here, I assumed that steps 1. and 3. are perfect. In practice, they will not be. Encoding and decoding are protected by C1 (the code that doesn't support a T gate). So encoding and decoding are as ...
Craig Gidney's user avatar
  • 36.7k
3 votes
Accepted

Given a $|W_8\rangle$, perform a CCCZ using stabilizer operations

It's possible to perform a CCCZ by consuming a $|W_{8}\rangle$ state. The key idea is to use the state $\text{AND}_{1,2} \cdot \text{AND}_{1,3} \cdot \text{AND}_{2,3} \cdot \text{AND}_{1,2,3} \cdot |+\...
Craig Gidney's user avatar
  • 36.7k
2 votes

Pros/cons of the different schemes to have complete fault-tolerant gatesets

Magic state distillation is the most popular because it is (as of yet) the most efficient. Also, magic state distillation fuels gate teleportation, so I wouldn't say it's used instead of gate ...
Craig Gidney's user avatar
  • 36.7k
2 votes
Accepted

How to you initialize a qubit into a magic state in IBM Quantum composer

First, use a Hadamard gate to create the superposition $$\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$$ If you write down what you want next, you will find that you need to act with the unitary gate with ...
Giorgos Giapitzakis's user avatar
2 votes

Is the plus state a magic state for the Hadamard gate?

The above circuit shows how to inject a Hadamard gate by means of a magic state $|+\rangle$ and an Ising gate.
Daniele Cuomo's user avatar
1 vote

Does the preparation of magic states need magic gates?

Yes, preparing a non-Clifford state (a "magic state") requires a non-Clifford gate (a "magic gate"). I've not heard the term "magic gate" before so it's possible that you ...
Craig Gidney's user avatar
  • 36.7k
1 vote

Universal Gate Set, Magic States, and costliness of the T gate

To shorten Craig's answer, T is a single qubit gate, diagonal in the Z basis, and still a relatively simple, easy-to-understand rotation. H for example is not a rotation. For your last question - the ...
Yaron Jarach's user avatar
1 vote
Accepted

Intuition behind observable rotations during magic state injection

One way to rotate a multi-term observable is to temporarily xor each of the terms onto an ancilla qubit, and phase the ancilla qubit, like this: If that ZZ term is one of the observables of a logical ...
Craig Gidney's user avatar
  • 36.7k
1 vote
Accepted

Which phase gates can be catalyzed by Clifford+Toffoli circuits with post-selection?

This has a lot to do with work that my colleagues and I presented at QIP in 2022, with the first of this series of papers now available on arXiv. In particular, in the linked paper we show that a ...
AndrewGlaudell's user avatar
1 vote
Accepted

Scaling of magic state distillation with single & two-qubit gate error

The physical gate error rates determine the initial magic state fidelity you are starting from, and how big of a code distance you need for the factories as you boost the fidelity. The initial ...
Craig Gidney's user avatar
  • 36.7k
1 vote
Accepted

Universal quantum computation by Clifford gates plus magic state

From Sec. V on in the Bravyi-Kitaev paper, it is all about noise - in particular magic state distillation, which is the process of distilling the magic state from many copies of some noisy state $\rho$...
Markus Heinrich's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible