Going from a circuit to the quantum state output of the circuitHow to construct matrix of regular and “flipped” 2-qubit CNOT?Why is it important to eliminate the garbage qubits?Why do we use ancilla qubits for error syndrome measurements?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?SWAP gate(s) in the $R(lambda^-1)$ step of the HHL circuit for $4times 4$ systemsDecomposition of arbitrary 2 qubit operatorCalculating measurement result of quantum swap circuitN&C quantum circuit for Grover's algorithmHow to derive a circuit from given equations?Approximating unitary matrices — restricted gatesetIs the intuition of quantum parallelism always correct?

How to remove something from the slug/url

In Pokémon Go, why does one of my Pikachu have an option to evolve, but another one doesn't?

Is it really ~648.69 km/s delta-v to "land" on the surface of the Sun?

I want to copy my HOME folder to a USB flash drive but I can't. I accidentally removed Python 3 and lost many important stuff

Why are the inside diameters of some pipe larger than the stated size?

Why does this Pokémon I just hatched need to be healed?

How to identify the wires on the dimmer to convert it to Conventional on/off switch

When "he's gone" means "he's dead", is it a contraction of "he is" or "he has"?

Colleagues speaking another language and it impacts work

Is this cheap "air conditioner" able to cool a room?

Dereferencing a pointer in a for loop initializer creates a seg fault

How to say "fit" in Latin?

Are there any financial disadvantages to living significantly "below your means"?

Double blind peer review when paper cites author's GitHub repo for code

Geometric programming: Why are the constraints defined to be less than/equal to 1?

How many different ways are there to checkmate in the early game?

How do I calculate the difference in lens reach between a superzoom compact and a DSLR zoom lens?

Why is there a need to prevent a racist, sexist, or otherwise bigoted vendor from discriminating who they sell to?

Is multiplication of real numbers uniquely defined as being distributive over addition?

What are good ways to improve as a writer other than writing courses?

What happen if I gain the control of aura that enchants an opponent's creature? Would the aura stay attached?

Generator for parity?

Looking for a new job because of relocation - is it okay to tell the real reason?

Is The Lion King live action film made in motion capture?



Going from a circuit to the quantum state output of the circuit


How to construct matrix of regular and “flipped” 2-qubit CNOT?Why is it important to eliminate the garbage qubits?Why do we use ancilla qubits for error syndrome measurements?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?SWAP gate(s) in the $R(lambda^-1)$ step of the HHL circuit for $4times 4$ systemsDecomposition of arbitrary 2 qubit operatorCalculating measurement result of quantum swap circuitN&C quantum circuit for Grover's algorithmHow to derive a circuit from given equations?Approximating unitary matrices — restricted gatesetIs the intuition of quantum parallelism always correct?






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








3












$begingroup$


I'm looking at the following lecture notes where we start with the circuit below for some state $vertpsirangle_L$ that picks up an error to become $Evertpsirangle_L$



enter image description here



It is later claimed in the notes that the syndrome extraction part of the circuit can be represented by the following operation on $Evertpsirangle_L$.



$$E|psirangle_L|0rangle_A rightarrow frac12left(I_1 I_2+Z_1 Z_2right) E|psirangle_L|0rangle_A+frac12left(I_1I_2-Z_1 Z_2right) E|psirangle_L|1rangle_A$$



How does one see this? I can write the Hadamard and the control $Z_1Z_2$ gates as 8x8 matrices but this seems like a tedious way to do it. The alternative is to express the control $Z_1Z_2$ gates using something like this answer. However, I was unable to do it this way either.



So the question is - how do I see that the following line is true just by looking at the circuit?



$$E|psirangle_L|0rangle_A rightarrow frac12left(I_1 I_2+Z_1 Z_2right) E|psirangle_L|0rangle_A+frac12left(I_1I_2-Z_1 Z_2right) E|psirangle_L|1rangle_A$$










share|improve this question









