oreilly-qc / oreilly-qc.github.io

Code samples for Programming Quantum Computers, from O'Reilly Media
135 stars 62 forks source link

Swaps lines 78 and 79 in ch04_01_basic_teleportation.js #9

Closed thequantumturtle closed 4 years ago

thequantumturtle commented 4 years ago

Fixes the bug when Alice measures |11> the wrong phase is teleported to Bob.

machinelevel commented 4 years ago

Yep, good catch. Thank you! Additionally, I'll update the "bob is asleep" and if() cases.

To verify, we can look at the state just before the measurement:

image