Rank-2 Tensor · Quantum Mechanics

Tensors in Quantum Mechanics

Application to quantum computers, MRI scanners, and GPS

Advanced Theory
← Back to Demo

Everything you have seen in the demo —> eigenvalues, eigenvectors, the quadratic form, trace and determinant invariance, passive rotation —> reappears in quantum mechanics, but now the tensor describes quantum states and energy levels instead of a car's resistance. Let us walk through the most important applications, starting with the density matrix and a real quantum computing problem.

The Density Matrix —> Tensor in Quantum Form

The density matrix \(\rho\) is a rank-2 tensor that completely describes the quantum state of a system. For a two-level quantum system —> called a qubit, the basic unit of a quantum computer —> it is a \(2 \times 2\) matrix that looks exactly like your tensor \(T\):

// In Demo a Tensor is defined by:
\(T = \begin{pmatrix} a & c \\ c & b \end{pmatrix}\)

// The quantum density matrix:
\(\rho = \begin{pmatrix} \rho_{11} & \rho_{12} \\ \rho_{21} & \rho_{22} \end{pmatrix}\)

// What each entry means:
\(\rho_{11}\) = probability of finding qubit in state \(|0\rangle\)
\(\rho_{22}\) = probability of finding qubit in state \(|1\rangle\)
\(\rho_{12}, \rho_{21}\) = quantum coherences —> interference between states

// The trace invariant becomes a probability law:
\(\text{Tr}(\rho) = \rho_{11} + \rho_{22} = \)1  --> total probability always = 1
Connection to Demo

In our demo, trace invariance means \(a + b\) stays constant under rotation. In quantum mechanics, trace invariance of \(\rho\) means total probability is conserved —> the qubit must be found somewhere, so probabilities always sum to 1. Same mathematics, deeper physical meaning.

A Qubit on Quantum Computer

Consider a single qubit on quantum computer, initially prepared in the state \(|+\rangle\) —> an equal superposition of \(|0\rangle\) and \(|1\rangle\). After interacting with its environment for a short time \(t\), the qubit loses some coherence. Its density matrix becomes:

// Initial pure state —> maximum coherence:
\(\rho_0 = \begin{pmatrix} 0.5 & 0.5 \\ 0.5 & 0.5 \end{pmatrix}\)

// After decoherence time t —> coherence decays:
\(\rho(t) = \begin{pmatrix} 0.5 & 0.5\,e^{-t/T_2} \\ 0.5\,e^{-t/T_2} & 0.5 \end{pmatrix}\)

// Where T2 is the decoherence time (~100 microseconds)

// At t = T2 (one decoherence time):
\(e^{-1} \approx 0.368\)
\(\rho(T_2) = \begin{pmatrix} 0.5 & 0.184 \\ 0.184 & 0.5 \end{pmatrix}\)

// At t >> T2 (fully decohered —> classical mixture):
\(\rho(\infty) = \begin{pmatrix} 0.5 & 0 \\ 0 & 0.5 \end{pmatrix}\)  --> diagonal only, no coherence left

Now find the eigenvalues of \(\rho(T_2)\) —> using exactly formula from the demo with \(a = 0.5\), \(b = 0.5\), \(c = 0.184\):

// Characteristic equation:
\(\lambda^2 - \text{Tr}(\rho)\,\lambda + \det(\rho) = 0\)

// Trace and determinant:
\(\text{Tr}(\rho) = 0.5 + 0.5 = \)1.0
\(\det(\rho) = 0.5 \times 0.5 - 0.184^2 = 0.25 - 0.034 = \)0.216

// Discriminant:
\(\Delta = (a-b)^2 + 4c^2 = 0 + 4(0.184)^2 = \)0.135
\(\sqrt{\Delta} = \)0.368

// Eigenvalues:
\(\lambda_1 = \frac{1.0 + 0.368}{2} = \)0.684  --> dominant quantum state
\(\lambda_2 = \frac{1.0 - 0.368}{2} = \)0.316  --> secondary quantum state

// Purity of the qubit:
\(\text{Purity} = \text{Tr}(\rho^2) = \lambda_1^2 + \lambda_2^2\)
\(= 0.684^2 + 0.316^2 = 0.468 + 0.100 = \)0.568

