4
$\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$
  • 1
    $\begingroup$ Check exercise 4.4 of this PDF. It should explain your concern. $\endgroup$ – cnada Jan 24 '19 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 Jan 25 '19 at 10:44
3
$\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...

|improve this answer|||||
$\endgroup$
  • $\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 Jan 27 '19 at 22:02
2
$\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?

|improve this answer|||||
$\endgroup$
  • $\begingroup$ I am sure thats what i did wrong! Thank you very much $\endgroup$ – QCQCQC Jan 27 '19 at 22:03
1
$\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.

|improve this answer|||||
$\endgroup$
  • $\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 Jan 24 '19 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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