In everyday life, we usually have a good intuition regarding how the physical world will behave. Drop a glass and it will smash on the floor. Punch a concrete wall and your fist won’t go through it. But in the world of the ultra-small – atoms and electrons – none of the normal rules apply. Instead particles follow quantum rules that are quite baffling.
Like a bit, a qubit can be in one of its two states, labelled 0 or 1, but unlike a bit, a qubit can also be in a superposition of 0 and 1. Superposition is a subtle concept. Measuring a qubit always gives either 0 or 1, but superpositions can be manipulated beforehand so that one of the two outcomes is more likely.
Multiple qubits together can be put into more complicated superpositions. Measuring the qubits always gives a binary string of 0s and 1s, but the likelihood of what string appears can be controlled beforehand, and this is what a quantum computer does.
In fact, quantum computers work by first creating a superposition of lots of different possible solutions to a problem – encoded in qubits – and then manipulating that superposition so that wrong solutions cancel out and right ones are strengthened. This is because the alternatives in a superposition can interfere like waves do. This makes the right answer much more likely to appear when you measure the qubits. For certain types of problems, these two steps can be completed very quickly – outperforming any ordinary computer in solving the original problem.