This chapter covers:
- Why random numbers are an important resource.
- What is a qubit?
- What are the basic operations we can perform on a qubit?
- How to program a quantum random number generator in Python.
In this chapter, we are going to start to get our feet wet with some quantum programming concepts. The main concept we will explore is the qubit, the quantum analogue of a classical bit. We use qubits as an abstraction or model to describe the new kinds of computing that are possible with quantum physics. To help learn about what qubits are and how we interact with them, we will use an example of how they are being used today: random number generation. While we can build up much more interesting devices from these qubits, the simple example of a quantum random number generator (QRNG) will be a good way to get familiar with the qubit!
Humans like certainty. We like it when we press a key on our keyboard and it does the same thing every time. However, there are some contexts in which we do want randomness.
- Playing games
- Simulating complex systems (e.g.: stock market)
- Picking secure secrets (e.g.: passwords and cryptographic keys)