In this section, we will discuss quantum measurement for multiple qubits and present an algorithm to simulate quantum measurement in Python.
In the previous chapter, we discussed quantum measurement for a single qubit.
Quantum measurement is a two-step process. First, we choose what basis we are performing the measurement in, and finally we choose what we are measuring and perform the measurement in that basis. The measurement of a qubit will always give us a state in the basis.
Quantum measurement for multiple qubits is no different. After measuring five qubits in the |"0"> and |"1"> basis, we will get five qubits, each either |"0"> or |"1">. So, there are 25 possible results of a measurement. The probability of each result depends on how the five qubits are entangled. After we measure the qubits, they are no longer entangled and we will always get the same result.