This post is a continuation of "The Universe in Four Easy Operations." I apologize for the long delay everyone.
Qubits are quantum mechanical analogs to classical bits discussed in the last post. Nuclear spins are often used as qubits in quantum computation. "Spin up" is conventionally represented by the symbol 0> and "spin down" is represented by 1>. These spins also correspond to waves. A wave moving counterclockwise is conventionally 0> and clockwise waves are 1>. -0> is 180 degrees out of phase from 0>.Superpositions of these waves also exist. 0> + 1> represents rotation around the axis perpendicular to the "up-down" axis. 0> - 1> is rotation around that same axis, except in the opposite direction.
The Double Slit Experiment
The double slit experiment can be performed with an electron beam, a screen with two slits that can be opened and closed, and a photographic plate to detect the impact of incoming electrons. When either of the slits are closed, the electrons behave like classical particles and pass through only the open slit. When both slits are opened an interference pattern appears on the photographic plate, as if the electrons passed through both slits at once, a wave-like behavior. When a photodetector is placed at one or both of the slits the interference pattern disappears, even when the experiment is performed with both slits open. The ability of the environment to remove the wave-like behavior of matter is known as decoherence. Decoherence localizes the position of macroscopic bodies through the many intereactions of such bodies with the environment. As a result, classical behaviour arises. The Heisenberg uncertainty principle applies to the waves-particle duality of quantum particles. The more accurately one can describe the speed of a particle the less can be known about its position, and vice versa. The same is true with the axes of nuclear spin.
Quantum Computation Operations and Entanglement
Applying a magnetic field to a nuclear spin changes the direction of the spin. The longer the field is applied to the spin, the more the direction of the spin is changed. Eventually the spin returns to its originally orientation. Applying the field for half the time it would take to return to the original orientation would displace the orientation of the spin by 180 degrees, applying the field for a quarter of the time would result in a spin 90 degrees out of phase, and so on. Qubit states are reversible in this manner, just as classical bits are reversible. Qubits can be correlated by performing controlled NOT operations just as classical bits can. However, one of the properties of quantum mechanics that would be counterintuitive from a classical perspective is that interacting qubits can create new bits of entropy. Suppose that a qubit is initially in the superposition 0> + 1>. A controlled NOT operation is performed which correlates a second qubit with the control, resulting in 00> + 11>. If the operation is reversed on either component, the qubit will be found to be in a random state. This is a disturbance of a quantum system due to measurement. If the operation is reversed on both components of the correlated superposition, the initial state of the qubit is restored. In other words, when the qubits were in the 00> + 11> superposition, they were in a known state which contained no bits of entropy. But each qubit on its own is in a random state, with one bit of entropy each. This is known as entanglement, and this is how new information is created in the universe. Seth Lloyd's book "Programming the Universe" contains a more detailed discussion of the these topics.