# Do quantum logic gates work differently than traditional logic gates?

In a traditional computer calculations are done with logic gates that check inputs with AND gates etc. But in a quantum computer, are calculations performed differently since the qubit can be in states other than 1 or 0? I understand that qubits can have values other than 1 and 0, however, before it is used as input into a logic gate, does the qubit need to be observed and defined as either a 1 or a 0? Or is the logic gates used in a quantum computer fundamentally different from a traditional computer?

• Welcome to CS.SE! What research have you done? We expect you to do a significant amount of research on your own before asking (e.g., check out standard resources like Wikipedia and/or a textbook), and tell us in the question what you've found so far and what you're stuck on. Have you looked at en.wikipedia.org/wiki/Quantum_computing?
– D.W.
Oct 30, 2016 at 20:42
• Some phrases in the article are too foreign to me and I can't comprehend it, I'm sorry. I'll go try to find a explanation in layman's terms.
– John
Oct 30, 2016 at 21:53

In layman's terms, the answer is yes: quantum gates are quite different from classical gates.

One reason is that quantum gates must be reversible. This practically means that AND gates don't even exist in the quantum world (at least, not in the same sense of a classical AND gate). Instead, there is a different set of gates (e.g., CNOT, TOFFOLI, FREDKIN, etc.) that allow to do all that is possible by quantum computing, without breaking the reversibility condition.

The other issue is what you hint in your question. Qubits can be "both in 0 and 1", and the quantum gate must take care of this. But this is not a problem, it just means that the output must be a superposition of 0 and 1. For instance, let's take a simple NOT gate. If the input is a "superposition" of 30% 0 and 70% 1, then the output becomes 70% of 0 and 30% of 1. Of course this is a very superficial explanation, and quite inaccurate, but the idea is exactly that.

Finally, no measurement is done in gates, unless the gate is a measurement gate (also, measurement is not reversible, so it cannot happen in "standard" gates)