concept this program in category quantum computing
appears as: this program

This is an excerpt from Manning's book Quantum Computing for Developers: A Java-based introduction.
If you run this program once, you will either see
In a naive approach, Alice would create a sequence of qubits that hold either the value of |0⟩ or |1⟩ and send those to Bob. Bob would then measure the qubits, thereby getting the original sequence of bits created by Alice. The sequence of qubits created by Alice (which can be done by using random bits) is the secret key, and after Bob measures the qubits, he has the same secret key as Alice. Alice and Bob can then use this secret key as a one-time pad, as explained in the previous section.