// Pure state purity = 1.0, fully mixed = 0.5
// 0.568 means qubit is partially decohered
Car Analogy for Decoherence

The Car Losing Its Shape

In our demo, the ellipse has a fixed shape —> its eigenvalues \(\lambda_1\) and \(\lambda_2\) never change. This represents a pure quantum state —> the qubit is perfectly coherent, like a car with a well-defined easy and hard push direction.

Decoherence is what happens when the environment randomly jostles the car from all directions. Over time the off-diagonal entry \(c\) decays to zero —> the coupling between the two directions vanishes. The ellipse slowly becomes a circle —> \(\lambda_1 = \lambda_2\) —> meaning the qubit has lost all directional preference. It no longer knows which quantum state it should be in.

A quantum computer must perform all its calculations before decoherence turns the ellipse into a circle. \(T_2 \approx 100\) microseconds is the time the ellipse stays elliptical. This is why quantum computing is so difficult —> you are racing against the clock before the tensor becomes isotropic.

Hamiltonian Eigenvalues Are Energy Levels

The Hamiltonian \(H\) is the rank-2 tensor whose eigenvalues are the allowed energy levels of a quantum system. The eigenvalue equation is:

// The Schrodinger eigenvalue equation:
\(H\,|\psi\rangle = E\,|\psi\rangle\)

// Exactly your tensor equation T.e = lambda.e
// but now lambda = E = energy level

// Example: two-level atom in a laser field
\(H = \begin{pmatrix} E_0 & \Omega/2 \\ \Omega/2 & E_1 \end{pmatrix}\)

// E0, E1 = bare energy levels (like a and b in your demo)
// Omega/2 = coupling from laser (like c in your demo)

// Energy eigenvalues using your formula:
\(E_{\pm} = \frac{(E_0 + E_1)}{2} \pm \frac{1}{2}\sqrt{(E_0 - E_1)^2 + \Omega^2}\)

// The splitting sqrt((E0-E1)^2 + Omega^2)
// is called the Rabi splitting —> directly measurable
This Is Your Discriminant Formula

The Rabi splitting \(\sqrt{(E_0-E_1)^2 + \Omega^2}\) is identical to your discriminant \(\sqrt{(a-b)^2 + 4c^2}\) — with \(E_0 \leftrightarrow a\), \(E_1 \leftrightarrow b\), and \(\Omega/2 \leftrightarrow c\). The laser coupling \(\Omega\) plays exactly the role of our slider \(c\) —> it tilts the principal axes and splits the energy levels apart.

Pauli Matrices —> Three Tensors for Spin

Quantum mechanical spin is described by three rank-2 tensors —> the Pauli matrices. Each one is a \(2 \times 2\) symmetric or Hermitian matrix, exactly like your tensor \(T\):

// The three Pauli matrices:
\(\sigma_x = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\)    \(\sigma_y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}\)    \(\sigma_z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}\)

// Eigenvalues of each Pauli matrix:
\(\lambda_1 = +1\)   \(\lambda_2 = -1\)  --> for ALL three matrices

// Physical meaning:
Measuring spin along ANY axis gives only +1/2 or -1/2

// Trace of each Pauli matrix:
\(\text{Tr}(\sigma_x) = \text{Tr}(\sigma_y) = \text{Tr}(\sigma_z) = \)0

// Determinant of each Pauli matrix:
\(\det(\sigma_x) = \det(\sigma_y) = \det(\sigma_z) = \)-1
🏥

MRI Scanners

Medical MRI flips hydrogen nuclear spins using radio waves. The Pauli matrix \(\sigma_x\) describes the spin-flip operation. Eigenvalues \(\pm 1\) correspond to spin-up and spin-down states —> the two states whose energy difference produces the MRI signal used to image tissue.

💻

Quantum Gates

Every quantum logic gate in quantum computers is a \(2\times 2\) unitary tensor. The NOT gate is \(\sigma_x\), the phase gate uses \(\sigma_z\). Running a quantum algorithm means multiplying sequences of these rank-2 tensors —> matrix multiplication is the computation.

