Why do we have to uncompute rather than simply set registers to zero?












3












$begingroup$


In implementing a quantum subroutine it is important to uncompute temporary registers after use, to ensure the output state of the subroutine is not entangled with them (which would affect its behaviour).



Why is it necessary to perform this through uncomputation rather than simply setting temporary registers to zero afterwards?










share|improve this question









$endgroup$












  • $begingroup$
    a related question on cstheory
    $endgroup$
    – glS
    2 hours ago
















3












$begingroup$


In implementing a quantum subroutine it is important to uncompute temporary registers after use, to ensure the output state of the subroutine is not entangled with them (which would affect its behaviour).



Why is it necessary to perform this through uncomputation rather than simply setting temporary registers to zero afterwards?










share|improve this question









$endgroup$












  • $begingroup$
    a related question on cstheory
    $endgroup$
    – glS
    2 hours ago














3












3








3





$begingroup$


In implementing a quantum subroutine it is important to uncompute temporary registers after use, to ensure the output state of the subroutine is not entangled with them (which would affect its behaviour).



Why is it necessary to perform this through uncomputation rather than simply setting temporary registers to zero afterwards?










share|improve this question









$endgroup$




In implementing a quantum subroutine it is important to uncompute temporary registers after use, to ensure the output state of the subroutine is not entangled with them (which would affect its behaviour).



Why is it necessary to perform this through uncomputation rather than simply setting temporary registers to zero afterwards?







quantum-state entanglement






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 5 hours ago









Sideshow BobSideshow Bob

1325




1325












  • $begingroup$
    a related question on cstheory
    $endgroup$
    – glS
    2 hours ago


















  • $begingroup$
    a related question on cstheory
    $endgroup$
    – glS
    2 hours ago
















$begingroup$
a related question on cstheory
$endgroup$
– glS
2 hours ago




$begingroup$
a related question on cstheory
$endgroup$
– glS
2 hours ago










2 Answers
2






active

oldest

votes


















1












$begingroup$

Because all operations you carry out (besides measurement) need to be unitary and this one would not.






share|improve this answer









$endgroup$









  • 1




    $begingroup$
    There is one thing you don't address in your answer --- why not use a measurement then, and then flip the bit if the outcome is 1? That would effectively reset the qubit. Not that this is actually a good idea, but could you elaborate your answer to describe why this is not a good idea?
    $endgroup$
    – Niel de Beaudrap
    2 hours ago










  • $begingroup$
    @NieldeBeaudrap If you measure you collapse into one possibility. But say you want to continue applying operations on this output state (in the register of interest)... you see why this is not a good idea?
    $endgroup$
    – cnada
    2 hours ago










  • $begingroup$
    My comment was that it is something you don't address, which is conspicuous given that 'resetting' the state is exactly what the OP asked about. While I know why it isn't a good idea, I'm not the one who asked the original question.
    $endgroup$
    – Niel de Beaudrap
    57 mins ago



















3












$begingroup$

Uncomputing temporary registers seems to me to be the most efficient way to set temporary registers back to zero.



You can't measure these and classically flip them. 1) because a measurement of 1 doesn't necessarily mean the the state of the temporary register is |1>. and 2) Measuring would cause entangled qubits to collapse into a corresponding state so that would defeat the purpose of uncomputing temporary registers that you mentioned in your question.



And somehow how implementing a circuit that detected a temporary register's state moved it back to 0 would be much more difficult than simply uncomputing the temporary register.






share|improve this answer











