Tossing a quantum coin
One of the examples I use is what is arguably the simplest useful quantum program that you can build: a simulated coin toss.
We will go into more detail about the quantum coin toss in Chapter 4, Starting at the Ground Level with Terra, but I will use that program as an example here. It is very small, and not too complicated to understand.
As we discussed briefly in Chapter 2, Quantum Computing and Qubits with Python, a quantum computer, in contrast to a classical computer, provides you with probabilistic, or randomized, computation. In this case, we set up our qubit as a superposition that results in probabilities to get an outcome of 0 or 1, or heads or tails in coin toss nomenclature, when we measure the qubit.
How to do it...
Build the quantum circuit and then run it. This is the circuit we will come back to later in the book, on the Qiskit® side of things:
- Log in to IBM Quantum Experience® at https://quantum-computing.ibm...