The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Quantum systems can mathematically be described by their 'quantum state'. When the system is closed/isolated, the state is 'pure' and can be written as a sum (i.e. 'superposition') of basis vectors. When the system is a subsystem of an open system, the state is instead usually 'mixed' and cannot be written as a pure state, so has to be written as a density matrix. Consider using the density-matrix tag when relevant

For a quantum system in a Hilbert space $\mathcal H_S$, in a basis $\left\lbrace \textbf{e}_j = \left|e_j\right>\right\rbrace$ (using bra-ket notation, so the dual of $\left|e_j\right>$ can be written as $\left< e_j\right| = \left|e_j\right>^\dagger$), the state of a closed/isolated system (i.e. a 'pure state') can be written as $\left|\psi\right> = \sum_j\alpha_j\left|e_j\right>$, with normalisation condition $\left<\psi|\psi\right> = 1$. Common bases for a qubit include the 'computational' basis $\left\lbrace \left|0\right>, \left|1\right>\right\rbrace$, the X-basis $\left\lbrace \left|+\right>, \left|-\right>\right\rbrace$ where $\left|\pm\right> = \frac{1}{\sqrt{2}}\left(\left|0\right>\pm\left|1\right>\right)$ and the Y-basis $\left\lbrace \frac{1}{\sqrt{2}}\left(\left|0\right>+i\left|1\right>\right), \frac{1}{\sqrt{2}}\left(\left|0\right>-i\left|1\right>\right)\right\rbrace$. Upon measurement, the probability of obtaining the result $\left|e_k\right>$ is $\mathbb P_k = \left|\left< e_k |\psi\right>\right|^2 = \left<\psi|P_k|\psi\right>$ where $P_k = \left| e_k\rangle\langle e_k\right|$ is the 'projector' onto state $\left| e_k\right>$. More generally, for an operator $A$, the expectation value is $\left< A\right> = \left<\psi|A|\psi\right>$

When the system is instead open/mixed, the system is described by a density matrix $\rho = \sum_{j, k}c_{j, k}\left| e_k\rangle\langle e_j\right|$ and the expectation of $A$ becomes $tr\left(\rho A\right)$.

history | excerpt history