$endgroup$













    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',
    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%2f5222%2fwhy-do-we-have-to-uncompute-rather-than-simply-set-registers-to-zero%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









    1












    $begingroup$

    Because all operations you carry out (besides measurement) need to be unitary and this one would not.






    share|improve this answer









    $endgroup$









    • 1




      $begingroup$
      There is one thing you don't address in your answer --- why not use a measurement then, and then flip the bit if the outcome is 1? That would effectively reset the qubit. Not that this is actually a good idea, but could you elaborate your answer to describe why this is not a good idea?
      $endgroup$
      – Niel de Beaudrap
      2 hours ago










    • $begingroup$
      @NieldeBeaudrap If you measure you collapse into one possibility. But say you want to continue applying operations on this output state (in the register of interest)... you see why this is not a good idea?
      $endgroup$
      – cnada
      2 hours ago










    • $begingroup$
      My comment was that it is something you don't address, which is conspicuous given that 'resetting' the state is exactly what the OP asked about. While I know why it isn't a good idea, I'm not the one who asked the original question.
      $endgroup$
      – Niel de Beaudrap
      57 mins ago
















    1












    $begingroup$

    Because all operations you carry out (besides measurement) need to be unitary and this one would not.






    share|improve this answer









    $endgroup$









    • 1




      $begingroup$
      There is one thing you don't address in your answer --- why not use a measurement then, and then flip the bit if the outcome is 1? That would effectively reset the qubit. Not that this is actually a good idea, but could you elaborate your answer to describe why this is not a good idea?
      $endgroup$
      – Niel de Beaudrap
      2 hours ago










    • $begingroup$
      @NieldeBeaudrap If you measure you collapse into one possibility. But say you want to continue applying operations on this output state (in the register of interest)... you see why this is not a good idea?
      $endgroup$
      – cnada
      2 hours ago










    • $begingroup$
      My comment was that it is something you don't address, which is conspicuous given that 'resetting' the state is exactly what the OP asked about. While I know why it isn't a good idea, I'm not the one who asked the original question.
      $endgroup$
      – Niel de Beaudrap
      57 mins ago














    1












    1








    1





    $begingroup$

    Because all operations you carry out (besides measurement) need to be unitary and this one would not.






    share|improve this answer









    $endgroup$



    Because all operations you carry out (besides measurement) need to be unitary and this one would not.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 4 hours ago









    cnadacnada

    1,982212




    1,982212








    • 1




      $begingroup$
      There is one thing you don't address in your answer --- why not use a measurement then, and then flip the bit if the outcome is 1? That would effectively reset the qubit. Not that this is actually a good idea, but could you elaborate your answer to describe why this is not a good idea?
      $endgroup$
      – Niel de Beaudrap
      2 hours ago










    • $begingroup$
      @NieldeBeaudrap If you measure you collapse into one possibility. But say you want to continue applying operations on this output state (in the register of interest)... you see why this is not a good idea?
      $endgroup$
      – cnada
      2 hours ago










    • $begingroup$
      My comment was that it is something you don't address, which is conspicuous given that 'resetting' the state is exactly what the OP asked about. While I know why it isn't a good idea, I'm not the one who asked the original question.
      $endgroup$
      – Niel de Beaudrap
      57 mins ago














    • 1




      $begingroup$
      There is one thing you don't address in your answer --- why not use a measurement then, and then flip the bit if the outcome is 1? That would effectively reset the qubit. Not that this is actually a good idea, but could you elaborate your answer to describe why this is not a good idea?
      $endgroup$
      – Niel de Beaudrap
      2 hours ago










    • $begingroup$
      @NieldeBeaudrap If you measure you collapse into one possibility. But say you want to continue applying operations on this output state (in the register of interest)... you see why this is not a good idea?
      $endgroup$
      – cnada
      2 hours ago










    • $begingroup$
      My comment was that it is something you don't address, which is conspicuous given that 'resetting' the state is exactly what the OP asked about. While I know why it isn't a good idea, I'm not the one who asked the original question.
      $endgroup$
      – Niel de Beaudrap
      57 mins ago








    1




    1




    $begingroup$
    There is one thing you don't address in your answer --- why not use a measurement then, and then flip the bit if the outcome is 1? That would effectively reset the qubit. Not that this is actually a good idea, but could you elaborate your answer to describe why this is not a good idea?
    $endgroup$
    – Niel de Beaudrap
    2 hours ago




    $begingroup$
    There is one thing you don't address in your answer --- why not use a measurement then, and then flip the bit if the outcome is 1? That would effectively reset the qubit. Not that this is actually a good idea, but could you elaborate your answer to describe why this is not a good idea?
    $endgroup$
    – Niel de Beaudrap
    2 hours ago












    $begingroup$
    @NieldeBeaudrap If you measure you collapse into one possibility. But say you want to continue applying operations on this output state (in the register of interest)... you see why this is not a good idea?
    $endgroup$
    – cnada
    2 hours ago




    $begingroup$
    @NieldeBeaudrap If you measure you collapse into one possibility. But say you want to continue applying operations on this output state (in the register of interest)... you see why this is not a good idea?
    $endgroup$
    – cnada
    2 hours ago












    $begingroup$
    My comment was that it is something you don't address, which is conspicuous given that 'resetting' the state is exactly what the OP asked about. While I know why it isn't a good idea, I'm not the one who asked the original question.
    $endgroup$
    – Niel de Beaudrap
    57 mins ago




    $begingroup$
    My comment was that it is something you don't address, which is conspicuous given that 'resetting' the state is exactly what the OP asked about. While I know why it isn't a good idea, I'm not the one who asked the original question.
    $endgroup$
    – Niel de Beaudrap
    57 mins ago













    3












    $begingroup$

    Uncomputing temporary registers seems to me to be the most efficient way to set temporary registers back to zero.



    You can't measure these and classically flip them. 1) because a measurement of 1 doesn't necessarily mean the the state of the temporary register is |1>. and 2) Measuring would cause entangled qubits to collapse into a corresponding state so that would defeat the purpose of uncomputing temporary registers that you mentioned in your question.



    And somehow how implementing a circuit that detected a temporary register's state moved it back to 0 would be much more difficult than simply uncomputing the temporary register.






    share|improve this answer











    $endgroup$


















      3












      $begingroup$

      Uncomputing temporary registers seems to me to be the most efficient way to set temporary registers back to zero.



      You can't measure these and classically flip them. 1) because a measurement of 1 doesn't necessarily mean the the state of the temporary register is |1>. and 2) Measuring would cause entangled qubits to collapse into a corresponding state so that would defeat the purpose of uncomputing temporary registers that you mentioned in your question.



      And somehow how implementing a circuit that detected a temporary register's state moved it back to 0 would be much more difficult than simply uncomputing the temporary register.






      share|improve this answer











      $endgroup$
















        3












        3








        3





        $begingroup$

        Uncomputing temporary registers seems to me to be the most efficient way to set temporary registers back to zero.



        You can't measure these and classically flip them. 1) because a measurement of 1 doesn't necessarily mean the the state of the temporary register is |1>. and 2) Measuring would cause entangled qubits to collapse into a corresponding state so that would defeat the purpose of uncomputing temporary registers that you mentioned in your question.



        And somehow how implementing a circuit that detected a temporary register's state moved it back to 0 would be much more difficult than simply uncomputing the temporary register.






        share|improve this answer











        $endgroup$



        Uncomputing temporary registers seems to me to be the most efficient way to set temporary registers back to zero.



        You can't measure these and classically flip them. 1) because a measurement of 1 doesn't necessarily mean the the state of the temporary register is |1>. and 2) Measuring would cause entangled qubits to collapse into a corresponding state so that would defeat the purpose of uncomputing temporary registers that you mentioned in your question.



        And somehow how implementing a circuit that detected a temporary register's state moved it back to 0 would be much more difficult than simply uncomputing the temporary register.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 2 hours ago

























        answered 2 hours ago









        Malcolm ReganMalcolm Regan

        1697




        1697






























            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%2f5222%2fwhy-do-we-have-to-uncompute-rather-than-simply-set-registers-to-zero%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

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            TypeError: fit_transform() missing 1 required positional argument: 'X'