# Quantum circuit simulation divergence in results

I'm learning about quantum computing in order to code a simulator. I tried the following circuit in Quirk

And ran the same circuit using OPENQASM 2.0:

Notice that the input is |11> in both cases, but it seems that the probabilities for 01 and 10 are switched. What I'm missing here? Thank you!

• Maybe Openqasm and Quirk have different conventions for the order of the qubits. Aug 14 '18 at 2:17

The reason I chose this order when making Quirk is because it makes the displays behave better when resizing. If you resize the chance display from 2-qubits to 3-qubits, and the third qubit is off, the original four outputs stay together in the top half instead of being spread apart. Also it's just the natural thing to do when programming: the wire at index k has weight 1<<k. Quirk's tendency to expand circuits and gates downward pushed it towards a "down means more/bigger" convention in other places as well, e.g. in the arithmetic circuits.