Quantum Spin Simulator Back
Quantum Mechanics

Quantum Spin Simulator

Visualize spin-1/2 quantum states on the Bloch sphere. Adjust magnetic field components and initial angles to observe Larmor precession and Rabi oscillations live — the physics behind MRI and quantum computing.

Magnetic Field & Initial State
B_z (longitudinal)1.0 T
B_x (transverse)0.0 T
Initial θ (polar)45°
Initial φ (azimuth)
Gyromagnetic ratio γ1.0
Presets
Expectation Values
0.00
⟨Sx⟩
0.00
⟨Sy⟩
0.71
⟨Sz⟩
1.00
ω_L (rad/s)

Bloch Sphere State

$$|\psi\rangle = \cos\frac{\theta}{2}|\uparrow\rangle + e^{i\phi}\sin\frac{\theta}{2}|\downarrow\rangle$$

Larmor frequency: $\omega_L = \gamma B$
Probability: $P_\uparrow = \cos^2(\theta/2)$
Expectation: $\langle S_z\rangle = \frac{\hbar}{2}\cos\theta$

What is the Bloch Sphere?

🧑‍🎓
What exactly is the Bloch sphere? It looks like a globe, but for quantum stuff.
🎓
Basically, it's a brilliant way to visualize the state of a quantum bit, or qubit. For a spin-1/2 particle like an electron, its pure quantum state can be mapped to a point on this unit sphere. Try moving the "Initial θ" and "Initial φ" sliders in the simulator above. You'll see the arrow move, representing the spin's orientation.
🧑‍🎓
Wait, really? So the north pole is... just spin-up? What about all the other points?
🎓
Exactly! The north pole is the pure $|\uparrow\rangle$ state. The south pole is $|\downarrow\rangle$. Any other point is a quantum superposition of those two. For instance, a point on the equator represents a state with a 50/50 chance of measuring spin-up or spin-down, but with a specific quantum phase. That's what the $e^{i\phi}$ term is for.
🧑‍🎓
Okay, and the magnetic field sliders (B_z and B_x)... they make the arrow move? Is that what "precession" is?
🎓
Great question! In practice, a magnetic field makes the spin axis rotate, or precess, around the field direction. Set B_z to a positive value and hit play. You'll see Larmor precession—the spin circles around the z-axis. Now, add a bit of B_x. That's a transverse field, and it can cause the spin to flip from up to down, creating Rabi oscillations. Try it and watch the probability graph change!

Physical Model & Key Equations

The quantum state of a spin-1/2 particle is described by a two-component complex vector. On the Bloch sphere, this is parameterized by two angles, θ (polar) and φ (azimuth).

$$|\psi\rangle = \cos\frac{\theta}{2}|\uparrow\rangle + e^{i\phi}\sin\frac{\theta}{2}|\downarrow\rangle$$

Here, $|\uparrow\rangle$ and $|\downarrow\rangle$ are the basis states. $\cos^2(\theta/2)$ is the probability to measure the spin as "up", and $\sin^2(\theta/2)$ is the probability to measure it as "down". The phase $\phi$ is crucial for quantum interference.

The time evolution in a magnetic field $\vec{B}= (B_x, 0, B_z)$ is governed by the Schrödinger equation with the Hamiltonian $H = -\gamma \vec{S}\cdot \vec{B}$, where $\gamma$ is the gyromagnetic ratio. This leads to two key motions:

$$ \text{Larmor Precession: }\omega_L = \gamma |B| \quad \text{(around the total field direction)}$$ $$ \text{Rabi Oscillation Frequency: }\Omega = \gamma \sqrt{B_x^2 + B_z^2}$$

$\omega_L$ is the rate of steady rotation. When $B_x$ is non-zero, the spin's polar angle θ changes periodically, causing it to flip between up and down at frequency $\Omega$. This is the Rabi oscillation you control with the transverse field slider.

Real-World Applications

Magnetic Resonance Imaging (MRI): This is the most famous application. In an MRI scanner, a large static $B_z$ field aligns the spins of hydrogen nuclei in your body. A carefully tuned transverse $B_x$ field (a radio-frequency pulse) is then applied to flip these spins. By controlling the pulse duration (like adjusting the B_x slider over time), we can create detailed images of soft tissues.

Quantum Computing: In quantum processors, a spin-1/2 system (like an electron or nucleus) is a physical qubit. The Bloch sphere is its state space. Applying precise magnetic field pulses (B_x and B_z) allows engineers to perform quantum logic gates, rotating the qubit state to any point on the sphere to run algorithms.

Nuclear Magnetic Resonance (NMR) Spectroscopy: Chemists use NMR to determine the structure of molecules. Different atomic nuclei in a molecule experience slightly different magnetic fields, changing their precession frequency. By analyzing these frequency shifts, scientists can map out the molecule's 3D structure.

