Measure how distinguishable two quantum states are. Choose qubit vectors, density matrices, or pure kets. Validate inputs, view steps, and download outputs easily now.
Pick a representation. All methods compute the same trace distance when inputs describe valid states.
The trace distance between two quantum states ρ and σ is D(ρ,σ) = ½‖ρ − σ‖₁, where ‖A‖₁ is the trace norm (sum of singular values). For Hermitian Δ = ρ − σ, the trace norm equals the sum of absolute eigenvalues: ‖Δ‖₁ = Σᵢ |λᵢ|.
For qubit states written with Bloch vectors ρ = (I + r·σ⃗)/2 and σ = (I + s·σ⃗)/2, the trace distance simplifies to D = ½‖r − s‖₂.
For pure states |ψ⟩ and |φ⟩, the trace distance is D = √(1 − |⟨ψ|φ⟩|²), using normalized kets.
These sample rows illustrate common inputs and expected outputs.
| Mode | State ρ | State σ | Trace Distance D |
|---|---|---|---|
| Bloch | r = (0.2, 0.1, 0.7) | s = (0.0, 0.0, 0.2) | 0.269258... |
| Pure | |ψ⟩=(1,0) | |φ⟩=(1/√2,1/√2) | 0.707106... |
| Density 2×2 | [[0.8, 0.1+0.05i],[0.1−0.05i, 0.2]] | [[0.6, 0.02−0.03i],[0.02+0.03i, 0.4]] | 0.213593... |
Trace distance quantifies how different two quantum states are. It is widely used in quantum information because it treats states as physical objects that can be experimentally distinguished, not just mathematical vectors. A value of zero means the states are identical, while larger values indicate stronger separation. It is frequently used to compare a target state with an experimentally reconstructed state.
Operationally, the trace distance links to the maximum change you can observe in outcome probabilities over all possible measurements. If two density operators give very different statistics for some measurement, the trace distance will be large. If every measurement produces nearly the same probabilities, the distance remains small.
For valid quantum states, the trace distance lies between 0 and 1. That bound makes it convenient for reporting similarity in experiments and simulations. Values below about 0.05 often indicate near-indistinguishable states under realistic noise, while values above 0.5 reflect clearly separable behavior. The fixed scale supports quick comparisons across runs.
For pure states |ψ⟩ and |φ⟩, trace distance depends on their overlap. In this calculator’s pure-amplitude mode, it is computed from the inner product magnitude, translating the angle between state vectors into an intuitive separation score. Orthogonal states give distance 1, and identical states give 0.
Real devices often produce mixed states, represented by density matrices ρ and σ. In matrix mode, the tool forms Δ = ρ − σ, finds the singular values of Δ, and uses their sum to evaluate the trace norm. This directly implements the standard definition D = ½‖ρ−σ‖₁.
Trace distance also determines optimal discrimination performance. If you must guess whether a system was prepared in ρ or σ with equal priors, the best achievable success rate improves as trace distance increases. This makes the metric a practical target when benchmarking preparation quality. Even with unequal priors, it still bounds discrimination performance.
To support advanced workflows, the calculator offers three input styles: Bloch vectors for qubits, density matrices for general states, and pure amplitudes for normalized kets. Each mode includes normalization checks and basic physicality warnings so you can spot invalid inputs early.
Typical mistakes include non-normalized vectors, density matrices with trace not equal to one, or matrices that are not Hermitian. Use the example table as a sanity check and compare symmetric cases: swapping ρ and σ should not change the distance. Small rounding differences are normal.
It measures how distinguishable two quantum states are. Higher values imply a measurement exists that separates their outcome probabilities more strongly, making it useful for benchmarking state preparation, noise models, and channel simulations.
For physical quantum states, trace distance is between 0 and 1. A result outside this range usually indicates invalid inputs, numerical instability, or a matrix that is not a proper density operator.
Yes. Amplitudes should represent normalized kets. If the norm is not one, the calculator will normalize internally and display a note, but you should still verify your source data and units.
For qubits, density matrices map to Bloch vectors. The calculator converts both vectors into 2×2 density matrices and then evaluates the trace distance from their difference, which is robust for typical qubit workflows.
The trace norm ‖A‖₁ equals the sum of singular values. Using singular values avoids issues with non-diagonal matrices and directly matches the standard definition D = ½‖ρ−σ‖₁.
A valid density matrix must be Hermitian, positive semidefinite, and have trace one. If yours is not Hermitian, re-check conjugate symmetry and data formatting. Non-Hermitian inputs can produce misleading distances.
Try identical states to get zero, orthogonal pure states to get one, and swap ρ and σ to confirm symmetry. Compare with the example table, and expect small rounding differences from floating-point arithmetic.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.