$endgroup$




















    3












    $begingroup$


    I'm looking at the following lecture notes where we start with the circuit below for some state $vertpsirangle_L$ that picks up an error to become $Evertpsirangle_L$



    enter image description here



    It is later claimed in the notes that the syndrome extraction part of the circuit can be represented by the following operation on $Evertpsirangle_L$.



    $$E|psirangle_L|0rangle_A rightarrow frac12left(I_1 I_2+Z_1 Z_2right) E|psirangle_L|0rangle_A+frac12left(I_1I_2-Z_1 Z_2right) E|psirangle_L|1rangle_A$$



    How does one see this? I can write the Hadamard and the control $Z_1Z_2$ gates as 8x8 matrices but this seems like a tedious way to do it. The alternative is to express the control $Z_1Z_2$ gates using something like this answer. However, I was unable to do it this way either.



    So the question is - how do I see that the following line is true just by looking at the circuit?



    $$E|psirangle_L|0rangle_A rightarrow frac12left(I_1 I_2+Z_1 Z_2right) E|psirangle_L|0rangle_A+frac12left(I_1I_2-Z_1 Z_2right) E|psirangle_L|1rangle_A$$










    share|improve this question









    $endgroup$
















      3












      3








      3





      $begingroup$


      I'm looking at the following lecture notes where we start with the circuit below for some state $vertpsirangle_L$ that picks up an error to become $Evertpsirangle_L$



      enter image description here



      It is later claimed in the notes that the syndrome extraction part of the circuit can be represented by the following operation on $Evertpsirangle_L$.



      $$E|psirangle_L|0rangle_A rightarrow frac12left(I_1 I_2+Z_1 Z_2right) E|psirangle_L|0rangle_A+frac12left(I_1I_2-Z_1 Z_2right) E|psirangle_L|1rangle_A$$



      How does one see this? I can write the Hadamard and the control $Z_1Z_2$ gates as 8x8 matrices but this seems like a tedious way to do it. The alternative is to express the control $Z_1Z_2$ gates using something like this answer. However, I was unable to do it this way either.



      So the question is - how do I see that the following line is true just by looking at the circuit?



      $$E|psirangle_L|0rangle_A rightarrow frac12left(I_1 I_2+Z_1 Z_2right) E|psirangle_L|0rangle_A+frac12left(I_1I_2-Z_1 Z_2right) E|psirangle_L|1rangle_A$$










      share|improve this question









      $endgroup$




      I'm looking at the following lecture notes where we start with the circuit below for some state $vertpsirangle_L$ that picks up an error to become $Evertpsirangle_L$



      enter image description here



      It is later claimed in the notes that the syndrome extraction part of the circuit can be represented by the following operation on $Evertpsirangle_L$.



      $$E|psirangle_L|0rangle_A rightarrow frac12left(I_1 I_2+Z_1 Z_2right) E|psirangle_L|0rangle_A+frac12left(I_1I_2-Z_1 Z_2right) E|psirangle_L|1rangle_A$$



      How does one see this? I can write the Hadamard and the control $Z_1Z_2$ gates as 8x8 matrices but this seems like a tedious way to do it. The alternative is to express the control $Z_1Z_2$ gates using something like this answer. However, I was unable to do it this way either.



      So the question is - how do I see that the following line is true just by looking at the circuit?



      $$E|psirangle_L|0rangle_A rightarrow frac12left(I_1 I_2+Z_1 Z_2right) E|psirangle_L|0rangle_A+frac12left(I_1I_2-Z_1 Z_2right) E|psirangle_L|1rangle_A$$







      quantum-gate error-correction






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 29 at 16:09









      user1936752user1936752

      3086 bronze badges




      3086 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          5












          $begingroup$

          Let's represent controlled $Z_1Z_2$ gate in the projector formalism, as described in this answer:



          $$C_AZ_1Z_2 = |0ranglelangle0|_A I_1I_2 + |1ranglelangle1|_A Z_1Z_2 $$



          This just tells you to apply identity gates to qubits 1 and 2 if the ancilla is in the $|0rangle$ state and to apply Z gates to qubits 1 and 2 if the ancilla is in the $|1rangle$ state - which is the definition of the controlled gate.



          Now let's apply this to the state $colorblue_AE|psirangle_L$ (this is the state of the system after the first Hadamard gate of syndrome extraction):



          $$C_AZ_1Z_2 big( colorblue_AE|psirangle_L big) = big( colorblue_A I_1I_2 + colorblue1ranglelangle1_A Z_1Z_2 big) bigg( frac1sqrt2colorblue0rangle + _AE|psirangle_L bigg) = $$



          $$= frac1sqrt2 big( colorblue0rangle_A otimes I_1I_2 E|psirangle_L + colorblue1rangle_A otimes Z_1Z_2 E|psirangle_L big)$$



          Finally, apply the last Hadamard gate to the ancilla; after that the state of the system becomes



          $$frac1sqrt2 big( colorblue_A otimes I_1I_2 E|psirangle_L + colorblue-rangle_A otimes Z_1Z_2 E|psirangle_L big) = $$



          $$= frac12 big( colorblue0rangle + _A otimes I_1I_2 E|psirangle_L + colorblue0rangle - _A otimes Z_1Z_2 E|psirangle_L big) = $$



          (after reordering the terms and grouping same ancilla states together)



          $$= frac12 colorblue0rangle_A otimes left(I_1 I_2+Z_1 Z_2right) E|psirangle_L + frac12 colorblue1rangle_A otimes left(I_1I_2-Z_1 Z_2right) E|psirangle_L$$



          which is exactly the state you need to get.






          share|improve this answer









          $endgroup$

















            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%2f6895%2fgoing-from-a-circuit-to-the-quantum-state-output-of-the-circuit%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            5












            $begingroup$

            Let's represent controlled $Z_1Z_2$ gate in the projector formalism, as described in this answer:



            $$C_AZ_1Z_2 = |0ranglelangle0|_A I_1I_2 + |1ranglelangle1|_A Z_1Z_2 $$



            This just tells you to apply identity gates to qubits 1 and 2 if the ancilla is in the $|0rangle$ state and to apply Z gates to qubits 1 and 2 if the ancilla is in the $|1rangle$ state - which is the definition of the controlled gate.



            Now let's apply this to the state $colorblue_AE|psirangle_L$ (this is the state of the system after the first Hadamard gate of syndrome extraction):



            $$C_AZ_1Z_2 big( colorblue_AE|psirangle_L big) = big( colorblue_A I_1I_2 + colorblue1ranglelangle1_A Z_1Z_2 big) bigg( frac1sqrt2colorblue0rangle + _AE|psirangle_L bigg) = $$



            $$= frac1sqrt2 big( colorblue0rangle_A otimes I_1I_2 E|psirangle_L + colorblue1rangle_A otimes Z_1Z_2 E|psirangle_L big)$$



            Finally, apply the last Hadamard gate to the ancilla; after that the state of the system becomes



            $$frac1sqrt2 big( colorblue_A otimes I_1I_2 E|psirangle_L + colorblue-rangle_A otimes Z_1Z_2 E|psirangle_L big) = $$



            $$= frac12 big( colorblue0rangle + _A otimes I_1I_2 E|psirangle_L + colorblue0rangle - _A otimes Z_1Z_2 E|psirangle_L big) = $$



            (after reordering the terms and grouping same ancilla states together)



            $$= frac12 colorblue0rangle_A otimes left(I_1 I_2+Z_1 Z_2right) E|psirangle_L + frac12 colorblue1rangle_A otimes left(I_1I_2-Z_1 Z_2right) E|psirangle_L$$



            which is exactly the state you need to get.






            share|improve this answer









            $endgroup$



















              5












              $begingroup$

              Let's represent controlled $Z_1Z_2$ gate in the projector formalism, as described in this answer:



              $$C_AZ_1Z_2 = |0ranglelangle0|_A I_1I_2 + |1ranglelangle1|_A Z_1Z_2 $$



              This just tells you to apply identity gates to qubits 1 and 2 if the ancilla is in the $|0rangle$ state and to apply Z gates to qubits 1 and 2 if the ancilla is in the $|1rangle$ state - which is the definition of the controlled gate.



              Now let's apply this to the state $colorblue_AE|psirangle_L$ (this is the state of the system after the first Hadamard gate of syndrome extraction):



              $$C_AZ_1Z_2 big( colorblue_AE|psirangle_L big) = big( colorblue_A I_1I_2 + colorblue1ranglelangle1_A Z_1Z_2 big) bigg( frac1sqrt2colorblue0rangle + _AE|psirangle_L bigg) = $$



              $$= frac1sqrt2 big( colorblue0rangle_A otimes I_1I_2 E|psirangle_L + colorblue1rangle_A otimes Z_1Z_2 E|psirangle_L big)$$



              Finally, apply the last Hadamard gate to the ancilla; after that the state of the system becomes



              $$frac1sqrt2 big( colorblue_A otimes I_1I_2 E|psirangle_L + colorblue-rangle_A otimes Z_1Z_2 E|psirangle_L big) = $$



              $$= frac12 big( colorblue0rangle + _A otimes I_1I_2 E|psirangle_L + colorblue0rangle - _A otimes Z_1Z_2 E|psirangle_L big) = $$



              (after reordering the terms and grouping same ancilla states together)



              $$= frac12 colorblue0rangle_A otimes left(I_1 I_2+Z_1 Z_2right) E|psirangle_L + frac12 colorblue1rangle_A otimes left(I_1I_2-Z_1 Z_2right) E|psirangle_L$$



              which is exactly the state you need to get.






              share|improve this answer









              $endgroup$

















                5












                5








                5





                $begingroup$

                Let's represent controlled $Z_1Z_2$ gate in the projector formalism, as described in this answer:



                $$C_AZ_1Z_2 = |0ranglelangle0|_A I_1I_2 + |1ranglelangle1|_A Z_1Z_2 $$



                This just tells you to apply identity gates to qubits 1 and 2 if the ancilla is in the $|0rangle$ state and to apply Z gates to qubits 1 and 2 if the ancilla is in the $|1rangle$ state - which is the definition of the controlled gate.



                Now let's apply this to the state $colorblue_AE|psirangle_L$ (this is the state of the system after the first Hadamard gate of syndrome extraction):



                $$C_AZ_1Z_2 big( colorblue_AE|psirangle_L big) = big( colorblue_A I_1I_2 + colorblue1ranglelangle1_A Z_1Z_2 big) bigg( frac1sqrt2colorblue0rangle + _AE|psirangle_L bigg) = $$



                $$= frac1sqrt2 big( colorblue0rangle_A otimes I_1I_2 E|psirangle_L + colorblue1rangle_A otimes Z_1Z_2 E|psirangle_L big)$$



                Finally, apply the last Hadamard gate to the ancilla; after that the state of the system becomes



                $$frac1sqrt2 big( colorblue_A otimes I_1I_2 E|psirangle_L + colorblue-rangle_A otimes Z_1Z_2 E|psirangle_L big) = $$



                $$= frac12 big( colorblue0rangle + _A otimes I_1I_2 E|psirangle_L + colorblue0rangle - _A otimes Z_1Z_2 E|psirangle_L big) = $$



                (after reordering the terms and grouping same ancilla states together)



                $$= frac12 colorblue0rangle_A otimes left(I_1 I_2+Z_1 Z_2right) E|psirangle_L + frac12 colorblue1rangle_A otimes left(I_1I_2-Z_1 Z_2right) E|psirangle_L$$



                which is exactly the state you need to get.






                share|improve this answer









                $endgroup$



                Let's represent controlled $Z_1Z_2$ gate in the projector formalism, as described in this answer:



                $$C_AZ_1Z_2 = |0ranglelangle0|_A I_1I_2 + |1ranglelangle1|_A Z_1Z_2 $$



                This just tells you to apply identity gates to qubits 1 and 2 if the ancilla is in the $|0rangle$ state and to apply Z gates to qubits 1 and 2 if the ancilla is in the $|1rangle$ state - which is the definition of the controlled gate.



                Now let's apply this to the state $colorblue_AE|psirangle_L$ (this is the state of the system after the first Hadamard gate of syndrome extraction):



                $$C_AZ_1Z_2 big( colorblue_AE|psirangle_L big) = big( colorblue_A I_1I_2 + colorblue1ranglelangle1_A Z_1Z_2 big) bigg( frac1sqrt2colorblue0rangle + _AE|psirangle_L bigg) = $$



                $$= frac1sqrt2 big( colorblue0rangle_A otimes I_1I_2 E|psirangle_L + colorblue1rangle_A otimes Z_1Z_2 E|psirangle_L big)$$



                Finally, apply the last Hadamard gate to the ancilla; after that the state of the system becomes



                $$frac1sqrt2 big( colorblue_A otimes I_1I_2 E|psirangle_L + colorblue-rangle_A otimes Z_1Z_2 E|psirangle_L big) = $$



                $$= frac12 big( colorblue0rangle + _A otimes I_1I_2 E|psirangle_L + colorblue0rangle - _A otimes Z_1Z_2 E|psirangle_L big) = $$



                (after reordering the terms and grouping same ancilla states together)



                $$= frac12 colorblue0rangle_A otimes left(I_1 I_2+Z_1 Z_2right) E|psirangle_L + frac12 colorblue1rangle_A otimes left(I_1I_2-Z_1 Z_2right) E|psirangle_L$$



                which is exactly the state you need to get.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jul 29 at 18:53









                Mariia MykhailovaMariia Mykhailova

                3,2751 gold badge3 silver badges20 bronze badges




                3,2751 gold badge3 silver badges20 bronze badges






























                    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%2f6895%2fgoing-from-a-circuit-to-the-quantum-state-output-of-the-circuit%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

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

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

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form