What does it mean to express a gate in Dirac notation?Reading gate matricesHow does bra-ket notation work?How does Fourier sampling actually work (and solve the parity problem)?What do we mean by the notation $lvert mathbfx, 0rangle$?What does the notation $lvert underlinex rangle$ mean?How to properly write the action of a quantum gate implementing an operator $U$ on the superposition of its eigenvectors?Notation for two entangled registersWhy is correlation in the $X$ basis represented as $Xotimes X = 1$?N&C quantum circuit for Grover's algorithmNotation for two qubit composite product stateWhat is the tensorial representation of the quantum swap gate?

Point of the the Dothraki's attack in GoT S8E3?

Pawn Promotion Double Checks

Should I replace my bicycle tires if they have not been inflated in multiple years

Roll Dice to get a random number between 1 and 150

Should one double the thirds or the fifth in chords?

60s (or earlier) SF short story with FTL Travel using electron psychology aka addiclenendar technology

Can fracking help reduce CO2?

Does a wine bottle stopper require tevillah?

¿Por qué el español no introdujo el C con cedilla, Ç? – Why did Spanish not introduce the C with cedilla, Ç?

Is there a legal ground for stripping the UK of its UN Veto if Scotland and/or N.Ireland split from the UK?

I caught several of my students plagiarizing. Could it be my fault as a teacher?

Is Cola "probably the best-known" Latin word in the world? If not, which might it be?

What is a "listed natural gas appliance"?

How to give very negative feedback gracefully?

Python password manager

For a benzene shown in a skeletal structure, what does a substituent to the center of the ring mean?

If 1. e4 c6 is considered as a sound defense for black, why is 1. c3 so rare?

What are the differences between credential stuffing and password spraying?

Why is Arya visibly scared in the library in S8E3?

How to reply this mail from potential PhD professor?

Would glacier 'trees' be plausible?

Number of seconds in 6 weeks

Short story with physics professor who "brings back the dead" (Asimov or Bradbury?)

Missed the connecting flight, separate tickets on same airline - who is responsible?



What does it mean to express a gate in Dirac notation?


Reading gate matricesHow does bra-ket notation work?How does Fourier sampling actually work (and solve the parity problem)?What do we mean by the notation $lvert mathbfx, 0rangle$?What does the notation $lvert underlinex rangle$ mean?How to properly write the action of a quantum gate implementing an operator $U$ on the superposition of its eigenvectors?Notation for two entangled registersWhy is correlation in the $X$ basis represented as $Xotimes X = 1$?N&C quantum circuit for Grover's algorithmNotation for two qubit composite product stateWhat is the tensorial representation of the quantum swap gate?






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








1












$begingroup$


When discussing the Dirac notation of an operator, for example, let's just say we have the bit flip gate $X$ if we want to write this in the Dirac notation does that just mean writing it as follows?



$$X|psirangle=X(c_0|0rangle+c_1|1rangle)=c_0|1rangle+c_1|0rangle$$










share|improve this question