🔬

Electron Spin Resonance

ESR spectroscopy identifies free radicals in chemical and biological samples by measuring spin eigenvalue transitions. The resonance frequency directly gives the eigenvalue splitting \(\Delta E = 2\lambda\) of the spin tensor in a magnetic field.

📱

LCD Screens

Every pixel in your phone screen manipulates the polarisation tensor of light —> a \(2\times 2\) Jones matrix with eigenvalues controlling which light passes. The display works by switching between different eigenvalue states of the polarisation tensor millions of times per second.

Hydrogen Spectral Lines are Tensor Eigenvalues

The hydrogen atom Hamiltonian is a rank-2 tensor in an infinite-dimensional function space. Its eigenvalues —> the energy levels —> are:

// Hydrogen energy eigenvalues:
\(E_n = -\frac{13.6\,\text{eV}}{n^2}\)    \(n = 1, 2, 3, \ldots\)

\(E_1 = \)-13.6 eV  --> ground state (most stable)
\(E_2 = \)-3.4 eV  --> first excited state
\(E_3 = \)-1.51 eV  --> second excited state

// Photon emitted when electron drops from n=3 to n=2:
\(\Delta E = E_3 - E_2 = -1.51 - (-3.4) = \)1.89 eV
\(\lambda_{photon} = hc/\Delta E = \)656 nm  --> red H-alpha line

// These eigenvalues are invariants:
// same whether atom is in Paris, on Mars, or near a black hole
Invariance in Astronomy

When astronomers observe a galaxy billions of light years away, they identify hydrogen by its spectral lines at 656 nm, 486 nm, and 434 nm. These wavelengths are the eigenvalues of the hydrogen Hamiltonian tensor —> invariants that are identical everywhere in the universe. The same tensor invariance you verify in GeoGebra by dragging \(\theta\) operates across the entire cosmos.

Demo vs Quantum Mechanics —> Side by Side

Demo Quantum Mechanics Real Life
Tensor T = [[a,c],[c,b]] Density matrix \(\rho\) or Hamiltonian \(H\) Qubit state in quantum computer
Eigenvalues \(\lambda_1, \lambda_2\) Energy levels \(E_1, E_2\) Hydrogen spectral lines —> 656 nm, 486 nm
Eigenvectors \(\hat{e}_1, \hat{e}_2\) Quantum states \(|\psi_1\rangle, |\psi_2\rangle\) Spin-up and spin-down in MRI
Trace = a + b (invariant) \(\text{Tr}(\rho) = 1\) (probability conserved) Qubit always found in some state
Determinant = ab - c² (invariant) Purity \(\text{Tr}(\rho^2)\) conserved in closed system Quantum information not lost
Slider c controls tilt Laser coupling \(\Omega\) mixes states Rabi oscillations in atomic clocks
Passive rotation —> ellipse unchanged Change of basis —> physics unchanged GPS works regardless of satellite orientation
c = 0 principal frame Energy eigenbasis —> diagonal H Stationary states of atoms
Ellipse becomes circle —> isotropic Fully mixed state —> maximum decoherence Qubit destroyed by environment
The Big Picture

The Ellipse Is Everywhere in Physics

In our demo, the ellipse \(ax^2 + 2cxy + by^2 = 1\) is the geometric face of the tensor. Its shape —> governed by \(\lambda_1\) and \(\lambda_2\) is invariant under rotation. This single geometric fact, dressed in different mathematical clothing, appears at every scale of physics.

The hydrogen atom has an ellipse in energy space —> its eigenvalues \(E_n\) are invariant across the universe. The qubit on quantum computer has an ellipse on the Bloch sphere —> decoherence shrinks it toward a circle. The MRI scanner measures which axis of the spin ellipse the nuclear spin points along. The GPS satellite carries a clock whose tick rate is governed by the stress-energy tensor —> a rank-2 tensor invariant.

Every time you drag \(\theta\) in demo and watch the components change while the ellipse stays still —> you are watching the most fundamental symmetry in all of physics: physical reality is independent of how we choose to describe it.

← Back to Demo Eigenvalue Solution Trace & Determinant Invariance