Quantum coin toss revisited
In this recipe, we will take a closer look at the very first quantum program we created in IBM Quantum Experience® – the quantum coin toss. Again, this is arguably the simplest quantum program that still provides real quantum computing value. It demonstrates the probabilistic nature of quantum computing. For a refresher, see Chapter 3, IBM Quantum Experience® – Quantum Drag and Drop.
In IBM Quantum Experience®, the coin toss program looked like this:
With the quantum coin toss, we will again use the Hadamard gate to create a quantum superposition, and a measurement gate to force the superposition to collapse into one of the two qubit states or , representing heads or tails. This time, however, we will create the circuit in Python with Qiskit®, which means that we need to also create the framework for the...