5.8 Quantum randomness
In this chapter, we’ve seen that there are many ways of writing different
kinds of numbers. For integers, we have decimal, binary, and hexadecimal. For floating-point,
there are digits with a decimal point and scientific notation. For complex numbers, we use
Python’s j
-syntax.
Qubits also have their special representation. Mathematically, we write the quantum state of a qubit as
a |0⟩ + b |1⟩
where a and b are complex numbers, and the sum of the squares of their absolute values is 1:
|a|2 + |b|2 = 1 .
An expression enclosed in the “vertical bar–greater than” symbol pair is called a ket. For example, you might see |φ⟩ in a text or an article. We pronounce this “ket-phi.” |0⟩ is ket-0 and |1⟩ is ket-1.
For computation, qubits don’t exist as independent, free-floating...