Already with a single qubit you can perform complicated operations, because you can make arbitrary superpositions of the two basis states. However, it only becomes interesting when you have a memory register with many qubits available. Now, operations such as the CNOT gate, linking multiple qubits, are also possible. In this way, qubits can be entangled with each other, so that their states are correlated with each other and can no longer be considered separately. This entanglement provides a new way to store information and perform calculations, which is not possible with a classical computer.
Two qubit states
We consider a system of two qubits. If both qubits are measured, there can be in one of four possible states. These basis states , , and result mathematically as tensor product of the single basis states:
The general state of the quantum system can be represented as a superposition of base states and thus corresponds to a four-dimensional vector:
If this state is normalized (i.e. ), then the absolute squares and correspond to the probabilities to measure the respective state.
Separable and entangled states
The state of a two-qubit system is called separable if the two qubits do not depend on each other. In this case, the state can be written as a tensor product of individual states:
It is therefore possible to specify separately the states and of the first and second qubit. In particular, the basis states and are separable.
In the general case, however, the quantum state can not be separated because the qubits depend on each other. In this case there is an entangled state or an entanglement. This is indicated by the fact that the measurements of different qubits provide random outcomes, but the results are correlated with each other. A special case are maximum entangled states, in which the measurement result of the first qubit completely defines the state of the second qubit.
Is the state
separable or entangled?
When measuring both qubits, the states and result with equal probability, so that at the end both qubits must be in the same basis state. Whether the one qubit assumes the state or is not set in advance and depends on the other qubit. Thus, the two qubits can no longer be considered separately and there is no decomposition in the form . Futhermore, the state is maximum entangled, since a measurement of a single qubit determines the state of the other qubit.
The state of the two-qubit system can also be manipulated with quantum gates, which are now represented by unitary matrices. The application of a gate corresponds to the matrix mutiplication with the four-dimensional state vector:
The single-qubit gates that we have come to know so far can also be transferred to the two-qubit system. Let be such a one-qubit gate then one can now define two-qubit operators and , each corresponding to the application of to the first or second qubit. The new operators are defined by their effect on the base states
where . Using this rule, the matrix representation of this operators can also be derived:
Controlled NOT (CNOT)
Besides single-qubit operations, we also need additional operations that can link the two qubits together and create an entanglement. An example of such an operation is the Controlled-NOT gate (CNOT), which can be described by the following matrix:
The first qubit is called control bit and the second bit target bit. In the diagram, the target bit is marked with a cross and is connected with a line to the control bit. The CNOT gate applies a NOT operation (X-gate) to the target bit if and only if the control bit is in the state .
Using the CNOT gate and the Hadamard gate, the Bell state can be generated from an initial state :