# Doing maths with controlled-half NOTs

In Quantum Computation with the simplest maths possible there is a section titled "Doing maths with a controlled-half NOT" which covers a reversible-(N)AND circuit with controlled-half NOTs.

• What would the unitary matrix for a controlled-half NOT be?

• How could a reversible-XNOR gate be constructed with controlled-half NOTs?

This is the gate that I would call controlled-square-root-of-not. Bit more of a mouthful, I know, but perhaps conveys more accurately what it's doing. The point is that it's a unitary $U$ such that $U^2$ is the controlled-not. There are probably a few ways of writing down such a thing, but, for example $$U=\left(\begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & \frac{e^{i\pi/4}}{\sqrt{2}} & \frac{e^{-i\pi/4}}{\sqrt{2}} \\ 0 & 0 & \frac{e^{-i\pi/4}}{\sqrt{2}} & \frac{e^{i\pi/4}}{\sqrt{2}} \end{array}\right)$$

There's a trivial answer to your other questions. Take the normal circuits for each of these things built out of (n)and gates, and substitute the reversible (n)and circuits in their place. Of course, there may be optimisations to improve things slightly...

• It’s more that it’s really not worth anyone’s bother coming up with answers for you. (You ask a lot of questions which are essentially novel research questions, but researchers are busy doing their research, not yours. You need to do it, or at least be seen to have tried) I’ve given you one root to an answer (all classical gates can be decomposed in terms of nand, so now you can decompose them in terms of this gate). At first guess, writing those gates using cnot, and then replacing with two copies of the square root is probably the best. Jul 17, 2018 at 5:20
• What i’m Really saying is that either the strategies i’m Suggesting are (essentially) optimal, or it’s possible to get a quantum speedup, in which case that’s a huge result, not to be wasted here! Jul 17, 2018 at 6:08
• @user1271772 If I'm reading the blog article correctly, yes. I hadn't heard it called that either. Jul 17, 2018 at 14:17
• That’s very much a separate question. Perhaps if I ask it (give me a couple of hours) that will let me ask it so that I can give the answer I think you need rather than the answer you might think you want. You can always edit the question if it doesn’t serve your purpose. Jul 18, 2018 at 5:42
• @meowzz The n'th root of NOT is just a 360/n degree phase gate framed by Hadamard gates so that it rotates around the X axis instead of the Z axis. Jul 18, 2018 at 16:19