I am watching this video in which a programming language for quantum computing is introduced. There is code like this:
// Inside TeleportClassicalMessage function let msg = register; // Initialized to |0⟩ state let there = register; // Initialized to |0⟩ state // Inside Teleport function let here = register; // Initialized to |0⟩ state H(here); // here is now |+⟩ CNOT(here, there); // 'here' and 'there' are now entangled as the Bell state CNOT(msg, here); // What does this do?
For those of you not familiar with coding, what it seems to be doing is feeding $|+⟩$ (control) and $|0⟩$ (target) to a CNOT gate, which creates the entangled Bell state. Then it takes the first qubit out of that state,
here (without examining it), and feeds $|0⟩$ and
here to a CNOT gate again.
What exactly does this do?