$endgroup$


















    1












    $begingroup$


    When discussing the Dirac notation of an operator, for example, let's just say we have the bit flip gate $X$ if we want to write this in the Dirac notation does that just mean writing it as follows?



    $$X|psirangle=X(c_0|0rangle+c_1|1rangle)=c_0|1rangle+c_1|0rangle$$










    share|improve this question











    $endgroup$














      1












      1








      1





      $begingroup$


      When discussing the Dirac notation of an operator, for example, let's just say we have the bit flip gate $X$ if we want to write this in the Dirac notation does that just mean writing it as follows?



      $$X|psirangle=X(c_0|0rangle+c_1|1rangle)=c_0|1rangle+c_1|0rangle$$










      share|improve this question











      $endgroup$




      When discussing the Dirac notation of an operator, for example, let's just say we have the bit flip gate $X$ if we want to write this in the Dirac notation does that just mean writing it as follows?



      $$X|psirangle=X(c_0|0rangle+c_1|1rangle)=c_0|1rangle+c_1|0rangle$$







      quantum-gate notation






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 27 at 19:12









      Sanchayan Dutta

      6,87341556




      6,87341556










      asked Apr 27 at 19:08









      can'tcauchycan'tcauchy

      2357




      2357




















          2 Answers
          2






          active

          oldest

          votes


















          2












          $begingroup$

          The Dirac notation for the Pauli-$X$ gate is:



          $$|1rangle langle0| + |0rangle langle1|.$$



          Now you might be wondering where this comes from. The term you're looking for is outer product representation of the $X$ gate. It follows from the spectral decomposition theorem (check Nielsen & Chuang 10th edition, p. 72) which holds for all normal operators. The key point:




          In terms of the outer product representation, this means that $M$ can be written as $M=sum_ilambda_i|iranglelangle i|$,where $lambda_i$ are the eigenvalues of $M$,$|irangle$ is an orthonormal basis for $V$, and each $|irangle$ an eigenvector of $M$ with eigenvalue $lambda_i$.




          The eigenvectors of the Pauli-$X$ gate are $-|0rangle+|1rangle$ and $|0rangle+|1rangle$, and the corresponding eigenvalues are $-1$ and $+1$ cf. Wolfram Alpha. Normalize the eigenvectors to get an orthonormal basis for $X$ i.e. $frac0rangle+sqrt2,frac0rangle+sqrt2$. According the spectral decomposition theorem you can represent the $X$ gate as:



          $$-1(frac0rangle+sqrt2)(frac-langle 0sqrt2) + 1(frac0rangle+sqrt2)(fracsqrt2)$$
          $$=-frac12(|0ranglelangle0|-|0ranglelangle1|-|1ranglelangle0|+|1ranglelangle1|)+frac12(|0ranglelangle0|+|0ranglelangle1|+|1ranglelangle0|+|1ranglelangle1|)$$
          $$=|1rangle langle0| + |0rangle langle1|$$



          To convince you that this result is correct let's apply it on an arbitrary qubit state $c_0|0rangle+c_1 |1rangle$:



          $$(|1rangle langle0| + |0rangle langle1|)(c_0|0rangle+c_1|1rangle)$$
          $$=c_0|1ranglelangle0|0rangle+c_1|0ranglelangle 1|1rangle$$
          $$=c_0 |1rangle + c_1 |0rangle$$



          So yes, our result is correct and the bits were indeed flipped upon application of $X=|1rangle langle0| + |0rangle langle1|$ to $c_0|0rangle + c_1|1rangle$.The last step followed from the fact that $langle 0|0rangle$ and $langle 1|1rangle$ are both equal to $1$, as $|0rangle$ and $|1rangle$ are orthonormal vectors i.e. their inner product $langle psi|psirangle=1$ by definition.



          We're done. As an exercise, find the outer product representation of the Pauli-$Z$ gate by yourself. And definitely, do go through the proof of the spectral theorem in Nielsen and Chung if time permits!






          share|improve this answer











          $endgroup$




















            3












            $begingroup$

            This might mean using the ketbra notation:



            $$X = |1rangle langle0| + |0rangle langle1|$$



            This notation describes the effect the operator has on the basis vectors: in this case $X$ converts $|0rangle$ into $|1rangle$ and vice versa.



            A couple of other examples:



            $$Z = |0rangle langle0| - |1rangle langle1|$$



            $$operatornameCNOT = |0 ranglelangle0| otimes I + |1 ranglelangle 1| otimes X = |00rangle langle00| + |01rangle langle01| + |11rangle langle10| + |10rangle langle11|$$






            share|improve this answer











            $endgroup$












            • $begingroup$
              For OP: a quick and intuitive way to derive the CNOT's outer product representation is to see what effect it has on the individual qubits. The CNOT flips the second qubit when the control qubit is $|1rangle$. When the control qubit is $|0rangle$ the second qubit remains intact, which is equivalent to applying the identity gate $I$. So we get $|0ranglelangle 0|otimes I$ for this. However, when the control qubit is $|1rangle$ we need to flip the second qubit's state i.e. we apply the $X$ gate to the second qubit. Thus, we get $|1ranglelangle 1|otimes X$ for this.
              $endgroup$
              – Sanchayan Dutta
              Apr 27 at 20:33







            • 1




              $begingroup$
              0 and 1 in one of the outer products in X-gate should be flipped, I tried editing myself but says "Edits must be at least 6 characters; is there something else to improve in this post?" And I think everything else is perfect, P.S. The accepted answer has same typo, cheers!
              $endgroup$
              – Hemant
              3 hours ago










            • $begingroup$
              @Hemant Fixed, thank you!
              $endgroup$
              – Mariia Mykhailova
              3 hours ago











            Your Answer








            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',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            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%2f5989%2fwhat-does-it-mean-to-express-a-gate-in-dirac-notation%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2












            $begingroup$

            The Dirac notation for the Pauli-$X$ gate is:



            $$|1rangle langle0| + |0rangle langle1|.$$



            Now you might be wondering where this comes from. The term you're looking for is outer product representation of the $X$ gate. It follows from the spectral decomposition theorem (check Nielsen & Chuang 10th edition, p. 72) which holds for all normal operators. The key point:




            In terms of the outer product representation, this means that $M$ can be written as $M=sum_ilambda_i|iranglelangle i|$,where $lambda_i$ are the eigenvalues of $M$,$|irangle$ is an orthonormal basis for $V$, and each $|irangle$ an eigenvector of $M$ with eigenvalue $lambda_i$.




            The eigenvectors of the Pauli-$X$ gate are $-|0rangle+|1rangle$ and $|0rangle+|1rangle$, and the corresponding eigenvalues are $-1$ and $+1$ cf. Wolfram Alpha. Normalize the eigenvectors to get an orthonormal basis for $X$ i.e. $frac0rangle+sqrt2,frac0rangle+sqrt2$. According the spectral decomposition theorem you can represent the $X$ gate as:



            $$-1(frac0rangle+sqrt2)(frac-langle 0sqrt2) + 1(frac0rangle+sqrt2)(fracsqrt2)$$
            $$=-frac12(|0ranglelangle0|-|0ranglelangle1|-|1ranglelangle0|+|1ranglelangle1|)+frac12(|0ranglelangle0|+|0ranglelangle1|+|1ranglelangle0|+|1ranglelangle1|)$$
            $$=|1rangle langle0| + |0rangle langle1|$$



            To convince you that this result is correct let's apply it on an arbitrary qubit state $c_0|0rangle+c_1 |1rangle$:



            $$(|1rangle langle0| + |0rangle langle1|)(c_0|0rangle+c_1|1rangle)$$
            $$=c_0|1ranglelangle0|0rangle+c_1|0ranglelangle 1|1rangle$$
            $$=c_0 |1rangle + c_1 |0rangle$$



            So yes, our result is correct and the bits were indeed flipped upon application of $X=|1rangle langle0| + |0rangle langle1|$ to $c_0|0rangle + c_1|1rangle$.The last step followed from the fact that $langle 0|0rangle$ and $langle 1|1rangle$ are both equal to $1$, as $|0rangle$ and $|1rangle$ are orthonormal vectors i.e. their inner product $langle psi|psirangle=1$ by definition.



            We're done. As an exercise, find the outer product representation of the Pauli-$Z$ gate by yourself. And definitely, do go through the proof of the spectral theorem in Nielsen and Chung if time permits!






            share|improve this answer











            $endgroup$

















              2












              $begingroup$

              The Dirac notation for the Pauli-$X$ gate is:



              $$|1rangle langle0| + |0rangle langle1|.$$



              Now you might be wondering where this comes from. The term you're looking for is outer product representation of the $X$ gate. It follows from the spectral decomposition theorem (check Nielsen & Chuang 10th edition, p. 72) which holds for all normal operators. The key point:




              In terms of the outer product representation, this means that $M$ can be written as $M=sum_ilambda_i|iranglelangle i|$,where $lambda_i$ are the eigenvalues of $M$,$|irangle$ is an orthonormal basis for $V$, and each $|irangle$ an eigenvector of $M$ with eigenvalue $lambda_i$.




              The eigenvectors of the Pauli-$X$ gate are $-|0rangle+|1rangle$ and $|0rangle+|1rangle$, and the corresponding eigenvalues are $-1$ and $+1$ cf. Wolfram Alpha. Normalize the eigenvectors to get an orthonormal basis for $X$ i.e. $frac0rangle+sqrt2,frac0rangle+sqrt2$. According the spectral decomposition theorem you can represent the $X$ gate as:



              $$-1(frac0rangle+sqrt2)(frac-langle 0sqrt2) + 1(frac0rangle+sqrt2)(fracsqrt2)$$
              $$=-frac12(|0ranglelangle0|-|0ranglelangle1|-|1ranglelangle0|+|1ranglelangle1|)+frac12(|0ranglelangle0|+|0ranglelangle1|+|1ranglelangle0|+|1ranglelangle1|)$$
              $$=|1rangle langle0| + |0rangle langle1|$$



              To convince you that this result is correct let's apply it on an arbitrary qubit state $c_0|0rangle+c_1 |1rangle$:



              $$(|1rangle langle0| + |0rangle langle1|)(c_0|0rangle+c_1|1rangle)$$
              $$=c_0|1ranglelangle0|0rangle+c_1|0ranglelangle 1|1rangle$$
              $$=c_0 |1rangle + c_1 |0rangle$$



              So yes, our result is correct and the bits were indeed flipped upon application of $X=|1rangle langle0| + |0rangle langle1|$ to $c_0|0rangle + c_1|1rangle$.The last step followed from the fact that $langle 0|0rangle$ and $langle 1|1rangle$ are both equal to $1$, as $|0rangle$ and $|1rangle$ are orthonormal vectors i.e. their inner product $langle psi|psirangle=1$ by definition.



              We're done. As an exercise, find the outer product representation of the Pauli-$Z$ gate by yourself. And definitely, do go through the proof of the spectral theorem in Nielsen and Chung if time permits!






              share|improve this answer











              $endgroup$















                2












                2








                2





                $begingroup$

                The Dirac notation for the Pauli-$X$ gate is:



                $$|1rangle langle0| + |0rangle langle1|.$$



                Now you might be wondering where this comes from. The term you're looking for is outer product representation of the $X$ gate. It follows from the spectral decomposition theorem (check Nielsen & Chuang 10th edition, p. 72) which holds for all normal operators. The key point:




                In terms of the outer product representation, this means that $M$ can be written as $M=sum_ilambda_i|iranglelangle i|$,where $lambda_i$ are the eigenvalues of $M$,$|irangle$ is an orthonormal basis for $V$, and each $|irangle$ an eigenvector of $M$ with eigenvalue $lambda_i$.




                The eigenvectors of the Pauli-$X$ gate are $-|0rangle+|1rangle$ and $|0rangle+|1rangle$, and the corresponding eigenvalues are $-1$ and $+1$ cf. Wolfram Alpha. Normalize the eigenvectors to get an orthonormal basis for $X$ i.e. $frac0rangle+sqrt2,frac0rangle+sqrt2$. According the spectral decomposition theorem you can represent the $X$ gate as:



                $$-1(frac0rangle+sqrt2)(frac-langle 0sqrt2) + 1(frac0rangle+sqrt2)(fracsqrt2)$$
                $$=-frac12(|0ranglelangle0|-|0ranglelangle1|-|1ranglelangle0|+|1ranglelangle1|)+frac12(|0ranglelangle0|+|0ranglelangle1|+|1ranglelangle0|+|1ranglelangle1|)$$
                $$=|1rangle langle0| + |0rangle langle1|$$



                To convince you that this result is correct let's apply it on an arbitrary qubit state $c_0|0rangle+c_1 |1rangle$:



                $$(|1rangle langle0| + |0rangle langle1|)(c_0|0rangle+c_1|1rangle)$$
                $$=c_0|1ranglelangle0|0rangle+c_1|0ranglelangle 1|1rangle$$
                $$=c_0 |1rangle + c_1 |0rangle$$



                So yes, our result is correct and the bits were indeed flipped upon application of $X=|1rangle langle0| + |0rangle langle1|$ to $c_0|0rangle + c_1|1rangle$.The last step followed from the fact that $langle 0|0rangle$ and $langle 1|1rangle$ are both equal to $1$, as $|0rangle$ and $|1rangle$ are orthonormal vectors i.e. their inner product $langle psi|psirangle=1$ by definition.



                We're done. As an exercise, find the outer product representation of the Pauli-$Z$ gate by yourself. And definitely, do go through the proof of the spectral theorem in Nielsen and Chung if time permits!






                share|improve this answer











                $endgroup$



                The Dirac notation for the Pauli-$X$ gate is:



                $$|1rangle langle0| + |0rangle langle1|.$$



                Now you might be wondering where this comes from. The term you're looking for is outer product representation of the $X$ gate. It follows from the spectral decomposition theorem (check Nielsen & Chuang 10th edition, p. 72) which holds for all normal operators. The key point:




                In terms of the outer product representation, this means that $M$ can be written as $M=sum_ilambda_i|iranglelangle i|$,where $lambda_i$ are the eigenvalues of $M$,$|irangle$ is an orthonormal basis for $V$, and each $|irangle$ an eigenvector of $M$ with eigenvalue $lambda_i$.




                The eigenvectors of the Pauli-$X$ gate are $-|0rangle+|1rangle$ and $|0rangle+|1rangle$, and the corresponding eigenvalues are $-1$ and $+1$ cf. Wolfram Alpha. Normalize the eigenvectors to get an orthonormal basis for $X$ i.e. $frac0rangle+sqrt2,frac0rangle+sqrt2$. According the spectral decomposition theorem you can represent the $X$ gate as:



                $$-1(frac0rangle+sqrt2)(frac-langle 0sqrt2) + 1(frac0rangle+sqrt2)(fracsqrt2)$$
                $$=-frac12(|0ranglelangle0|-|0ranglelangle1|-|1ranglelangle0|+|1ranglelangle1|)+frac12(|0ranglelangle0|+|0ranglelangle1|+|1ranglelangle0|+|1ranglelangle1|)$$
                $$=|1rangle langle0| + |0rangle langle1|$$



                To convince you that this result is correct let's apply it on an arbitrary qubit state $c_0|0rangle+c_1 |1rangle$:



                $$(|1rangle langle0| + |0rangle langle1|)(c_0|0rangle+c_1|1rangle)$$
                $$=c_0|1ranglelangle0|0rangle+c_1|0ranglelangle 1|1rangle$$
                $$=c_0 |1rangle + c_1 |0rangle$$



                So yes, our result is correct and the bits were indeed flipped upon application of $X=|1rangle langle0| + |0rangle langle1|$ to $c_0|0rangle + c_1|1rangle$.The last step followed from the fact that $langle 0|0rangle$ and $langle 1|1rangle$ are both equal to $1$, as $|0rangle$ and $|1rangle$ are orthonormal vectors i.e. their inner product $langle psi|psirangle=1$ by definition.



                We're done. As an exercise, find the outer product representation of the Pauli-$Z$ gate by yourself. And definitely, do go through the proof of the spectral theorem in Nielsen and Chung if time permits!







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 51 mins ago









                Mariia Mykhailova

                1,9501212




                1,9501212










                answered Apr 27 at 20:04









                Sanchayan DuttaSanchayan Dutta

                6,87341556




                6,87341556























                    3












                    $begingroup$

                    This might mean using the ketbra notation:



                    $$X = |1rangle langle0| + |0rangle langle1|$$



                    This notation describes the effect the operator has on the basis vectors: in this case $X$ converts $|0rangle$ into $|1rangle$ and vice versa.



                    A couple of other examples:



                    $$Z = |0rangle langle0| - |1rangle langle1|$$



                    $$operatornameCNOT = |0 ranglelangle0| otimes I + |1 ranglelangle 1| otimes X = |00rangle langle00| + |01rangle langle01| + |11rangle langle10| + |10rangle langle11|$$






                    share|improve this answer











                    $endgroup$












                    • $begingroup$
                      For OP: a quick and intuitive way to derive the CNOT's outer product representation is to see what effect it has on the individual qubits. The CNOT flips the second qubit when the control qubit is $|1rangle$. When the control qubit is $|0rangle$ the second qubit remains intact, which is equivalent to applying the identity gate $I$. So we get $|0ranglelangle 0|otimes I$ for this. However, when the control qubit is $|1rangle$ we need to flip the second qubit's state i.e. we apply the $X$ gate to the second qubit. Thus, we get $|1ranglelangle 1|otimes X$ for this.
                      $endgroup$
                      – Sanchayan Dutta
                      Apr 27 at 20:33







                    • 1




                      $begingroup$
                      0 and 1 in one of the outer products in X-gate should be flipped, I tried editing myself but says "Edits must be at least 6 characters; is there something else to improve in this post?" And I think everything else is perfect, P.S. The accepted answer has same typo, cheers!
                      $endgroup$
                      – Hemant
                      3 hours ago










                    • $begingroup$
                      @Hemant Fixed, thank you!
                      $endgroup$
                      – Mariia Mykhailova
                      3 hours ago















                    3












                    $begingroup$

                    This might mean using the ketbra notation:



                    $$X = |1rangle langle0| + |0rangle langle1|$$



                    This notation describes the effect the operator has on the basis vectors: in this case $X$ converts $|0rangle$ into $|1rangle$ and vice versa.



                    A couple of other examples:



                    $$Z = |0rangle langle0| - |1rangle langle1|$$



                    $$operatornameCNOT = |0 ranglelangle0| otimes I + |1 ranglelangle 1| otimes X = |00rangle langle00| + |01rangle langle01| + |11rangle langle10| + |10rangle langle11|$$






                    share|improve this answer











                    $endgroup$












                    • $begingroup$
                      For OP: a quick and intuitive way to derive the CNOT's outer product representation is to see what effect it has on the individual qubits. The CNOT flips the second qubit when the control qubit is $|1rangle$. When the control qubit is $|0rangle$ the second qubit remains intact, which is equivalent to applying the identity gate $I$. So we get $|0ranglelangle 0|otimes I$ for this. However, when the control qubit is $|1rangle$ we need to flip the second qubit's state i.e. we apply the $X$ gate to the second qubit. Thus, we get $|1ranglelangle 1|otimes X$ for this.
                      $endgroup$
                      – Sanchayan Dutta
                      Apr 27 at 20:33







                    • 1




                      $begingroup$
                      0 and 1 in one of the outer products in X-gate should be flipped, I tried editing myself but says "Edits must be at least 6 characters; is there something else to improve in this post?" And I think everything else is perfect, P.S. The accepted answer has same typo, cheers!
                      $endgroup$
                      – Hemant
                      3 hours ago










                    • $begingroup$
                      @Hemant Fixed, thank you!
                      $endgroup$
                      – Mariia Mykhailova
                      3 hours ago













                    3












                    3








                    3





                    $begingroup$

                    This might mean using the ketbra notation:



                    $$X = |1rangle langle0| + |0rangle langle1|$$



                    This notation describes the effect the operator has on the basis vectors: in this case $X$ converts $|0rangle$ into $|1rangle$ and vice versa.



                    A couple of other examples:



                    $$Z = |0rangle langle0| - |1rangle langle1|$$



                    $$operatornameCNOT = |0 ranglelangle0| otimes I + |1 ranglelangle 1| otimes X = |00rangle langle00| + |01rangle langle01| + |11rangle langle10| + |10rangle langle11|$$






                    share|improve this answer











                    $endgroup$



                    This might mean using the ketbra notation:



                    $$X = |1rangle langle0| + |0rangle langle1|$$



                    This notation describes the effect the operator has on the basis vectors: in this case $X$ converts $|0rangle$ into $|1rangle$ and vice versa.



                    A couple of other examples:



                    $$Z = |0rangle langle0| - |1rangle langle1|$$



                    $$operatornameCNOT = |0 ranglelangle0| otimes I + |1 ranglelangle 1| otimes X = |00rangle langle00| + |01rangle langle01| + |11rangle langle10| + |10rangle langle11|$$







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited 3 hours ago

























                    answered Apr 27 at 19:25









                    Mariia MykhailovaMariia Mykhailova

                    1,9501212




                    1,9501212











                    • $begingroup$
                      For OP: a quick and intuitive way to derive the CNOT's outer product representation is to see what effect it has on the individual qubits. The CNOT flips the second qubit when the control qubit is $|1rangle$. When the control qubit is $|0rangle$ the second qubit remains intact, which is equivalent to applying the identity gate $I$. So we get $|0ranglelangle 0|otimes I$ for this. However, when the control qubit is $|1rangle$ we need to flip the second qubit's state i.e. we apply the $X$ gate to the second qubit. Thus, we get $|1ranglelangle 1|otimes X$ for this.
                      $endgroup$
                      – Sanchayan Dutta
                      Apr 27 at 20:33







                    • 1




                      $begingroup$
                      0 and 1 in one of the outer products in X-gate should be flipped, I tried editing myself but says "Edits must be at least 6 characters; is there something else to improve in this post?" And I think everything else is perfect, P.S. The accepted answer has same typo, cheers!
                      $endgroup$
                      – Hemant
                      3 hours ago










                    • $begingroup$
                      @Hemant Fixed, thank you!
                      $endgroup$
                      – Mariia Mykhailova
                      3 hours ago
















                    • $begingroup$
                      For OP: a quick and intuitive way to derive the CNOT's outer product representation is to see what effect it has on the individual qubits. The CNOT flips the second qubit when the control qubit is $|1rangle$. When the control qubit is $|0rangle$ the second qubit remains intact, which is equivalent to applying the identity gate $I$. So we get $|0ranglelangle 0|otimes I$ for this. However, when the control qubit is $|1rangle$ we need to flip the second qubit's state i.e. we apply the $X$ gate to the second qubit. Thus, we get $|1ranglelangle 1|otimes X$ for this.
                      $endgroup$
                      – Sanchayan Dutta
                      Apr 27 at 20:33







                    • 1




                      $begingroup$
                      0 and 1 in one of the outer products in X-gate should be flipped, I tried editing myself but says "Edits must be at least 6 characters; is there something else to improve in this post?" And I think everything else is perfect, P.S. The accepted answer has same typo, cheers!
                      $endgroup$
                      – Hemant
                      3 hours ago










                    • $begingroup$
                      @Hemant Fixed, thank you!
                      $endgroup$
                      – Mariia Mykhailova
                      3 hours ago















                    $begingroup$
                    For OP: a quick and intuitive way to derive the CNOT's outer product representation is to see what effect it has on the individual qubits. The CNOT flips the second qubit when the control qubit is $|1rangle$. When the control qubit is $|0rangle$ the second qubit remains intact, which is equivalent to applying the identity gate $I$. So we get $|0ranglelangle 0|otimes I$ for this. However, when the control qubit is $|1rangle$ we need to flip the second qubit's state i.e. we apply the $X$ gate to the second qubit. Thus, we get $|1ranglelangle 1|otimes X$ for this.
                    $endgroup$
                    – Sanchayan Dutta
                    Apr 27 at 20:33





                    $begingroup$
                    For OP: a quick and intuitive way to derive the CNOT's outer product representation is to see what effect it has on the individual qubits. The CNOT flips the second qubit when the control qubit is $|1rangle$. When the control qubit is $|0rangle$ the second qubit remains intact, which is equivalent to applying the identity gate $I$. So we get $|0ranglelangle 0|otimes I$ for this. However, when the control qubit is $|1rangle$ we need to flip the second qubit's state i.e. we apply the $X$ gate to the second qubit. Thus, we get $|1ranglelangle 1|otimes X$ for this.
                    $endgroup$
                    – Sanchayan Dutta
                    Apr 27 at 20:33





                    1




                    1




                    $begingroup$
                    0 and 1 in one of the outer products in X-gate should be flipped, I tried editing myself but says "Edits must be at least 6 characters; is there something else to improve in this post?" And I think everything else is perfect, P.S. The accepted answer has same typo, cheers!
                    $endgroup$
                    – Hemant
                    3 hours ago




                    $begingroup$
                    0 and 1 in one of the outer products in X-gate should be flipped, I tried editing myself but says "Edits must be at least 6 characters; is there something else to improve in this post?" And I think everything else is perfect, P.S. The accepted answer has same typo, cheers!
                    $endgroup$
                    – Hemant
                    3 hours ago












                    $begingroup$
                    @Hemant Fixed, thank you!
                    $endgroup$
                    – Mariia Mykhailova
                    3 hours ago




                    $begingroup$
                    @Hemant Fixed, thank you!
                    $endgroup$
                    – Mariia Mykhailova
                    3 hours ago

















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Quantum Computing Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    Use MathJax to format equations. MathJax reference.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fquantumcomputing.stackexchange.com%2fquestions%2f5989%2fwhat-does-it-mean-to-express-a-gate-in-dirac-notation%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                    Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?