More ways to quantum-cheat – tweaking the odds
In the previous recipe, we used a quantum phenomenon called entanglement to cheat with our coin tossing. Admittedly, this might be complicated to set up, and people do tend to get suspicious of coin tossers with an earpiece who are obviously listening for information before catching and revealing the coin (measuring the qubit).
But there are more ways to skin a cat. Remember our discussion of qubits and quantum gates. By manipulating the qubit using gates, we could adjust the state of the qubit before we measure it. The closer the vector is to either or , the higher the probability of that specific outcome when you measure.
In this recipe, we will use a rotation gate, the Ry gate, to increase the probability of getting a tails outcome when we toss our coin.
Getting ready
The sample code for this recipe can be found here: https://github.com/PacktPublishing/Quantum-Computing-in-Practice-with-Qiskit-and-IBM-Quantum-Experience...