Atomic Clocks & Precision Sensing: The incredibly regular precession of spins in a stable magnetic field can be used as a timekeeping mechanism. Furthermore, tiny changes in the local magnetic field alter the precession frequency, making spin systems ultra-sensitive detectors for geological surveys and fundamental physics experiments.

Common Misconceptions and Points to Note

First, there's a common tendency to misinterpret points on the Bloch sphere as representing the "actual direction of the spin." Strictly speaking, they are a geometric representation of the "probability amplitude" of the quantum state (wave function). For example, a point on the sphere's equator does not mean the spin is pointing sideways; it represents a "maximum superposition state" with equal parts spin-up and spin-down. If you measure the z-component of spin in this state, you'll randomly get spin-up or spin-down with a probability of 1/2. When simulating in practical work, be careful not to confuse this "expectation value of a physical quantity obtained by measurement" with the "geometric representation of the state itself."

Next, a tip on parameter settings. When applying a transverse magnetic field B_x to observe Rabi oscillations, setting B_z to zero makes the oscillation period infinite (meaning no oscillation occurs). This is because the Hamiltonian becomes $H = -\gamma B_x S_x$ only, and the energy eigenstates are no longer superpositions of $|\uparrow\rangle$ and $|\downarrow\rangle$. For practical observation, the key is to set B_x sufficiently small compared to B_z (e.g., B_z=1.0, B_x=0.1), so that a small perturbation is added to the precession motion.

Finally, note that this simulator deals only with "pure states." In real experiments, spins often interact with their environment and become "mixed states." Mixed states are represented by points *inside* the Bloch sphere, lacking more information than the pure states on the sphere's surface. Even if you see beautiful precession in NovaSolver, in actual quantum devices, "relaxation times" come into play, causing the oscillations to gradually decay. Keep this gap between ideal and reality in mind.

Related Engineering Fields

The core of this simulator—"spin control in a magnetic field"—actually underpins the foundation of familiar cutting-edge technologies. First is Nuclear Magnetic Resonance (NMR) and MRI (Magnetic Resonance Imaging). A patient is placed in a strong static magnetic field (B_z), and radio waves (a time-varying version of transverse magnetic fields = B_x, B_y) are applied to induce Rabi oscillations in the spins of hydrogen nuclei (protons) within the body. Differences in resonance conditions and relaxation times of these oscillations are imaged to obtain detailed cross-sections of soft tissue. The operation in NovaSolver of changing the ratio of B_z to B_x to find the oscillation period is precisely the same as searching for the resonance frequency in NMR.

Another critical field is quantum computing, particularly solid-state qubits. In schemes using electron spins in semiconductor quantum dots or spins in diamond NV centers as qubits, microwave pulses (equivalent to transverse magnetic fields) are used to precisely rotate the spin state. This is a single-qubit gate operation. Practicing "setting the initial state to the north pole and applying B_x for a specific time to flip it exactly to the south pole" in the simulator directly relates to designing the basic quantum gate operation: the "π pulse." Furthermore, considering coupling (interactions) between multiple qubits leads to simulations of more complex quantum algorithms.

For Further Learning

As a recommended next step, first understand the "rotating frame of reference." In the current simulation, points on the Bloch sphere undergo complex spiral motion. However, if you cancel out the component of fast precession due to B_z from the observer's viewpoint, the motion simplifies dramatically. This is a powerful concept actually used in NMR and quantum control, technically corresponding to "irradiation with an RF pulse." Grasping this will help you understand why slight modulation near the resonance frequency is effective.

If you want to deepen the mathematical background, challenge yourself with the "time evolution operator" that describes the state's time evolution and its matrix representation. When the Hamiltonian is time-independent, the solution can be written as $|\psi(t)\rangle = e^{-iHt/\hbar}|\psi(0)\rangle$. Since $H$ is a linear combination of Pauli matrices here, the time evolution operator becomes a matrix representing a "rotation" on the Bloch sphere (an element of the SU(2) group). For example, with only B_z, $e^{-i(-\gamma B_z S_z)t/\hbar}$ is the rotation operator around the z-axis. By tracing how this abstract formula corresponds to the concrete rotation of points in the simulator, you can bridge the gap between equations and geometry.

The recommended next topic is "pulse sequence design." Learn how to guide a spin from any initial state to any target state by combining magnetic field pulses that change over time, rather than using a single static field. This is at the heart of quantum control. For instance, what happens if you sequence an initial π/2 pulse, a wait time, and another π/2 pulse? If NovaSolver allows you to change parameters over time, you can experiment with the basics of such control firsthand.