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

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).

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.