7

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

Sanchayan Dutta
  • 17,945
  • 8
  • 50
  • 112
QCQCQC
  • 449
  • 3
  • 10

3 Answers3

5

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

DaftWullie
  • 62,671
  • 4
  • 55
  • 140
3

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?

Craig Gidney
  • 44,299
  • 1
  • 41
  • 116
2

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.

cnada
  • 4,802
  • 1
  • 9
  • 22