Density matrices
In the last lesson Bob held a qubit that was “in one of four states with equal probability”. And in the lesson before, one qubit of a Bell pair had “no state of its own”. Neither situation can be written as . This lesson introduces the description that covers both.
Two kinds of fifty-fifty
Section titled “Two kinds of fifty-fifty”Consider two machines.
- Machine A outputs the state every time.
- Machine B flips a hidden coin and outputs or accordingly.
Measure the output of either and you get 0 or 1 with equal probability. Are they the same? No. Apply before measuring. Machine A’s qubit becomes and gives 0 every time. Machine B’s qubit becomes or , and still gives 0 or 1 at random.
Machine A produces a superposition: one definite state, whose amplitudes can interfere. Machine B produces a mixture: ordinary ignorance about which state was made. No single ket describes Machine B’s output, so we need a more general object.
Bras and outer products
Section titled “Bras and outer products”First, a little notation. For every ket there is a bra, written , which is the conjugate transpose of the ket: a row vector instead of a column.
A bra times a ket is a number, the inner product . Its squared magnitude is called the overlap of the two states: it is 1 when they are the same state and 0 when they are orthogonal.
A ket times a bra, in that order, is a matrix, the outer product:
The density matrix
Section titled “The density matrix”If a source emits the state with probability , its density matrix is
For the two machines:
Now the difference is visible.
- The diagonal entries are the probabilities of measuring 0 and 1. They are the same for both machines.
- The off-diagonal entries are called coherences. They are what makes interference possible. Machine A has them and Machine B does not.
Everything you can predict about a qubit follows from its density matrix. The rules you know carry over:
- Measurement. The probability of outcome 0 is the top-left entry , and of outcome 1 is .
- Gates. A gate changes the state to .
A matrix is a valid density matrix exactly when it is Hermitian (equal to its own conjugate transpose), has trace 1, and has no negative eigenvalues. The trace condition is normalisation again: the probabilities on the diagonal sum to one.
Which of these is not a valid density matrix?
Its trace is , so the probabilities do not sum to one. The others are , and the maximally mixed state.
Pure and mixed
Section titled “Pure and mixed”A state that can be written as a single ket, , is called pure. Anything else is mixed. A convenient test is the purity,
which equals 1 for a pure state and is smaller for a mixed one. For a qubit its lowest value is , reached by . That state is called maximally mixed: every measurement on it, in any basis, gives a fair coin flip.
There is a subtlety here that surprises most people. Take a third machine that outputs or at random. Its density matrix is
the same as Machine B’s. Since all predictions come from , no experiment can tell these two machines apart, even though they were described differently. A density matrix does not record which mixture produced it. That information is not merely hidden. It has no physical meaning.
The state of part of a system
Section titled “The state of part of a system”The second use of density matrices is the more important one. Suppose two qubits are in a pure state and you only have access to the first. What state is it in?
The answer is its reduced density matrix, found by an operation called the partial trace. For a two-qubit state , the reduced state of the first qubit has entries
It is the unique matrix that gives the right probabilities for every measurement on the first qubit alone.
For a product state this just gives back , as it should. For a Bell state, and the other two are zero, so
One half of a Bell pair is maximally mixed. The pair as a whole is in a definite, pure state, about which we know everything there is to know. Yet each part on its own is as random as a qubit can be. This is the precise meaning of “neither qubit has a state of its own”.
In the next puzzles the panel beside the state shows the reduced density matrix of the top qubit. Only that matrix is checked.
Starting from , make the top qubit maximally mixed. Watch its coherences after each gate.
This puzzle needs JavaScript.
After the alone, the top qubit was pure with coherences of . The CNOT did nothing to the top qubit directly, since it was the control. All it did was let the bottom qubit record the top one’s value. That was enough to erase the coherences.
The two qubits are in a Bell state, so the top one is maximally mixed. Make it pure again, in the state .
This puzzle needs JavaScript.
The mixedness was reversible, but only because you could act on both qubits.
Alice holds one qubit of a Bell pair, and Bob’s is out of reach. Can Alice make her qubit pure using gates on it alone?
A gate on her qubit takes to , and for every . Purity lost to entanglement can only be recovered by reaching the other qubit.
This is the mechanism behind noise in real devices, and the subject of the next lesson. A qubit that becomes entangled with something you cannot control behaves, for all practical purposes, as if it had been randomised.
A picture: the Bloch ball
Section titled “A picture: the Bloch ball”Every single-qubit density matrix can be written as
for three real numbers with . So qubit states correspond to points of a solid ball, the Bloch ball. Pure states are the points on its surface, with and at the north and south poles and and on the equator. Mixed states are inside, and the maximally mixed state is the centre. The distance from the centre measures purity.
An exercise
Section titled “An exercise”Exercise. A source emits with probability and with probability . Find its density matrix, the probability of measuring 0, and the purity.
Solution
The probability of measuring 0 is . For a real symmetric matrix the purity is the sum of the squares of all four entries: , which is below 1, so the state is mixed.
Remember it
Section titled “Remember it”A source emits state with probability . What is its density matrix?
.
What three properties does every density matrix have?
It is Hermitian, it has trace 1, and it has no negative eigenvalues.
What do the diagonal and off-diagonal entries of a density matrix tell you?
The diagonal entries are the measurement probabilities. The off-diagonal entries, the coherences, record superposition.
What is the purity of a state, and what values does it take for a qubit?
. It is 1 for a pure state and falls to for the maximally mixed state.
What is the state of one qubit of a Bell pair, taken on its own?
The maximally mixed state .
How does a gate act on a density matrix?
.