The circuit entangles two qubits such that they have the same non-deterministic value, then observes both of them. Note that until the qubits are observed, they do not have a determined value, despite the fact that their values are guaranteed to match.
Changing the second qubit's input to 1 gives a circuit where the qubits are still entangled but their values are guaranteed to be opposite.
This is the simplest example of an observation changing the state of the system. Two Hadamard gates in row will cancel each other out if there is no observation in between.
If there is an observation, then the state collapses and the second Hadamard leaves the qubit in superposition.
Alice and Bob are assumed to share an entangled pair of qubits (the second and third wires). Alice has a qubit (the first wire) she wishes to send to Bob.
The first two sections of the circuit are setup. The first section puts Alice's qubit into a non-trivial state (you can change these gates to do whatever you want to the first qubit). The second section creates the entangled pair.
The rest of the circuit is the actual teleportation. Alice entangles the qubit she wants to send with her half of the entangled pair, then observes both of them (yielding two classical bits). She sends these classical bits to Bob, who performs up to two transformations on his qubit based on the values from Alice. At this point his qubit is in the same state that Alice's was when the computation started.
This circuit is a counterexample to the assumption that probabilities in quantum circuits are alway binary fractions. After the final observation, the state of the four qubits is either a superposition of three or five possibilities, each with a one-third probability or one-fifth probability, respectively.