# What difference does it make when universal classical gates in quantum computation are reversible but not unitary?

As I've come across Grovers algorithm I dont understand why when computing F(X), which is an oracle function people use classical reversible circuits(toffoli, fredkin) to evaluate the circuit. Why can't it just be done using classical logic gates(and, or, etc) when the function doesn't have any thing to do with changing the superposition of the bits.

• basically toffoli gates can implement classical logic via quantum gates. the opposite is not possible.
– vzn
Jul 24, 2014 at 19:15

Reversible gates are unitary, see for example https://en.wikipedia.org/wiki/Quantum_gate. The eigenvalues are $\pm 1$. The quantum computation model requires all gates to be unitary, so you can't just use classical gates.

• But this says toffoli is not unitary. I'm confused.
– CSK
Jul 24, 2014 at 18:01
• No it doesn't. It says it's not universal, that is, you can't implement all unitary transformations using only this gate. Jul 24, 2014 at 18:05
• okay, so classical reversible gates is a subset of quantum gates? ie.,all quantum gates are unitary but all classical reversible gates are not.
– CSK
Jul 24, 2014 at 18:07
• This appears to be the case. Jul 24, 2014 at 18:08
• but note (as that other Q/A points out) toffoli gates are universal from the pov of classical circuits.
– vzn
Jul 24, 2014 at 18:30