Stern-Gerlach Simulations on a Quantum Computer

In the Stern–Gerlach experiment, an unpolarized beam of neutral particles of spin 1/2 is directed through an inhomogeneous magnetic field (blue and red magnet), which produces separated beams of spin-up and spin-down particles. For simplicity, only the outgoing spin-up beam is shown in the graphic. This beam is then directed through a second magnet, for which the polarization can be rotated by an angle from the original. This further splits the beam (except when or ) into spin-up and spin-down beams with respect to the new polarization direction. Again, only the spin-up component is shown. The probability for a particle to emerge with spin-up (↑) or spin-down (↓) is given by and , respectively. The resulting probabilities of ↑ and ↓ are shown for five selected angles.
The results of the Stern–Gerlach experiment can be simulated by a quantum computer. The qubits and correspond to the spin states ↑ and ↓, respectively. The initial state corresponds to the polarized beam leaving the first magnet. By an appropriate sequence of quantum gates, the results of the beam passing through the second magnet, with polarization angle , can be simulated. The statistical results are verified after a large number of runs on the quantum computer.



  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


The action of the single-qubit quantum gates can be represented by unitary matrices acting on the qubit :
identity (or IDLE): ,
Hadamard gate: ,
Pauli X (or NOT) gate: ,
phase (or gate: ,
gate: .
For example, the rotation is produced by the sequence
The probability of a result in the subsequent measurement is then given by
, or about 85% spin-up.
[1] Wikipedia. "Stern–Gerlach Experiment." (Jun 9, 2017) en.wikipedia.org/wiki/Stern-Gerlach_experiment.
[2] M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information: 10th Anniversary Edition, Cambridge: Cambridge University Press, 2010. doi:10.1017/CBO9780511976667.
[3] G. Fano and S. M. Blinder, Twenty-First Century Quantum Mechanics: Hilbert Space to Quantum Computers, New York: Springer Berlin Heidelberg, 2017.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2017 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+