Advantange of Hadamard gate over rotation about the X axis for creating superpositions

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
5
down vote

favorite
2












When I look at most circuits (admittedly small sample as I'm a beginner), the Hadamard gate is used a lot to prepare a superposition from say the $mid0rangle$ state.

But upon a little reflection, we can prepare a superposition using a $dfracpi2$ rotation about the X axis.



I do know that a successive application of the Hadamard gate yields the initial state back (for any state).

If we have one of $mid0rangle$ or $mid1rangle$, we can recover them using a succession of said rotation followed by a NOT gate (Pauli-X).



So why is the Hadamard gate preferred to create superpositions when it uses more gates (rotation about Z then rotation about X then rotation about Z again)?

If it is because the Hadamard gate allows recovery of any initial state, why is that property so important? (Even when not actually used when I look at the examples I see.)







share|improve this question

















  • 1




    Why are you talking about $pi/2$ rotations about the $X$ basis? What you want is a $pi/2$ rotation about the $Y$ axis, which indeed acts almost like a Hadamard, as it also maps between X and Z eigenstates.
    – Norbert Schuch
    Aug 6 at 9:53











  • @NorbertSchuch Thank you. I just checked and it you are right. Do you mind writing an answer where you talk about the comparison between Hadamard and $fracpi2$ rotation about $Y$?
    – Ntwali B.
    Aug 6 at 14:52











  • I don't see how this would make sense. On the one hand, this is not the question. On the other hand, take the answer of DaftWullie and strip the part about $sqrtX$ not being real, and you probably get what I would write.
    – Norbert Schuch
    Aug 6 at 22:18
















up vote
5
down vote

favorite
2












When I look at most circuits (admittedly small sample as I'm a beginner), the Hadamard gate is used a lot to prepare a superposition from say the $mid0rangle$ state.

But upon a little reflection, we can prepare a superposition using a $dfracpi2$ rotation about the X axis.



I do know that a successive application of the Hadamard gate yields the initial state back (for any state).

If we have one of $mid0rangle$ or $mid1rangle$, we can recover them using a succession of said rotation followed by a NOT gate (Pauli-X).



So why is the Hadamard gate preferred to create superpositions when it uses more gates (rotation about Z then rotation about X then rotation about Z again)?

If it is because the Hadamard gate allows recovery of any initial state, why is that property so important? (Even when not actually used when I look at the examples I see.)







share|improve this question

















  • 1




    Why are you talking about $pi/2$ rotations about the $X$ basis? What you want is a $pi/2$ rotation about the $Y$ axis, which indeed acts almost like a Hadamard, as it also maps between X and Z eigenstates.
    – Norbert Schuch
    Aug 6 at 9:53











  • @NorbertSchuch Thank you. I just checked and it you are right. Do you mind writing an answer where you talk about the comparison between Hadamard and $fracpi2$ rotation about $Y$?
    – Ntwali B.
    Aug 6 at 14:52











  • I don't see how this would make sense. On the one hand, this is not the question. On the other hand, take the answer of DaftWullie and strip the part about $sqrtX$ not being real, and you probably get what I would write.
    – Norbert Schuch
    Aug 6 at 22:18












up vote
5
down vote

favorite
2









up vote
5
down vote

favorite
2






2





When I look at most circuits (admittedly small sample as I'm a beginner), the Hadamard gate is used a lot to prepare a superposition from say the $mid0rangle$ state.

But upon a little reflection, we can prepare a superposition using a $dfracpi2$ rotation about the X axis.



I do know that a successive application of the Hadamard gate yields the initial state back (for any state).

If we have one of $mid0rangle$ or $mid1rangle$, we can recover them using a succession of said rotation followed by a NOT gate (Pauli-X).



So why is the Hadamard gate preferred to create superpositions when it uses more gates (rotation about Z then rotation about X then rotation about Z again)?

If it is because the Hadamard gate allows recovery of any initial state, why is that property so important? (Even when not actually used when I look at the examples I see.)







share|improve this question













When I look at most circuits (admittedly small sample as I'm a beginner), the Hadamard gate is used a lot to prepare a superposition from say the $mid0rangle$ state.

But upon a little reflection, we can prepare a superposition using a $dfracpi2$ rotation about the X axis.



I do know that a successive application of the Hadamard gate yields the initial state back (for any state).

If we have one of $mid0rangle$ or $mid1rangle$, we can recover them using a succession of said rotation followed by a NOT gate (Pauli-X).



So why is the Hadamard gate preferred to create superpositions when it uses more gates (rotation about Z then rotation about X then rotation about Z again)?

If it is because the Hadamard gate allows recovery of any initial state, why is that property so important? (Even when not actually used when I look at the examples I see.)









share|improve this question












share|improve this question




share|improve this question








edited Aug 6 at 20:51
























asked Aug 6 at 6:15









Ntwali B.

795




795







  • 1




    Why are you talking about $pi/2$ rotations about the $X$ basis? What you want is a $pi/2$ rotation about the $Y$ axis, which indeed acts almost like a Hadamard, as it also maps between X and Z eigenstates.
    – Norbert Schuch
    Aug 6 at 9:53











  • @NorbertSchuch Thank you. I just checked and it you are right. Do you mind writing an answer where you talk about the comparison between Hadamard and $fracpi2$ rotation about $Y$?
    – Ntwali B.
    Aug 6 at 14:52











  • I don't see how this would make sense. On the one hand, this is not the question. On the other hand, take the answer of DaftWullie and strip the part about $sqrtX$ not being real, and you probably get what I would write.
    – Norbert Schuch
    Aug 6 at 22:18












  • 1




    Why are you talking about $pi/2$ rotations about the $X$ basis? What you want is a $pi/2$ rotation about the $Y$ axis, which indeed acts almost like a Hadamard, as it also maps between X and Z eigenstates.
    – Norbert Schuch
    Aug 6 at 9:53











  • @NorbertSchuch Thank you. I just checked and it you are right. Do you mind writing an answer where you talk about the comparison between Hadamard and $fracpi2$ rotation about $Y$?
    – Ntwali B.
    Aug 6 at 14:52











  • I don't see how this would make sense. On the one hand, this is not the question. On the other hand, take the answer of DaftWullie and strip the part about $sqrtX$ not being real, and you probably get what I would write.
    – Norbert Schuch
    Aug 6 at 22:18







1




1




Why are you talking about $pi/2$ rotations about the $X$ basis? What you want is a $pi/2$ rotation about the $Y$ axis, which indeed acts almost like a Hadamard, as it also maps between X and Z eigenstates.
– Norbert Schuch
Aug 6 at 9:53





Why are you talking about $pi/2$ rotations about the $X$ basis? What you want is a $pi/2$ rotation about the $Y$ axis, which indeed acts almost like a Hadamard, as it also maps between X and Z eigenstates.
– Norbert Schuch
Aug 6 at 9:53













@NorbertSchuch Thank you. I just checked and it you are right. Do you mind writing an answer where you talk about the comparison between Hadamard and $fracpi2$ rotation about $Y$?
– Ntwali B.
Aug 6 at 14:52





@NorbertSchuch Thank you. I just checked and it you are right. Do you mind writing an answer where you talk about the comparison between Hadamard and $fracpi2$ rotation about $Y$?
– Ntwali B.
Aug 6 at 14:52













I don't see how this would make sense. On the one hand, this is not the question. On the other hand, take the answer of DaftWullie and strip the part about $sqrtX$ not being real, and you probably get what I would write.
– Norbert Schuch
Aug 6 at 22:18




I don't see how this would make sense. On the one hand, this is not the question. On the other hand, take the answer of DaftWullie and strip the part about $sqrtX$ not being real, and you probably get what I would write.
– Norbert Schuch
Aug 6 at 22:18










3 Answers
3






active

oldest

votes

















up vote
4
down vote



accepted










It's mostly about simplicity and adopted convention. In the end, this is basically the same question as "why should I pick a universal set of gates A rather than a universal set B?" (see here). Experimentalists would pick the universal set they have available. Theorists just pick something that they like to work with, and eventually a convention is adopted. But it doesn't matter which convention they adopt because any universal set is easily converted into any other universal set, and it is (or should be) understood that the quantum circuits describing algorithms are not what you actually want to run on a quantum computer: you need to recompile them for the available gate set and optimise based on the available architecture (and this process is unique to each architecture).



You could use operations such as $sqrtX$, but they are a little bit more fiddly because of all the imaginary numbers that appear. Or there's $sqrtY$ which gives an even more direct comparison to $H$, avoiding imaginary numbers.



One of the main purposes of $H$ in a quantum circuit is to prepare uniform superpositions: $H|0rangle=(|0rangle+|1rangle)/sqrt2$. But $sqrtY$ also does this: $sqrtY|1rangle=(|0rangle+|1rangle)/sqrt2$. When you start combining multiple Hadamards on unknown input states (i.e. the Hadamard transform), it has a particularly convenient structure
$$
H^otimes n=frac1sqrt2^nsum_x,yin0,1^n(-1)^xcdot y|xranglelangle y|.
$$



The Hadamard gives you some very nice inter-relations (reflecting basis changes between pairs of mutually unbiased bases),
$$
HZH=Xqquad HXH=Z qquad HYH=-Y.
$$
It also enables relations between controlled-not and controlled phase, and between controlled-not in two different directions (swapping control and target). There are similar relations for $sqrtY$:
$$
sqrtYZsqrtY^dagger=YZ=iX qquad sqrtYXsqrtY^dagger=YX=-iZqquad sqrtYYsqrtY^dagger=Y
$$
Part of this looking (slightly) nicer is because, as stated in the question, $H^2=mathbbI$.



One way that many courses introduce the basic idea of quantum computation, and interference, is to use the Mach-Zehnder interferometer. This consists of two beam splitters which, mathematically, should be described by $sqrtX$ (or $sqrtY$ would do). Indeed, this is important for a first demonstration because of course these operations are "square root of not", which you can prove is logically impossible classically. However, once that initial introduction is over, theorists will often substitute the beam splitter operation for Hadamard, just because it makes everything slightly easier.






share|improve this answer























  • I see. And coming from computer science, I'm always looking at what is optimal ($i.e.$ minimum number of gates) so I was wondering what the hell are physicists are up to. Thanks for your answer.
    – Ntwali B.
    Aug 6 at 7:19










  • @DaftWullie It would be more fair to compare to $sqrtY$, which is real and accomplishes the same effect as $H$ on the computational basis. (I agree that's not what the OP asked.)
    – Norbert Schuch
    Aug 6 at 9:35






  • 1




    @NorbertSchuch I considered that while writing the answer, but was concerned that it only confused the issue more because there's even less to pick between them.
    – DaftWullie
    Aug 6 at 9:54










  • Fair point. But then again, the case where there's least to pick between them is where the "real" differences between pi/2 rotations and Hadamard become most clear.
    – Norbert Schuch
    Aug 6 at 10:07










  • more than the imaginary numbers in the matrix, I would argue that what is nice about $H$ is the simplicity of its spectrum. $H$ is the gate that switches between the eigenbases of $Z$ and $X$. The matrix that does the same between, say, $X$ and $Y$, contains imaginary numbers but arguably works exactly the same, provided we use eigenbases of $X$ and $Y$ as "standard" instead of those of $Z$ and $X$ as it's commonly done. In other words, what is "simple" about $H$ (or one thing that is) is the fact that it represents a change of basis between two mutually unbiased bases.
    – glS
    Aug 6 at 10:07

















up vote
3
down vote













Any Hermitian quantum gate $U$ is "self-recovering". This is because $U$ is unitary, and
$$UU^dagger=U^daggerU=I$$
If $U$ is also Hermitian, then $U=U^dagger$ and
$$UU=I$$



Hadamard gate prepares $frac1sqrt2(|0rangle + |1rangle)$ superposition from $|0rangle$ state. If you need this superposition, you use Hadamard. If you need a different superposition, $alpha|0rangle + beta|1rangle$ with some $alpha$ and $beta$, you need a different gate or a sequence of gates; Hadamard gate has no advantage here.






share|improve this answer























  • You certainly answer the question and thanks for that. Though would you mind elaborating why one would specifically need $frac1sqrt2(|0rangle + |1rangle)$ over say $frac1sqrt2(|0rangle - i |1rangle)$? I believe elaborating on that will shed more light to aid my understanding.
    – Ntwali B.
    Aug 6 at 7:12










  • @NtwaliB. Suppose you need just a superposition with 50% chances being $|0rangle$ and 50% chances being $|1rangle$; both $frac1sqrt2(|0rangle + |1rangle)$ and $frac1sqrt2(|0rangle - i |1rangle)$ are equally good for you, but what would you choose?
    – kludg
    Aug 6 at 7:19










  • I would choose the one that makes the computer do the least amount of work. If a Hadamard gate is implemented in terms of rotations, I will use a rotation about X as it saves me the use of two additional gates. If Hadamard is a native gate, I will use Hadamard since most people are used to it. Note: Hadamard generates $frac1sqrt2(|0rangle + |1rangle)$ while $R_x(fracpi2)$ generates $frac1sqrt2(|0rangle - i|1rangle)$
    – Ntwali B.
    Aug 6 at 7:24







  • 1




    @kludg Why would $U=U^dagger$ for real $U$?? This is completely wrong. Try e.g. [1 -1;1 1] (normalized) - a pi/2 rotation about Y - which doesn't square to the identity. (Indeed, a Y rotation by pi/2 prepares the same superpositions as H starting from the computational basis.)
    – Norbert Schuch
    Aug 6 at 9:31







  • 1




    @kludg this is not true as written. Did you mean to write hermitian instead of real?
    – glS
    Aug 6 at 9:32

















up vote
3
down vote













I think the major advantages of the Hadamard gate are "usability" stuff, as opposed to fundamental mathematical stuff. It's just easier to remember and simpler to apply.



  1. The Hadamard gate's marix is real and symmetric. Makes it easy to remember.

  2. Hadamard is its own inverse. Makes it easy to optimize in circuits. Any two Hs that meet cancel out; whereas $sqrtX$ tends to meet $sqrtX$ as often as $sqrtX^-1$ leaving behind $X$ operations.

  3. Hadamard's effect on operators is easy to remember: swap X for Z. Whereas for $sqrtX$ style operations you need to remember a right hand rule. If you pass a hadamard over a CZ, it turns into a CNOT. If you pass a $sqrtY$ over a CZ, whether you get a CNOT or a CNOT+Z depends on whether you went left-to-right or right-to-left.

  4. In the surface code you need twist defects or distilled states to do $sqrtX$ gates. Hadamard operations need neither (though the twists are more efficient...).

  5. The Hadamard is unique. There are two values $M$ such that $M^2 = X$, and so you need an agreed upon convention for which one $sqrtX$ is.

PS: it would be better to compare a Hadamard to a 90 degree rotation about the Y axis, not the X axis, because the Hadamard operation is equivalent $sqrtY$ up to Pauli operations ($H propto Z cdot sqrtY$).






share|improve this answer























    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "694"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fquantumcomputing.stackexchange.com%2fquestions%2f3947%2fadvantange-of-hadamard-gate-over-rotation-about-the-x-axis-for-creating-superpos%23new-answer', 'question_page');

    );

    Post as a guest






























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    4
    down vote



    accepted










    It's mostly about simplicity and adopted convention. In the end, this is basically the same question as "why should I pick a universal set of gates A rather than a universal set B?" (see here). Experimentalists would pick the universal set they have available. Theorists just pick something that they like to work with, and eventually a convention is adopted. But it doesn't matter which convention they adopt because any universal set is easily converted into any other universal set, and it is (or should be) understood that the quantum circuits describing algorithms are not what you actually want to run on a quantum computer: you need to recompile them for the available gate set and optimise based on the available architecture (and this process is unique to each architecture).



    You could use operations such as $sqrtX$, but they are a little bit more fiddly because of all the imaginary numbers that appear. Or there's $sqrtY$ which gives an even more direct comparison to $H$, avoiding imaginary numbers.



    One of the main purposes of $H$ in a quantum circuit is to prepare uniform superpositions: $H|0rangle=(|0rangle+|1rangle)/sqrt2$. But $sqrtY$ also does this: $sqrtY|1rangle=(|0rangle+|1rangle)/sqrt2$. When you start combining multiple Hadamards on unknown input states (i.e. the Hadamard transform), it has a particularly convenient structure
    $$
    H^otimes n=frac1sqrt2^nsum_x,yin0,1^n(-1)^xcdot y|xranglelangle y|.
    $$



    The Hadamard gives you some very nice inter-relations (reflecting basis changes between pairs of mutually unbiased bases),
    $$
    HZH=Xqquad HXH=Z qquad HYH=-Y.
    $$
    It also enables relations between controlled-not and controlled phase, and between controlled-not in two different directions (swapping control and target). There are similar relations for $sqrtY$:
    $$
    sqrtYZsqrtY^dagger=YZ=iX qquad sqrtYXsqrtY^dagger=YX=-iZqquad sqrtYYsqrtY^dagger=Y
    $$
    Part of this looking (slightly) nicer is because, as stated in the question, $H^2=mathbbI$.



    One way that many courses introduce the basic idea of quantum computation, and interference, is to use the Mach-Zehnder interferometer. This consists of two beam splitters which, mathematically, should be described by $sqrtX$ (or $sqrtY$ would do). Indeed, this is important for a first demonstration because of course these operations are "square root of not", which you can prove is logically impossible classically. However, once that initial introduction is over, theorists will often substitute the beam splitter operation for Hadamard, just because it makes everything slightly easier.






    share|improve this answer























    • I see. And coming from computer science, I'm always looking at what is optimal ($i.e.$ minimum number of gates) so I was wondering what the hell are physicists are up to. Thanks for your answer.
      – Ntwali B.
      Aug 6 at 7:19










    • @DaftWullie It would be more fair to compare to $sqrtY$, which is real and accomplishes the same effect as $H$ on the computational basis. (I agree that's not what the OP asked.)
      – Norbert Schuch
      Aug 6 at 9:35






    • 1




      @NorbertSchuch I considered that while writing the answer, but was concerned that it only confused the issue more because there's even less to pick between them.
      – DaftWullie
      Aug 6 at 9:54










    • Fair point. But then again, the case where there's least to pick between them is where the "real" differences between pi/2 rotations and Hadamard become most clear.
      – Norbert Schuch
      Aug 6 at 10:07










    • more than the imaginary numbers in the matrix, I would argue that what is nice about $H$ is the simplicity of its spectrum. $H$ is the gate that switches between the eigenbases of $Z$ and $X$. The matrix that does the same between, say, $X$ and $Y$, contains imaginary numbers but arguably works exactly the same, provided we use eigenbases of $X$ and $Y$ as "standard" instead of those of $Z$ and $X$ as it's commonly done. In other words, what is "simple" about $H$ (or one thing that is) is the fact that it represents a change of basis between two mutually unbiased bases.
      – glS
      Aug 6 at 10:07














    up vote
    4
    down vote



    accepted










    It's mostly about simplicity and adopted convention. In the end, this is basically the same question as "why should I pick a universal set of gates A rather than a universal set B?" (see here). Experimentalists would pick the universal set they have available. Theorists just pick something that they like to work with, and eventually a convention is adopted. But it doesn't matter which convention they adopt because any universal set is easily converted into any other universal set, and it is (or should be) understood that the quantum circuits describing algorithms are not what you actually want to run on a quantum computer: you need to recompile them for the available gate set and optimise based on the available architecture (and this process is unique to each architecture).



    You could use operations such as $sqrtX$, but they are a little bit more fiddly because of all the imaginary numbers that appear. Or there's $sqrtY$ which gives an even more direct comparison to $H$, avoiding imaginary numbers.



    One of the main purposes of $H$ in a quantum circuit is to prepare uniform superpositions: $H|0rangle=(|0rangle+|1rangle)/sqrt2$. But $sqrtY$ also does this: $sqrtY|1rangle=(|0rangle+|1rangle)/sqrt2$. When you start combining multiple Hadamards on unknown input states (i.e. the Hadamard transform), it has a particularly convenient structure
    $$
    H^otimes n=frac1sqrt2^nsum_x,yin0,1^n(-1)^xcdot y|xranglelangle y|.
    $$



    The Hadamard gives you some very nice inter-relations (reflecting basis changes between pairs of mutually unbiased bases),
    $$
    HZH=Xqquad HXH=Z qquad HYH=-Y.
    $$
    It also enables relations between controlled-not and controlled phase, and between controlled-not in two different directions (swapping control and target). There are similar relations for $sqrtY$:
    $$
    sqrtYZsqrtY^dagger=YZ=iX qquad sqrtYXsqrtY^dagger=YX=-iZqquad sqrtYYsqrtY^dagger=Y
    $$
    Part of this looking (slightly) nicer is because, as stated in the question, $H^2=mathbbI$.



    One way that many courses introduce the basic idea of quantum computation, and interference, is to use the Mach-Zehnder interferometer. This consists of two beam splitters which, mathematically, should be described by $sqrtX$ (or $sqrtY$ would do). Indeed, this is important for a first demonstration because of course these operations are "square root of not", which you can prove is logically impossible classically. However, once that initial introduction is over, theorists will often substitute the beam splitter operation for Hadamard, just because it makes everything slightly easier.






    share|improve this answer























    • I see. And coming from computer science, I'm always looking at what is optimal ($i.e.$ minimum number of gates) so I was wondering what the hell are physicists are up to. Thanks for your answer.
      – Ntwali B.
      Aug 6 at 7:19










    • @DaftWullie It would be more fair to compare to $sqrtY$, which is real and accomplishes the same effect as $H$ on the computational basis. (I agree that's not what the OP asked.)
      – Norbert Schuch
      Aug 6 at 9:35






    • 1




      @NorbertSchuch I considered that while writing the answer, but was concerned that it only confused the issue more because there's even less to pick between them.
      – DaftWullie
      Aug 6 at 9:54










    • Fair point. But then again, the case where there's least to pick between them is where the "real" differences between pi/2 rotations and Hadamard become most clear.
      – Norbert Schuch
      Aug 6 at 10:07










    • more than the imaginary numbers in the matrix, I would argue that what is nice about $H$ is the simplicity of its spectrum. $H$ is the gate that switches between the eigenbases of $Z$ and $X$. The matrix that does the same between, say, $X$ and $Y$, contains imaginary numbers but arguably works exactly the same, provided we use eigenbases of $X$ and $Y$ as "standard" instead of those of $Z$ and $X$ as it's commonly done. In other words, what is "simple" about $H$ (or one thing that is) is the fact that it represents a change of basis between two mutually unbiased bases.
      – glS
      Aug 6 at 10:07












    up vote
    4
    down vote



    accepted







    up vote
    4
    down vote



    accepted






    It's mostly about simplicity and adopted convention. In the end, this is basically the same question as "why should I pick a universal set of gates A rather than a universal set B?" (see here). Experimentalists would pick the universal set they have available. Theorists just pick something that they like to work with, and eventually a convention is adopted. But it doesn't matter which convention they adopt because any universal set is easily converted into any other universal set, and it is (or should be) understood that the quantum circuits describing algorithms are not what you actually want to run on a quantum computer: you need to recompile them for the available gate set and optimise based on the available architecture (and this process is unique to each architecture).



    You could use operations such as $sqrtX$, but they are a little bit more fiddly because of all the imaginary numbers that appear. Or there's $sqrtY$ which gives an even more direct comparison to $H$, avoiding imaginary numbers.



    One of the main purposes of $H$ in a quantum circuit is to prepare uniform superpositions: $H|0rangle=(|0rangle+|1rangle)/sqrt2$. But $sqrtY$ also does this: $sqrtY|1rangle=(|0rangle+|1rangle)/sqrt2$. When you start combining multiple Hadamards on unknown input states (i.e. the Hadamard transform), it has a particularly convenient structure
    $$
    H^otimes n=frac1sqrt2^nsum_x,yin0,1^n(-1)^xcdot y|xranglelangle y|.
    $$



    The Hadamard gives you some very nice inter-relations (reflecting basis changes between pairs of mutually unbiased bases),
    $$
    HZH=Xqquad HXH=Z qquad HYH=-Y.
    $$
    It also enables relations between controlled-not and controlled phase, and between controlled-not in two different directions (swapping control and target). There are similar relations for $sqrtY$:
    $$
    sqrtYZsqrtY^dagger=YZ=iX qquad sqrtYXsqrtY^dagger=YX=-iZqquad sqrtYYsqrtY^dagger=Y
    $$
    Part of this looking (slightly) nicer is because, as stated in the question, $H^2=mathbbI$.



    One way that many courses introduce the basic idea of quantum computation, and interference, is to use the Mach-Zehnder interferometer. This consists of two beam splitters which, mathematically, should be described by $sqrtX$ (or $sqrtY$ would do). Indeed, this is important for a first demonstration because of course these operations are "square root of not", which you can prove is logically impossible classically. However, once that initial introduction is over, theorists will often substitute the beam splitter operation for Hadamard, just because it makes everything slightly easier.






    share|improve this answer















    It's mostly about simplicity and adopted convention. In the end, this is basically the same question as "why should I pick a universal set of gates A rather than a universal set B?" (see here). Experimentalists would pick the universal set they have available. Theorists just pick something that they like to work with, and eventually a convention is adopted. But it doesn't matter which convention they adopt because any universal set is easily converted into any other universal set, and it is (or should be) understood that the quantum circuits describing algorithms are not what you actually want to run on a quantum computer: you need to recompile them for the available gate set and optimise based on the available architecture (and this process is unique to each architecture).



    You could use operations such as $sqrtX$, but they are a little bit more fiddly because of all the imaginary numbers that appear. Or there's $sqrtY$ which gives an even more direct comparison to $H$, avoiding imaginary numbers.



    One of the main purposes of $H$ in a quantum circuit is to prepare uniform superpositions: $H|0rangle=(|0rangle+|1rangle)/sqrt2$. But $sqrtY$ also does this: $sqrtY|1rangle=(|0rangle+|1rangle)/sqrt2$. When you start combining multiple Hadamards on unknown input states (i.e. the Hadamard transform), it has a particularly convenient structure
    $$
    H^otimes n=frac1sqrt2^nsum_x,yin0,1^n(-1)^xcdot y|xranglelangle y|.
    $$



    The Hadamard gives you some very nice inter-relations (reflecting basis changes between pairs of mutually unbiased bases),
    $$
    HZH=Xqquad HXH=Z qquad HYH=-Y.
    $$
    It also enables relations between controlled-not and controlled phase, and between controlled-not in two different directions (swapping control and target). There are similar relations for $sqrtY$:
    $$
    sqrtYZsqrtY^dagger=YZ=iX qquad sqrtYXsqrtY^dagger=YX=-iZqquad sqrtYYsqrtY^dagger=Y
    $$
    Part of this looking (slightly) nicer is because, as stated in the question, $H^2=mathbbI$.



    One way that many courses introduce the basic idea of quantum computation, and interference, is to use the Mach-Zehnder interferometer. This consists of two beam splitters which, mathematically, should be described by $sqrtX$ (or $sqrtY$ would do). Indeed, this is important for a first demonstration because of course these operations are "square root of not", which you can prove is logically impossible classically. However, once that initial introduction is over, theorists will often substitute the beam splitter operation for Hadamard, just because it makes everything slightly easier.







    share|improve this answer















    share|improve this answer



    share|improve this answer








    edited Aug 7 at 8:00


























    answered Aug 6 at 7:09









    DaftWullie

    6,8971227




    6,8971227











    • I see. And coming from computer science, I'm always looking at what is optimal ($i.e.$ minimum number of gates) so I was wondering what the hell are physicists are up to. Thanks for your answer.
      – Ntwali B.
      Aug 6 at 7:19










    • @DaftWullie It would be more fair to compare to $sqrtY$, which is real and accomplishes the same effect as $H$ on the computational basis. (I agree that's not what the OP asked.)
      – Norbert Schuch
      Aug 6 at 9:35






    • 1




      @NorbertSchuch I considered that while writing the answer, but was concerned that it only confused the issue more because there's even less to pick between them.
      – DaftWullie
      Aug 6 at 9:54










    • Fair point. But then again, the case where there's least to pick between them is where the "real" differences between pi/2 rotations and Hadamard become most clear.
      – Norbert Schuch
      Aug 6 at 10:07










    • more than the imaginary numbers in the matrix, I would argue that what is nice about $H$ is the simplicity of its spectrum. $H$ is the gate that switches between the eigenbases of $Z$ and $X$. The matrix that does the same between, say, $X$ and $Y$, contains imaginary numbers but arguably works exactly the same, provided we use eigenbases of $X$ and $Y$ as "standard" instead of those of $Z$ and $X$ as it's commonly done. In other words, what is "simple" about $H$ (or one thing that is) is the fact that it represents a change of basis between two mutually unbiased bases.
      – glS
      Aug 6 at 10:07
















    • I see. And coming from computer science, I'm always looking at what is optimal ($i.e.$ minimum number of gates) so I was wondering what the hell are physicists are up to. Thanks for your answer.
      – Ntwali B.
      Aug 6 at 7:19










    • @DaftWullie It would be more fair to compare to $sqrtY$, which is real and accomplishes the same effect as $H$ on the computational basis. (I agree that's not what the OP asked.)
      – Norbert Schuch
      Aug 6 at 9:35






    • 1




      @NorbertSchuch I considered that while writing the answer, but was concerned that it only confused the issue more because there's even less to pick between them.
      – DaftWullie
      Aug 6 at 9:54










    • Fair point. But then again, the case where there's least to pick between them is where the "real" differences between pi/2 rotations and Hadamard become most clear.
      – Norbert Schuch
      Aug 6 at 10:07










    • more than the imaginary numbers in the matrix, I would argue that what is nice about $H$ is the simplicity of its spectrum. $H$ is the gate that switches between the eigenbases of $Z$ and $X$. The matrix that does the same between, say, $X$ and $Y$, contains imaginary numbers but arguably works exactly the same, provided we use eigenbases of $X$ and $Y$ as "standard" instead of those of $Z$ and $X$ as it's commonly done. In other words, what is "simple" about $H$ (or one thing that is) is the fact that it represents a change of basis between two mutually unbiased bases.
      – glS
      Aug 6 at 10:07















    I see. And coming from computer science, I'm always looking at what is optimal ($i.e.$ minimum number of gates) so I was wondering what the hell are physicists are up to. Thanks for your answer.
    – Ntwali B.
    Aug 6 at 7:19




    I see. And coming from computer science, I'm always looking at what is optimal ($i.e.$ minimum number of gates) so I was wondering what the hell are physicists are up to. Thanks for your answer.
    – Ntwali B.
    Aug 6 at 7:19












    @DaftWullie It would be more fair to compare to $sqrtY$, which is real and accomplishes the same effect as $H$ on the computational basis. (I agree that's not what the OP asked.)
    – Norbert Schuch
    Aug 6 at 9:35




    @DaftWullie It would be more fair to compare to $sqrtY$, which is real and accomplishes the same effect as $H$ on the computational basis. (I agree that's not what the OP asked.)
    – Norbert Schuch
    Aug 6 at 9:35




    1




    1




    @NorbertSchuch I considered that while writing the answer, but was concerned that it only confused the issue more because there's even less to pick between them.
    – DaftWullie
    Aug 6 at 9:54




    @NorbertSchuch I considered that while writing the answer, but was concerned that it only confused the issue more because there's even less to pick between them.
    – DaftWullie
    Aug 6 at 9:54












    Fair point. But then again, the case where there's least to pick between them is where the "real" differences between pi/2 rotations and Hadamard become most clear.
    – Norbert Schuch
    Aug 6 at 10:07




    Fair point. But then again, the case where there's least to pick between them is where the "real" differences between pi/2 rotations and Hadamard become most clear.
    – Norbert Schuch
    Aug 6 at 10:07












    more than the imaginary numbers in the matrix, I would argue that what is nice about $H$ is the simplicity of its spectrum. $H$ is the gate that switches between the eigenbases of $Z$ and $X$. The matrix that does the same between, say, $X$ and $Y$, contains imaginary numbers but arguably works exactly the same, provided we use eigenbases of $X$ and $Y$ as "standard" instead of those of $Z$ and $X$ as it's commonly done. In other words, what is "simple" about $H$ (or one thing that is) is the fact that it represents a change of basis between two mutually unbiased bases.
    – glS
    Aug 6 at 10:07




    more than the imaginary numbers in the matrix, I would argue that what is nice about $H$ is the simplicity of its spectrum. $H$ is the gate that switches between the eigenbases of $Z$ and $X$. The matrix that does the same between, say, $X$ and $Y$, contains imaginary numbers but arguably works exactly the same, provided we use eigenbases of $X$ and $Y$ as "standard" instead of those of $Z$ and $X$ as it's commonly done. In other words, what is "simple" about $H$ (or one thing that is) is the fact that it represents a change of basis between two mutually unbiased bases.
    – glS
    Aug 6 at 10:07












    up vote
    3
    down vote













    Any Hermitian quantum gate $U$ is "self-recovering". This is because $U$ is unitary, and
    $$UU^dagger=U^daggerU=I$$
    If $U$ is also Hermitian, then $U=U^dagger$ and
    $$UU=I$$



    Hadamard gate prepares $frac1sqrt2(|0rangle + |1rangle)$ superposition from $|0rangle$ state. If you need this superposition, you use Hadamard. If you need a different superposition, $alpha|0rangle + beta|1rangle$ with some $alpha$ and $beta$, you need a different gate or a sequence of gates; Hadamard gate has no advantage here.






    share|improve this answer























    • You certainly answer the question and thanks for that. Though would you mind elaborating why one would specifically need $frac1sqrt2(|0rangle + |1rangle)$ over say $frac1sqrt2(|0rangle - i |1rangle)$? I believe elaborating on that will shed more light to aid my understanding.
      – Ntwali B.
      Aug 6 at 7:12










    • @NtwaliB. Suppose you need just a superposition with 50% chances being $|0rangle$ and 50% chances being $|1rangle$; both $frac1sqrt2(|0rangle + |1rangle)$ and $frac1sqrt2(|0rangle - i |1rangle)$ are equally good for you, but what would you choose?
      – kludg
      Aug 6 at 7:19










    • I would choose the one that makes the computer do the least amount of work. If a Hadamard gate is implemented in terms of rotations, I will use a rotation about X as it saves me the use of two additional gates. If Hadamard is a native gate, I will use Hadamard since most people are used to it. Note: Hadamard generates $frac1sqrt2(|0rangle + |1rangle)$ while $R_x(fracpi2)$ generates $frac1sqrt2(|0rangle - i|1rangle)$
      – Ntwali B.
      Aug 6 at 7:24







    • 1




      @kludg Why would $U=U^dagger$ for real $U$?? This is completely wrong. Try e.g. [1 -1;1 1] (normalized) - a pi/2 rotation about Y - which doesn't square to the identity. (Indeed, a Y rotation by pi/2 prepares the same superpositions as H starting from the computational basis.)
      – Norbert Schuch
      Aug 6 at 9:31







    • 1




      @kludg this is not true as written. Did you mean to write hermitian instead of real?
      – glS
      Aug 6 at 9:32














    up vote
    3
    down vote













    Any Hermitian quantum gate $U$ is "self-recovering". This is because $U$ is unitary, and
    $$UU^dagger=U^daggerU=I$$
    If $U$ is also Hermitian, then $U=U^dagger$ and
    $$UU=I$$



    Hadamard gate prepares $frac1sqrt2(|0rangle + |1rangle)$ superposition from $|0rangle$ state. If you need this superposition, you use Hadamard. If you need a different superposition, $alpha|0rangle + beta|1rangle$ with some $alpha$ and $beta$, you need a different gate or a sequence of gates; Hadamard gate has no advantage here.






    share|improve this answer























    • You certainly answer the question and thanks for that. Though would you mind elaborating why one would specifically need $frac1sqrt2(|0rangle + |1rangle)$ over say $frac1sqrt2(|0rangle - i |1rangle)$? I believe elaborating on that will shed more light to aid my understanding.
      – Ntwali B.
      Aug 6 at 7:12










    • @NtwaliB. Suppose you need just a superposition with 50% chances being $|0rangle$ and 50% chances being $|1rangle$; both $frac1sqrt2(|0rangle + |1rangle)$ and $frac1sqrt2(|0rangle - i |1rangle)$ are equally good for you, but what would you choose?
      – kludg
      Aug 6 at 7:19










    • I would choose the one that makes the computer do the least amount of work. If a Hadamard gate is implemented in terms of rotations, I will use a rotation about X as it saves me the use of two additional gates. If Hadamard is a native gate, I will use Hadamard since most people are used to it. Note: Hadamard generates $frac1sqrt2(|0rangle + |1rangle)$ while $R_x(fracpi2)$ generates $frac1sqrt2(|0rangle - i|1rangle)$
      – Ntwali B.
      Aug 6 at 7:24







    • 1




      @kludg Why would $U=U^dagger$ for real $U$?? This is completely wrong. Try e.g. [1 -1;1 1] (normalized) - a pi/2 rotation about Y - which doesn't square to the identity. (Indeed, a Y rotation by pi/2 prepares the same superpositions as H starting from the computational basis.)
      – Norbert Schuch
      Aug 6 at 9:31







    • 1




      @kludg this is not true as written. Did you mean to write hermitian instead of real?
      – glS
      Aug 6 at 9:32












    up vote
    3
    down vote










    up vote
    3
    down vote









    Any Hermitian quantum gate $U$ is "self-recovering". This is because $U$ is unitary, and
    $$UU^dagger=U^daggerU=I$$
    If $U$ is also Hermitian, then $U=U^dagger$ and
    $$UU=I$$



    Hadamard gate prepares $frac1sqrt2(|0rangle + |1rangle)$ superposition from $|0rangle$ state. If you need this superposition, you use Hadamard. If you need a different superposition, $alpha|0rangle + beta|1rangle$ with some $alpha$ and $beta$, you need a different gate or a sequence of gates; Hadamard gate has no advantage here.






    share|improve this answer















    Any Hermitian quantum gate $U$ is "self-recovering". This is because $U$ is unitary, and
    $$UU^dagger=U^daggerU=I$$
    If $U$ is also Hermitian, then $U=U^dagger$ and
    $$UU=I$$



    Hadamard gate prepares $frac1sqrt2(|0rangle + |1rangle)$ superposition from $|0rangle$ state. If you need this superposition, you use Hadamard. If you need a different superposition, $alpha|0rangle + beta|1rangle$ with some $alpha$ and $beta$, you need a different gate or a sequence of gates; Hadamard gate has no advantage here.







    share|improve this answer















    share|improve this answer



    share|improve this answer








    edited Aug 6 at 9:50


























    answered Aug 6 at 7:00









    kludg

    5806




    5806











    • You certainly answer the question and thanks for that. Though would you mind elaborating why one would specifically need $frac1sqrt2(|0rangle + |1rangle)$ over say $frac1sqrt2(|0rangle - i |1rangle)$? I believe elaborating on that will shed more light to aid my understanding.
      – Ntwali B.
      Aug 6 at 7:12










    • @NtwaliB. Suppose you need just a superposition with 50% chances being $|0rangle$ and 50% chances being $|1rangle$; both $frac1sqrt2(|0rangle + |1rangle)$ and $frac1sqrt2(|0rangle - i |1rangle)$ are equally good for you, but what would you choose?
      – kludg
      Aug 6 at 7:19










    • I would choose the one that makes the computer do the least amount of work. If a Hadamard gate is implemented in terms of rotations, I will use a rotation about X as it saves me the use of two additional gates. If Hadamard is a native gate, I will use Hadamard since most people are used to it. Note: Hadamard generates $frac1sqrt2(|0rangle + |1rangle)$ while $R_x(fracpi2)$ generates $frac1sqrt2(|0rangle - i|1rangle)$
      – Ntwali B.
      Aug 6 at 7:24







    • 1




      @kludg Why would $U=U^dagger$ for real $U$?? This is completely wrong. Try e.g. [1 -1;1 1] (normalized) - a pi/2 rotation about Y - which doesn't square to the identity. (Indeed, a Y rotation by pi/2 prepares the same superpositions as H starting from the computational basis.)
      – Norbert Schuch
      Aug 6 at 9:31







    • 1




      @kludg this is not true as written. Did you mean to write hermitian instead of real?
      – glS
      Aug 6 at 9:32
















    • You certainly answer the question and thanks for that. Though would you mind elaborating why one would specifically need $frac1sqrt2(|0rangle + |1rangle)$ over say $frac1sqrt2(|0rangle - i |1rangle)$? I believe elaborating on that will shed more light to aid my understanding.
      – Ntwali B.
      Aug 6 at 7:12










    • @NtwaliB. Suppose you need just a superposition with 50% chances being $|0rangle$ and 50% chances being $|1rangle$; both $frac1sqrt2(|0rangle + |1rangle)$ and $frac1sqrt2(|0rangle - i |1rangle)$ are equally good for you, but what would you choose?
      – kludg
      Aug 6 at 7:19










    • I would choose the one that makes the computer do the least amount of work. If a Hadamard gate is implemented in terms of rotations, I will use a rotation about X as it saves me the use of two additional gates. If Hadamard is a native gate, I will use Hadamard since most people are used to it. Note: Hadamard generates $frac1sqrt2(|0rangle + |1rangle)$ while $R_x(fracpi2)$ generates $frac1sqrt2(|0rangle - i|1rangle)$
      – Ntwali B.
      Aug 6 at 7:24







    • 1




      @kludg Why would $U=U^dagger$ for real $U$?? This is completely wrong. Try e.g. [1 -1;1 1] (normalized) - a pi/2 rotation about Y - which doesn't square to the identity. (Indeed, a Y rotation by pi/2 prepares the same superpositions as H starting from the computational basis.)
      – Norbert Schuch
      Aug 6 at 9:31







    • 1




      @kludg this is not true as written. Did you mean to write hermitian instead of real?
      – glS
      Aug 6 at 9:32















    You certainly answer the question and thanks for that. Though would you mind elaborating why one would specifically need $frac1sqrt2(|0rangle + |1rangle)$ over say $frac1sqrt2(|0rangle - i |1rangle)$? I believe elaborating on that will shed more light to aid my understanding.
    – Ntwali B.
    Aug 6 at 7:12




    You certainly answer the question and thanks for that. Though would you mind elaborating why one would specifically need $frac1sqrt2(|0rangle + |1rangle)$ over say $frac1sqrt2(|0rangle - i |1rangle)$? I believe elaborating on that will shed more light to aid my understanding.
    – Ntwali B.
    Aug 6 at 7:12












    @NtwaliB. Suppose you need just a superposition with 50% chances being $|0rangle$ and 50% chances being $|1rangle$; both $frac1sqrt2(|0rangle + |1rangle)$ and $frac1sqrt2(|0rangle - i |1rangle)$ are equally good for you, but what would you choose?
    – kludg
    Aug 6 at 7:19




    @NtwaliB. Suppose you need just a superposition with 50% chances being $|0rangle$ and 50% chances being $|1rangle$; both $frac1sqrt2(|0rangle + |1rangle)$ and $frac1sqrt2(|0rangle - i |1rangle)$ are equally good for you, but what would you choose?
    – kludg
    Aug 6 at 7:19












    I would choose the one that makes the computer do the least amount of work. If a Hadamard gate is implemented in terms of rotations, I will use a rotation about X as it saves me the use of two additional gates. If Hadamard is a native gate, I will use Hadamard since most people are used to it. Note: Hadamard generates $frac1sqrt2(|0rangle + |1rangle)$ while $R_x(fracpi2)$ generates $frac1sqrt2(|0rangle - i|1rangle)$
    – Ntwali B.
    Aug 6 at 7:24





    I would choose the one that makes the computer do the least amount of work. If a Hadamard gate is implemented in terms of rotations, I will use a rotation about X as it saves me the use of two additional gates. If Hadamard is a native gate, I will use Hadamard since most people are used to it. Note: Hadamard generates $frac1sqrt2(|0rangle + |1rangle)$ while $R_x(fracpi2)$ generates $frac1sqrt2(|0rangle - i|1rangle)$
    – Ntwali B.
    Aug 6 at 7:24





    1




    1




    @kludg Why would $U=U^dagger$ for real $U$?? This is completely wrong. Try e.g. [1 -1;1 1] (normalized) - a pi/2 rotation about Y - which doesn't square to the identity. (Indeed, a Y rotation by pi/2 prepares the same superpositions as H starting from the computational basis.)
    – Norbert Schuch
    Aug 6 at 9:31





    @kludg Why would $U=U^dagger$ for real $U$?? This is completely wrong. Try e.g. [1 -1;1 1] (normalized) - a pi/2 rotation about Y - which doesn't square to the identity. (Indeed, a Y rotation by pi/2 prepares the same superpositions as H starting from the computational basis.)
    – Norbert Schuch
    Aug 6 at 9:31





    1




    1




    @kludg this is not true as written. Did you mean to write hermitian instead of real?
    – glS
    Aug 6 at 9:32




    @kludg this is not true as written. Did you mean to write hermitian instead of real?
    – glS
    Aug 6 at 9:32










    up vote
    3
    down vote













    I think the major advantages of the Hadamard gate are "usability" stuff, as opposed to fundamental mathematical stuff. It's just easier to remember and simpler to apply.



    1. The Hadamard gate's marix is real and symmetric. Makes it easy to remember.

    2. Hadamard is its own inverse. Makes it easy to optimize in circuits. Any two Hs that meet cancel out; whereas $sqrtX$ tends to meet $sqrtX$ as often as $sqrtX^-1$ leaving behind $X$ operations.

    3. Hadamard's effect on operators is easy to remember: swap X for Z. Whereas for $sqrtX$ style operations you need to remember a right hand rule. If you pass a hadamard over a CZ, it turns into a CNOT. If you pass a $sqrtY$ over a CZ, whether you get a CNOT or a CNOT+Z depends on whether you went left-to-right or right-to-left.

    4. In the surface code you need twist defects or distilled states to do $sqrtX$ gates. Hadamard operations need neither (though the twists are more efficient...).

    5. The Hadamard is unique. There are two values $M$ such that $M^2 = X$, and so you need an agreed upon convention for which one $sqrtX$ is.

    PS: it would be better to compare a Hadamard to a 90 degree rotation about the Y axis, not the X axis, because the Hadamard operation is equivalent $sqrtY$ up to Pauli operations ($H propto Z cdot sqrtY$).






    share|improve this answer



























      up vote
      3
      down vote













      I think the major advantages of the Hadamard gate are "usability" stuff, as opposed to fundamental mathematical stuff. It's just easier to remember and simpler to apply.



      1. The Hadamard gate's marix is real and symmetric. Makes it easy to remember.

      2. Hadamard is its own inverse. Makes it easy to optimize in circuits. Any two Hs that meet cancel out; whereas $sqrtX$ tends to meet $sqrtX$ as often as $sqrtX^-1$ leaving behind $X$ operations.

      3. Hadamard's effect on operators is easy to remember: swap X for Z. Whereas for $sqrtX$ style operations you need to remember a right hand rule. If you pass a hadamard over a CZ, it turns into a CNOT. If you pass a $sqrtY$ over a CZ, whether you get a CNOT or a CNOT+Z depends on whether you went left-to-right or right-to-left.

      4. In the surface code you need twist defects or distilled states to do $sqrtX$ gates. Hadamard operations need neither (though the twists are more efficient...).

      5. The Hadamard is unique. There are two values $M$ such that $M^2 = X$, and so you need an agreed upon convention for which one $sqrtX$ is.

      PS: it would be better to compare a Hadamard to a 90 degree rotation about the Y axis, not the X axis, because the Hadamard operation is equivalent $sqrtY$ up to Pauli operations ($H propto Z cdot sqrtY$).






      share|improve this answer

























        up vote
        3
        down vote










        up vote
        3
        down vote









        I think the major advantages of the Hadamard gate are "usability" stuff, as opposed to fundamental mathematical stuff. It's just easier to remember and simpler to apply.



        1. The Hadamard gate's marix is real and symmetric. Makes it easy to remember.

        2. Hadamard is its own inverse. Makes it easy to optimize in circuits. Any two Hs that meet cancel out; whereas $sqrtX$ tends to meet $sqrtX$ as often as $sqrtX^-1$ leaving behind $X$ operations.

        3. Hadamard's effect on operators is easy to remember: swap X for Z. Whereas for $sqrtX$ style operations you need to remember a right hand rule. If you pass a hadamard over a CZ, it turns into a CNOT. If you pass a $sqrtY$ over a CZ, whether you get a CNOT or a CNOT+Z depends on whether you went left-to-right or right-to-left.

        4. In the surface code you need twist defects or distilled states to do $sqrtX$ gates. Hadamard operations need neither (though the twists are more efficient...).

        5. The Hadamard is unique. There are two values $M$ such that $M^2 = X$, and so you need an agreed upon convention for which one $sqrtX$ is.

        PS: it would be better to compare a Hadamard to a 90 degree rotation about the Y axis, not the X axis, because the Hadamard operation is equivalent $sqrtY$ up to Pauli operations ($H propto Z cdot sqrtY$).






        share|improve this answer















        I think the major advantages of the Hadamard gate are "usability" stuff, as opposed to fundamental mathematical stuff. It's just easier to remember and simpler to apply.



        1. The Hadamard gate's marix is real and symmetric. Makes it easy to remember.

        2. Hadamard is its own inverse. Makes it easy to optimize in circuits. Any two Hs that meet cancel out; whereas $sqrtX$ tends to meet $sqrtX$ as often as $sqrtX^-1$ leaving behind $X$ operations.

        3. Hadamard's effect on operators is easy to remember: swap X for Z. Whereas for $sqrtX$ style operations you need to remember a right hand rule. If you pass a hadamard over a CZ, it turns into a CNOT. If you pass a $sqrtY$ over a CZ, whether you get a CNOT or a CNOT+Z depends on whether you went left-to-right or right-to-left.

        4. In the surface code you need twist defects or distilled states to do $sqrtX$ gates. Hadamard operations need neither (though the twists are more efficient...).

        5. The Hadamard is unique. There are two values $M$ such that $M^2 = X$, and so you need an agreed upon convention for which one $sqrtX$ is.

        PS: it would be better to compare a Hadamard to a 90 degree rotation about the Y axis, not the X axis, because the Hadamard operation is equivalent $sqrtY$ up to Pauli operations ($H propto Z cdot sqrtY$).







        share|improve this answer















        share|improve this answer



        share|improve this answer








        edited Aug 6 at 19:26


























        answered Aug 6 at 17:09









        Craig Gidney

        1,80715




        1,80715






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fquantumcomputing.stackexchange.com%2fquestions%2f3947%2fadvantange-of-hadamard-gate-over-rotation-about-the-x-axis-for-creating-superpos%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What is the equation of a 3D cone with generalised tilt?

            Color the edges and diagonals of a regular polygon

            Relationship between determinant of matrix and determinant of adjoint?