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

Quantum Computing gate matricies

  1. Feb 19, 2012 #1
    Hi there
    I am working through a quantum gate section of my course and I am a bit puzzled on how to calculate a matrix for consecutive quantum gates. I understand how to generate a matrix for

    Which is simply the tensor product of the hadamard and identity matrix. However I am unsure what to do if the circuit is modified to be have a CNOT gate after the hadamard gate with the top qubit as the control and the bottom as a target. i have tried adding the matricies but this doesn't seem to work. Thanks for your time
  2. jcsd
  3. Feb 19, 2012 #2
    You should do matrix multiplication(keeping in mind the order) not addition.

    The matrices represent operations (hence operators) done on the state. So if we take the input state as |in>, have state after the above circuit is (H x I)|in>, which is then the input to CNOT gate. So finally you get |out>=CNOT((H x I)|in>) which is equivalent to matrix multiplication of CNOT with H x I and |in>
  4. Feb 19, 2012 #3
    Thanks for your help!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook