New answers tagged

2

I was pointed to this very nice paper On the CNOT-cost of TOFFOLI gates . The issue appears to be much more complicated than I thought. Apparently there are theses yet to be written on the decomposition of Toffoli into $CNOT$s. First, due to identity $HXH=Z$ decompositions into $CNOT$s and $CZ$s can be translated into each others. Similarly, decomposing $n$-...


1

In general (except from very specific angles), you cannot make $U_1$ or $\phi$ from rotation gates $R_x,R_y,R_z$, nor from $H$ or $Z$ as these gates have determinant $\pm1$, and $U_1(2\lambda)$ and $\phi(\lambda)$ have determinant $e^{2i\lambda}$ . $\mathrm{SWAP}$ can be easily made from three $\mathrm{CNOT}$s, try it yourself.


3

As detailed in The simplified Toffoli gate implementation by Margolus is optimal, a construction of the simplified Toffoli (which introduces for some relative phase) cannot be constructed with fewer than $3$ controlled-not operations. Also mentioned in that paper, it is conjectured that the Toffoli gate cannot be implemented with less than six controlled-...


3

You can decompose the T gates themselves to create a Toffoli Gate. Here is one way of doing this:- You can refer to this Qiskit chapter if you are interested and want to understand gate decomposition: https://qiskit.org/textbook/ch-gates/more-circuit-identities.html


3

The answer by Bertrand Einstein IV is the correct answer to the question as asked - if you only have single-qubit rotations and no entangling gate, you cannot create an entangling gate. However, we can use the single qubit gates $R_X$ and $R_Y$ to create a $T$ gate and a Hadamard. These, combined with controlled-not give a standard construction for Toffoli. ...


3

$T$ gate is defined as $$ T= \begin{pmatrix} 1 & 0 \\ 0 & \mathrm{e}^{i\frac{\pi}{4}} \end{pmatrix}, $$ and $Rz(\theta)$ is $$ Rz(\theta)= \begin{pmatrix} \mathrm{e}^{-i\frac{\theta}{2}} & 0 \\ 0 & \mathrm{e}^{i\frac{\theta}{2}} \end{pmatrix} $$ If we factor out $\mathrm{e}^{-i\frac{\theta}{2}}$ we get $$ \mathrm{e}^{-i\frac{\theta}{2}} \...


6

The $T$ gate as well as all possible single qubit rotations are non-entangling operations. That means if we have a circuit composed of single bit rotations, any non-entangled $n$-bit input, it will result in a $n$-bit non-entangled output. The $CCNOT$ gate however is of course entangling, really all controlled gates are entangling, which means there exist ...


Top 50 recent answers are included