7

The QISKIT documentation doesn't explain what a TDG gate does and I can't find it anywhere else online.

Sanchayan Dutta
  • 17,497
  • 7
  • 48
  • 110

1 Answers1

8

According to the QISKit documentation, tdg(q) applies the Tdg gate to a qubit.

$T$ is the basically the $\pi/8$ phase shift gate whose matrix representation considering standard (computational) basis is:

$$\left(\begin{matrix}1 & 0 \\ 0 & e^{i\pi/4}\end{matrix}\right)$$

Tdg is simply the conjugate transpose of the matrix $T$ i.e. $T^{\dagger}$, which is:

$$\left(\begin{matrix}1 & 0 \\ 0 & e^{-i\pi/4}\end{matrix}\right)$$

Thus, the $T$ gate would map the basis vectors (of a qubit) $|0\rangle$ to $|0\rangle$ itself and $|1\rangle$ to $e^{i\pi/4}|1\rangle$, whereas $T^{\dagger}$ would map $|0\rangle$ to $|0\rangle$ itself and $|1\rangle$ to $e^{-i\pi/4}|1\rangle$.

P.S: In case you're wondering what dg means in tdg, it is simply an abbreviation for "dagger" i.e. in the sense of $T^{\dagger}$ (pronounced as $T$ - dagger).

Sanchayan Dutta
  • 17,497
  • 7
  • 48
  • 110
  • No answers since July, Blue? – John Duffield Oct 12 '18 at 17:15
  • @John Yeah, I was kinda busy with university work in the past few months. I'm also focusing a bit more on theoretical computer science rather than quantum computing these days. I will perhaps resume answering when my vacations begin. Have a good day/night. – Sanchayan Dutta Oct 12 '18 at 17:26