Density Matrix Calculator
Density Matrix Calculator computes density matrix, purity, and entropy for a spin-1/2 quantum system, aiding quantum mechanics and quantum computing analysis.
Formulas Used in Density Matrix Calculator
The calculator uses the following formulas for a spin-1/2 system:
Density Matrix:
\\[ \rho = |\psi\rangle\langle\psi| = \begin{pmatrix} |\alpha|^2 & \alpha \beta^* \\ \beta \alpha^* & |\beta|^2 \end{pmatrix} \\]Purity:
\\[ \text{Tr}(\rho^2) = |\alpha|^4 + |\beta|^4 + 2 |\alpha|^2 |\beta|^2 \\]Von Neumann Entropy:
\\[ S = -\text{Tr}(\rho \ln \rho) = -\sum_i \lambda_i \ln_2 \lambda_i \\]Where:
- \\( \rho \\): Density matrix
- \\( \alpha = a_r + i a_i, \beta = b_r + i b_i \\): Spin-up and spin-down coefficients
- \\( |\alpha|^2 + |\beta|^2 = 1 \\): Normalization condition
- \\( \text{Tr}(\rho^2) \\): Purity (1 for pure states, < 1 for mixed states)
- \\( \lambda_i \\): Eigenvalues of \\( \rho \\)
- \\( S \\): Entropy in bits (base-2 logarithm)
Example Calculations
Example 1: Pure State, Equal Superposition
Input: α_r = 0.707, α_i = 0, β_r = 0.707, β_i = 0
Result: Density Matrix: [[0.5, 0.5], [0.5, 0.5]], Purity: 1, Entropy: 0 bits
Example 2: Pure State, Spin-Up
Input: α_r = 1, α_i = 0, β_r = 0, β_i = 0
Result: Density Matrix: [[1, 0], [0, 0]], Purity: 1, Entropy: 0 bits
Example 3: Non-Normalized State (Normalized Internally)
Input: α_r = 0.8, α_i = 0.4, β_r = 0.4, β_i = 0.2
Result: Density Matrix: [[0.8, 0.32-0.16i], [0.32+0.16i, 0.2]], Purity: 0.84, Entropy: 0.29 bits