Lecture 4

Today we talked about the history of computation. After Goedel's theorem (1930) showing there were unprovable and provable theorems, four papers appeared (1936) showing there were computable and uncomputable functions. These contained four different definitions of computation [Church/Kleene/Turing/Post], three of which looked very different, but all of which were equivalent. This led to the Church-Turing thesis, which nowadays is usually phrased as

All computable functions can be computed by a Turing machine.
If this is intended as a definition of computable functions, it's a tautology. If computable functions is defined via the lambda calculus or recursively enumerable functions, this is a theorem. If computable is left undefined, then it's a thesis, and it is really at bottom a statement about physics.

We then talked about efficiently computable functions and the complexity classes P (polynomial-time computable), NP (polynomial-time verifiable), and PSPACE (polynomial-space computable). There is an extension of the Church-Turing thesis, given various names, which says that the class P remains the same on all reasonable machines. This is (probably) violated by quantum computation. [I say probably because nobody has actually proved that P ≠ PSPACE, and polynomial-time quantum computation is sandwiched in between these complexity classes.]

Then we talked about the circuit model of computation. For universal computation, besides the AND and NOT gates that everybody knows about, there's one assumed gate that nobody talks about: FANOUT (or COPY). This gate becomes much more important when talking about quantum computation.

I then talked about reversible computation, which will be essential for quantum computing, since quantum mechanics is reversible. The well-known gates mentioned above cannot provide reversible universal computation. All one- and two-bit reversible gates are linear Boolean functions. For reversible universal computation, you need a three-bit gate. We mentioned the Toffoli gate, which passes the first two qubits unchanged and does a controlled controlled NOT to the third.

[x, y, z] → [x, y, z ⊕ (x∧y)]
where ⊕ is XOR and ∧ is AND.

The Toffoli gate passes the first two bits unchanged and does a controlled controlled NOT to the third.

[x, y, z] ⇒ [x, y, z ⊕ (x ∧ y)]
where ⊕ is XOR and ∧ is AND. This gate is computationally universal. We proved that if there is a non-reversible circuit with n gates which takes a bitstring x to a bitstring y = f(x), then there is a circuit made of O(n) Toffoli gates which takes
x ⋅ 0a1b ⇒ x ⋅ f(x) ⋅ 0a'1b'
Here, ⋅ is the concatenation operator. Thus, if you can compute f efficiently, you can compute f efficiently with a reversible circult as long as you keep the input around. In this construction, there is no "garbage." That is, at both the start and end of the computation, the work bits (the ones that are not involved in the input or the output) are fixed, so we can take them to be 0a1b for some numbers a and b that do not depend on the input.

Further, if there is a non-reversible circuit for f with n gates, and for f -1 with n' gates, then there is a circuit made of O(n+n') Toffoli gates which takes

x ⋅ 0a1b ⇒ f(x) ⋅ 0a'1b',
so if you can do both f and f -1 efficiently, you can take x to f(x) efficiently without keeping the input around.