Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Gray codes

  1. Apr 28, 2015 #1
    I am trying to derive a quantum circuit that will implement an arbitrary unitary operation using single qubit gates and C-NOT gates only. I have already shown how to construct a controlled U operation where U is a single qubit unitary operation. Furthermore I have proven the universality of two-level unitary matrices. Now I wish to show that any two level unitary operation can be performed using C-NOT and controlled U operations. To do this I must introduce gray codes. I understand that a gray code is a sequence of binary strings [itex]\{x_1,x_2,...,x_n\}[/itex] where neighbouring members differ in one bit only. I can understand when looking at circuit diagrams how the use of Gray codes can be used to implement U however I am struggling to explain the motivation behind using Gray codes in the first place. I can also construct some examples of circuits that execute U that I would show here but it appears qcircuit isnt supported on the forum. Sorry this isn't a very direct question: essentially I'm asking why Gray codes are used in circuits that enact arbitrary two-level unitary operations.
  2. jcsd
  3. Apr 28, 2015 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    It's an artifact from the time when electromechanical switches were used in computing devices.

    This article may explain the reasoning behind the use of the Gray code:

  4. Apr 28, 2015 #3


    User Avatar
    Gold Member

    Although used originally for mechanical switches (as stated in the article linked to by steamking), where varying latency of switching is much greater than with electronic circuits, they have also been used in some digital electronics where it is very important that inputs to a multiplexor, for example, that have varying delay times, do not cause transient spikes in the output while switching states.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook