The motivation behind density matrices[1]:
In quantum mechanics, the state of a quantum system is represented by a state vector, denoted |ψ⟩ (and pronounced ket). A quantum system with a state vector |ψ⟩ is called a pure state. However, it is also possible for a system to be in a statistical ensemble of different state vectors. For example, there may be a 50% probability that the state vector is |ψ1⟩ and a 50% chance that the state vector is |ψ2⟩. This system would be in mixed state. The density matrix is especially useful for mixed states, because any state, pure or mixed, can be characterized by a single density matrix.
A mixed state is different from a quantum superposition. The probabilities in a mixed state are classical probabilities (as in the probabilities one learns in classical probability theory/statistics), unlike the quantum probabilities in a quantum superposition. In fact, a quantum superposition of pure states is another pure state, for example, |0⟩+|1⟩2√ . In this case, the coefficients 12√ are not probabilities, but rather probability amplitudes.
Example: light polarization
An example of pure and mixed states is light polarization. Photons can have two helicities, corresponding to two orthogonal quantum states, |R⟩ (right circular polarization) and |L⟩ (left circular polarization). A photon can also be in a superposition state, such as |R⟩+|L⟩2√โพลาไรเซชันแนวตั้งหรือ |R⟩−|L⟩2√โพลาไรเซชันแนวนอน โดยทั่วไปจะอยู่ในสถานะใดก็ได้α|R⟩+β|L⟩ (กับ |α|2+|β|2=1) ที่สอดคล้องกับเส้นตรง , วงกลมหรือวงรีโพลาไรซ์ ถ้าเราผ่าน|R⟩+|L⟩2√ขั้วแสงผ่านpolarizer วงกลมซึ่งจะช่วยให้ทั้งสองเท่านั้น|R⟩ แสงโพลาไรซ์หรือเท่านั้น |L⟩แสงโพลาไรซ์ความเข้มจะลดลงครึ่งหนึ่งในทั้งสองกรณี นี่อาจทำให้ดูเหมือนว่าโฟตอนครึ่งหนึ่งอยู่ในสถานะ|R⟩ และอื่น ๆ ที่อยู่ในสถานะ |L⟩. แต่นี่ไม่ถูกต้อง: ทั้งคู่|R⟩ และ |L⟩ are partly absorbed by a vertical linear polarizer, but the |R⟩+|L⟩2√ light will pass through that polarizer with no absorption whatsoever.
However, unpolarized light such as the light from an incandescent light bulb is different from any state like α|R⟩+β|L⟩ (linear, circular or elliptical polarization). Unlike linearly or elliptically polarized light, it passes through the polarizer with 50% intensity loss whatever the orientation of the polarizer; and unlike circularly polarized light, it cannot be made linearly polarized with any wave plate because randomly oriented polarization will emerge from a wave plate with random orientation. Indeed, unpolarized light cannot be described as any state of the form α|R⟩+β|L⟩ in a definite sense. However, unpolarized light can be described with ensemble averages, e.g. that each photon is either |R⟩ with 50% probability or |L⟩ with 50% probability. The same behaviour would occur if each photon was either vertically polarized with 50% probability or horizontally polarized with 50% probability.
Therefore, unpolarized light cannot be described by any pure state but can be described as a statistical ensemble of pure states in at least two ways (the ensemble of half left and half right circularly polarized, or the ensemble of half vertically and half horizontally linearly polarized). These two ensembles are completely indistinguishable experimentally, and therefore they are considered the same mixed state. One of the advantages of the density matrix is that there is just one density matrix for each mixed state, whereas there are many statistical ensembles of pure states for each mixed state. Nevertheless, the density matrix contains all the information necessary to calculate any measurable property of the mixed state.
Where do mixed states come from? To answer that, consider how to generate unpolarized light. One way is to use a system in thermal equilibrium, a statistical mixture of enormous numbers of microstates, each with a certain probability (the Boltzmann factor), switching rapidly from one to the next due to thermal fluctuations. Thermal randomness explains why an incandescent light bulb, for example, emits unpolarized light. A second way to generate unpolarized light is to introduce uncertainty in the preparation of the system, for example, passing it through a birefringent crystal with a rough surface, so that slightly different parts of the beam acquire different polarizations. A third way to generate unpolarized light uses an EPR setup: A radioactive decay can emit two photons travelling in opposite directions, in the quantum state |R,L⟩+|L,R⟩2√. The two photons together are in a pure state, but if you only look at one of the photons and ignore the other, the photon behaves just like unpolarized light.
More generally, mixed states commonly arise from a statistical mixture of the starting state (such as in thermal equilibrium), from uncertainty in the preparation procedure (such as slightly different paths that a photon can travel), or from looking at a subsystem entangled with something else.
Obtaining the density matrix[2]:
As mentioned before, a system can be in a statistical ensemble of different state vectors. Say there is p1 probability that the state vector is |ψ1⟩ and p2 probability that the state vector is |ψ2⟩ are the corresponding classical probabilities of each state being prepared.
Say, now we want to find the expectation value of an operator O^. It is given as:
⟨O^⟩=p1⟨ψ1|O^|ψ1⟩+p2⟨ψ2|O^|ψ2⟩
Note that ⟨ψ1|O^|ψ1⟩ and p2⟨ψ2|O^|ψ2⟩ are scalars, and trace of scalars are scalars too. Thus, we can write the above expression as:
⟨O^⟩=Tr(p1⟨ψ1|O^|ψ1⟩)+Tr(p2⟨ψ2|O^|ψ2⟩)
Now, using the cyclic invariance and linearity properties of the trace:
⟨O^⟩=p1Tr(O^|ψ1⟩⟨ψ1|)+p2Tr(O^|ψ2⟩⟨ψ2|)
=Tr(O^(p1|ψ1⟩⟨ψ1|)+p2|ψ2⟩⟨ψ2|))=Tr(O^ρ)
where ρ is what we call the density matrix. The density operator contains all the information needed to calculate an expectation value for the experiment.
Thus, basically the density matrix ρ is
p1|ψ1⟩⟨ψ1|+p2|ψ2⟩⟨ψ2|
in this case.
You can obviously extrapolate this logic for when more than just two state vectors are possible for a system, with different probabilities.
Calculating the density matrix:
Let's take an example, as follows.
In the above image, the incandescent light bulb 1 emits completely random polarized photons 2 with mixed state density matrix.
As mentioned before, an unpolarized light can be explained with an ensemble average i.e. say each photon is either |R⟩ or |L⟩ with 50 probability for each. Another possible ensemble average is: each photon is either |R⟩+|L⟩2√ or |R⟩−|L⟩2√ with 50% probability for each. There are lots of other possibilities too. Try to come up with some yourself. The point to note is that the density matrix for all these possible ensembles will be exactly the same. And this is exactly the reason why density matrix decomposition into pure states is not unique. Let's check:
Case 1: 50% |R⟩ & 50% |L⟩
ρmixed=0.5|R⟩⟨R|+0.5|L⟩⟨L|
Now, in the basis {|R⟩,|L⟩}, |R⟩ can be denoted as [10] and |L⟩ can be denoted as [01]
∴0.5([10]⊗[10])+0.5([01]⊗[01])
=0.5[1000]+0.5[0001]
=[0.5000.5]
Case 2: 50% |R⟩+|L⟩2√ & 50% |R⟩−|L⟩2√
ρmixed=0.5(|R⟩+|L⟩2–√)⊗(⟨R|+⟨L|2–√)+0.5(|R⟩−|L⟩2–√)⊗(⟨R|−⟨L|2–√)
In the basis {|R⟩+|L⟩2√,|R⟩−|L⟩2√}, |R⟩+|L⟩2√ can be denoted as [10] and |R⟩−|L⟩2√ can be denoted as [01]
∴0.5([10]⊗[10])+0.5([01]⊗[01])
=0.5[1000]+0.5[0001]
=[0.5000.5]
Thus, we can clearly see that we get the same density matrices in both case 1 and case 2.
However, after passing through the vertical plane polarizer (3), the remaining photons are all vertically polarized (4) and have pure state density matrix:
ρpure=1(|R⟩+|L⟩2–√)⊗(⟨R|+⟨L|2–√)+0(|R⟩−|L⟩2–√)⊗(⟨R|−⟨L|2–√)
In the basis {|R⟩+|L⟩2√,|R⟩−|L⟩2√}, |R⟩ can be denoted as [10] and |L⟩ can be denoted as [01]
∴1([10]⊗[10])+0([01]⊗[01])
=1[1000]+0[0001]
=[1000]
The single qubit case:
If your system contains just a single qubit and you're know that its state |ψ⟩=α|0⟩+β|1⟩ (where |α|2+|β|2) then you are already sure that the 1-qubit system has the state |ψ⟩ with probability 1!
In this case, the density matrix will simply be:
ρpure=1|ψ⟩⟨ψ|
If you're using the orthonormal basis {α|0⟩+β|1⟩,β∗|0⟩−α∗|1⟩},
the density matrix will simply be:
[1000]
This is very similar to 'case 2' above, so I didn't show the calculations. You can ask questions in the comments if this portion seems unclear.
However, you could also use the {|0⟩,|1⟩} basis as @DaftWullie did in their answer.
In the general case for a 1-qubit state, the density matrix, in the {|0⟩,|1⟩} basis would be:
ρ=1(α|0⟩+β|1⟩)⊗(α∗⟨0|+β∗⟨1|)
=[αβ]⊗[α∗β∗]
=[αα∗βα∗αβ∗ββ∗]
Notice that this matrix ρ is idempotent i.e. ρ=ρ2. This is an important property of the density matrices of a pure state and helps us to distinguish them from density matrices of mixed states.
Obligatory exercises:
1. Show that density matrices of pure states can be diagonalized to the form diag(1,0,0,...).
2. Prove that density matrices of pure states are idempotent.
Sources & References:
[1]: https://en.wikipedia.org/wiki/Density_matrix
[2]: https://physics.stackexchange.com/a/158290
Image Credits:
User Kaidor
on Wikimedia