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

I am a bit confused by the definition of magic $$T$$ and $$H$$ states and I would like to check if their name is actually not uniformously spread in the litterature (or if I am not understanding something).

In the original paper about them, they are defined as:

$$|T\rangle \langle T | = \frac{1}{2}(I+\frac{1}{\sqrt{3}}(\sigma_x+\sigma_y+\sigma_z))$$ $$|H\rangle \langle H | = \frac{1}{2}(I+\frac{1}{\sqrt{2}}(\sigma_x+\sigma_z))$$

With the $$H$$ magic state we can implement the so called $$T$$ gate:

$$T \equiv diag(1,e^{i \pi/4})$$

From my current basic understanding, we cannot implement this same gate "directly" with the $$T$$ magic state.

However in various refs, such as this one, they say that they implement this gate with the $$T$$ magic state. Furthermore, their definition of $$T$$ magic state doesn't match the one of the original ref.

My question is thus: is there in the end a confusion of definition between different sources? Or I am not getting something.

: To clarify my misunderstanding. I know that there are many $$T$$ type magic states and many $$H$$ type magic states. The set of $$T$$ type magic states is deduced from one $$T$$ magic state on which we apply any single qubit Clifford operation (same for $$H$$).

I would be fine with a paper that calls a $$T$$ magic state any state in the class of the $$T$$ magic states. What confuses me is that it seems from my understanding that what is called $$T$$ magic state in one ref correspond to an $$H$$ magic state in another ref. And I find this much more weird, which is why I am wondering if I am not missing a point. To make an analogy it is like if one paper a Hadamard and a Pauli gate was called "Hadamard" and "Pauli" and in another one they would invert the definitions by calling Pauli what is Hadamard and Hadamard what is Pauli...

To answer one of the comment, the state being $$T|+\rangle$$ appears to be an $$H$$ type magic state according to this paper (rotation of the $$|+\rangle$$ by an angle $$\pi/4$$ gives a blue dot corresponding to $$H$$ type magic).

In conclusion: is it that even the full sets of $$H$$ and $$T$$ magic state are exchanged in litterature?

• I've always seen the T state defined as T|+>, the state used to perform a T gate via gate teleportation. Sep 12 at 20:36
• @CraigGidney apart if there is a stupid mistake from my side, this is not equivalent to its definition in eq (4) of the original ref. Maybe I am missing something obvious but I feel like the community uses different definitions in different papers? Sep 12 at 21:09
• No you're right it's a different definition. I'm saying you can't just say "T state" and be understood. There are different definitions around. Sep 13 at 0:21
• It's related to your previous question: There are different defintiions, and they are all equivalent up to a Clifford unitary ... The one for magic state distillation is usually $T|+\rangle$, if you use the one you gave, you have to apply an addiitional Clifford gate in the injection gadget. Sep 13 at 5:47
• @StarBucK The magic state needed for the $T$ gate is of $H$-type, indeed (sorry my comment was badly formulated). The point is: the original Bravyi-Kitaev convention of H/T states is not used that often anymore. Most papers now use $|V\rangle := V|+\rangle$ to denote magic states (for diagonal gates $V$ in the 3rd level of the Clifford hierarchy), and this isn't compatible with the original one! The "old" T state is now sometimes called $|F\rangle$ (for facet, cp. quantumcomputing.stackexchange.com/questions/21113/…) Sep 13 at 14:12

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 to single qubit Cliffords, has been called:
Personally I like $$|T\rangle$$ state, because I often work with trying to implement particular gates and so it makes sense for me to label based on the intention. Also, although there is a nice common operation that has the $$T$$-performing state as its eigenvalue (namely $$H$$), AFAIK the same is not true of other gates I want to do such as the $$CS$$ gate and the $$CCZ$$ gate, which basically means there's no good alternative to calling their states $$|CS\rangle$$ and $$|CCZ\rangle$$ and this forces the naming convention.