7
$\begingroup$

I am having problems with this task.

Since the Hadamard gate rotates a state $180°$ about the $\hat{n} = \frac{\hat{x} + \hat{z}}{\sqrt{2}}$ axis, I imagine the solution can be found the following way:

First rotate $\hat{n}$ so it lies in the $z$-$y$ plane: $$R_z(\pi/2)$$ Then rotate $\hat{n}$ so it is parallell with the $z$-axis: $$R_x(\pi/4)$$ Now do the desired rotation about the $z$-axis: $$R_z(\pi)$$ Then rotate $\hat{n}$ back to its original position. The Hadamard gate can then be written: $$H = e^{i\lambda}R_z(-\pi/2)R_x(-\pi/4) R_z(\pi) R_x(\pi/4) R_z(\pi/2) $$ However, this doesn't seem to work. Can someone explain where my logic is flawed? Thank you very much

$\endgroup$
2
  • 1
    $\begingroup$ Check exercise 4.4 of this PDF. It should explain your concern. $\endgroup$
    – cnada
    Commented Jan 24, 2019 at 12:55
  • 1
    $\begingroup$ I think you are right but maybe when doing your calculations, you are not dividing by 2 the angles in the rotation matrix definition. $\endgroup$
    – cnada
    Commented Jan 25, 2019 at 10:44

3 Answers 3

5
$\begingroup$

Why do you say that it doesn't work? If I enter the following code into Mathematica, it works fine:

X = {{0, 1}, {1, 0}};
Z = {{1, 0}, {0, -1}};
FullSimplify[-I MatrixExp[-I Pi Z/4].MatrixExp[-I Pi X/8].MatrixExp[I Pi Z/2].MatrixExp[I Pi X/8].MatrixExp[I Pi Z/4]]

The only thing that I had to remember was to halve the angles compared to how you wrote them (because $R_Z(\pi)$ should give a $Z$ rotation, which is $e^{i\pi Z/2}$). That's the place that I always make the mistake with these calculations...

$\endgroup$
1
  • $\begingroup$ Thank you very much! Not sure where my mistake was, but I wrote down the matrices in wolframalpha. With python it worked fine! $\endgroup$
    – QCQCQC
    Commented Jan 27, 2019 at 22:02
3
$\begingroup$

As far as I can tell, it works fine. If I use the channel-state duality to view this sequence of operation's effect in Quirk's output display, it's the Hadamard gate's matrix:

It's a Hadamard

Maybe you're multiplying or dividing by 2 somewhere you shouldn't be, when performing the operations?

$\endgroup$
1
  • $\begingroup$ I am sure thats what i did wrong! Thank you very much $\endgroup$
    – QCQCQC
    Commented Jan 27, 2019 at 22:03
2
$\begingroup$

Check exercise 4.4 of this PDF. It should explain your concern.

I think you are right but maybe when doing your calculations, you are not dividing by 2 the angles in the rotation matrix definition.

$\endgroup$
1
  • $\begingroup$ Thank you for the answer. I have looked at that solution. Even though it solves the problem, it doesnt explain why my logic is flawed $\endgroup$
    – QCQCQC
    Commented Jan 24, 2019 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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