University of Kurdistan logoNanoelectronics · Week 16 Study ToolkitProf. Mohammad Razaghi
University of Kurdistan logo
WEEK 16 · SPIN, QUANTUM TO CLASSICAL, p-BITS · C8

Rotating an electron, quantum to classical, probabilistic spin logic

Study toolkit for students · based on S. Datta, Lessons from Nanoelectronics, Part B, Chapters 23–25
Prof. Mohammad Razaghi · University of Kurdistan

1This week's plan

Read
Datta Part B, Chapters 23, 24 and 25: rotating an electron (spinors, Pauli matrices, Zeeman, Rashba, precession), quantum to classical (Gⁿ = ½(N I + σ·S), pseudospin, entropy), and probabilistic spin logic (p-bits).
Run
Colab notebook week16_spin_pbit_lab_C8.ipynb (circular session C8): spinors, Γ(n̂), spin valve, precession, Rashba, Gⁿ, entropy, p-bit AND gate; two widgets.
Prepare
Quiz (aim for 8/10), problems, and your final presentation plan (one page, due at the end of C8).

By the end of the week you should be able to

  1. Convert between spinor and arrow, nk = ψ†σkψ.
  2. Write Γ = (α+β)/2 [I + P n̂·σ] and compute the spin-valve MR = 2P²/(1−P²).
  3. State the probe signal (1 + P cos θ)/2 and the precession frequency ω = 2µB/ħ.
  4. Explain Rashba spin–momentum locking.
  5. Extract N and S from Gⁿ and compute the entropy of a spin.
  6. Write the p-bit equation and explain how a p-circuit AND gate runs backwards.

Optional video: Datta's nanoHUB-U course, Unit 4: L4.1 to L4.7.

2Key ideas in five sentences

  1. Spin is a rotatable arrow stored as a spinor. Two complex numbers (cos(θ/2)e−iφ/2, sin(θ/2)eiφ/2) give the arrow through n = ψ†σψ; rotating by 360° flips the sign of ψ.
  2. A magnet can point anywhere. Γ = (α+β)/2 [I + P n̂·σ]; the valve has MR = 2P²/(1−P²) and the probe signal is P cos θ, i.e. (1 + P cos θ)/2 of the injected signal.
  3. Fields rotate spins. A Zeeman field gives precession at ω = 2µB/ħ; the Rashba term η(σxky − σykx) locks spin ⟂ k, so current carries spin.
  4. Quantum becomes classical by throwing information away. Gⁿ/2π = ½(N I + σ·S); keeping only the diagonal blocks gives spin diffusion; pseudospins appear for any two-component wave; one spin of polarization P has entropy −Σ p ln p.
  5. Magnets are bits, spins are q-bits, fluctuating magnets are p-bits. V = sgn[tanh(ν/V₀) + rand(−1,1)], νi = ΣJijVj; networks of p-bits sample Boltzmann distributions and can be run in reverse by clamping outputs.

3Equation sheet

µ = (µup + µdn)/2,   µS = (µup − µdn)/2Eq. 23.1
Charge and spin potentials.
µP = µ + P µS (m̂·ŝ),   P = (gup − gdn)/(gup + gdn)Eqs. 23.3–23.5
Probe magnet.
ψ = (cos(θ/2)e−iφ/2, sin(θ/2)e+iφ/2)Eqs. 23.6–23.7
Spinor along n̂.
σxσy = iσz (cyclic), σk² = I, Tr σk = 0Eqs. 23.20, 24.3
Pauli matrices.
MR = GP/GAP − 1 = 2P²/(1 − P²)Eq. 23.9
MTJ; resistor model P²/(1−P²).
Γ = (α+β)/2 [I + P n̂·σ] = V diag(α, β) V†Eqs. 23.14–23.21
Contact pointing along n̂.
HB = µel σ·B,   HR = η(σxky − σykx)Eqs. 23.22, 23.26
Zeeman and Rashba.
ω = 2µelB/ħ,   dn/dt = ω ẑ × nEqs. 23.30, 23.33
Precession.
Gⁿ/2π = ½(N I + σ·S)Eqs. 24.1–24.2
N = Tr Gⁿ/2π, S = Tr[σGⁿ]/2π.
S/k = −Σ pi ln pi,   p = (1 ± P)/2Eq. 24.11
Entropy of one spin.
Vi = sgn[tanh(νi/V₀) + rand(−1,+1)],   νi = Σj JijVjEqs. 25.6
Three-terminal p-bit and p-circuit.

4Physics refresher: complex numbers, matrices, probability

Angular momentum and spin

An electron has spin ħ/2 and magnetic moment µB = qħ/2m = 9.27×10⁻²⁴ A m² (g ≈ 2). A magnetic field B exerts a torque: the moment precesses around B at the Larmor frequency, like a spinning top around gravity.

Eigenvectors of a Hermitian 2×2 matrix

H = a I + b·σ has eigenvalues a ± |b| and eigenvectors with spin along ±b̂. This is why every 2×2 matrix is a spin in a field.

Why half angles?Rotating about z by angle α multiplies up by e−iα/2 and down by e+iα/2. At α = 2π both get −1. Observable quantities like ψ†σψ are unchanged, but the sign matters in interference experiments.
Entropy of a probability distributionS/k = −Σp ln p is largest for equal probabilities (ln 2 for two outcomes) and zero when one outcome is certain. In bits divide by ln 2.
Boltzmann samplingA network with energy E(m) = −(½mᵀJm + h·m) visited by sequential updates with probability ½(1 + tanh(I₀ν)) for +1 settles to p ∝ exp(−I₀E).

5Glossary

TermMeaning
SpinorTwo-component complex wavefunction (ψup, ψdn) of a spin-½.
Bloch sphereUnit sphere whose points are the arrows n̂ = ψ†σψ.
Pauli matricesσx, σy, σz: traceless, square to I.
Polarization P(α − β)/(α + β): spin selectivity of a magnetic contact.
MTJMagnetic tunnel junction: two magnets separated by a tunnel barrier.
PrecessionRotation of the spin arrow about B at ω = 2µB/ħ.
Rashba couplingSpin–orbit term η(σxky − σykx) in 2D channels.
PseudospinAny two-component state viewed as a spinor (e.g. right/left movers).
p-bitProbabilistic bit fluctuating between 0 and 1 with tunable probabilities.
p-circuitNetwork of p-bits coupled by Jij; samples a Boltzmann distribution.

6Calculators

Contact matrix Γ for a magnet at angle θ (in the x–z plane)

P = (α−β)/(α+β)
Γ₁₁
Γ₂₂
Γ₁₂ (real)

Spin-valve magnetoresistance

MR (MTJ) = 2P²/(1−P²)
MR (resistor) = P²/(1−P²)

Precession frequency

ω (rad/s)
f = ω/2π (GHz)
period (ps)

Entropy of a spin

S/k (nats)
S (bits)

7Self-check quiz

Click an answer: you get instant feedback. Score: 0 / 0

8Practice problems

µB = 9.274×10⁻²⁴ J/T; ħ = 1.0546×10⁻³⁴ J s; ln 2 = 0.6931.

P1. Spinor to arrowEASY

A spin has θ = 90°, φ = 0. Write its spinor and its n.

Solutionψ = (1/√2)(1, 1); n = (1, 0, 0), i.e. along +x.
P2. Pauli algebraEASY

Compute σxσy and σyσx.

Solutionσxσy = iσz; σyσx = −iσz. They anticommute.
P3. PolarizationEASY

A contact has α = 1, β = 0.25. Find P.

SolutionP = 0.75/1.25 = 0.6.
P4. Spin valveEASY

P = 0.6: MR for an MTJ and for the resistor model.

Solution2P²/(1−P²) = 0.72/0.64 = 1.125; resistor model: 0.5625.
P5. Γ matrixMEDIUM

α = 1, β = 0.2, magnet along y (θ = 90°, φ = 90°). Write Γ.

HintΓ = (α+β)/2 (I + P σ·n̂).
SolutionΓ = 0.6 I + 0.4 σy = [[0.6, −0.4i], [0.4i, 0.6]].
P6. Probe signalMEDIUM

P = 1, θ = 90° between injector and probe: what fraction of the full signal? What would photons give?

Solution(1 + cos 90°)/2 = 0.5; photons: cos²90° = 0.
P7. PrecessionMEDIUM

B = 0.1 T, g = 2. Find f and the period.

Hintω = 2µBB/ħ.
Solutionω = 2(9.274×10⁻²⁴)(0.1)/1.0546×10⁻³⁴ = 1.759×10¹⁰ rad/s; f = 2.80 GHz; period = 357 ps.
P8. Rashba splittingMEDIUM

On the lattice with η = 0.2t, a = 1, k = (0.5, 0.3)/a: splitting?

Hint2η√(sin²kx + sin²ky)/a.
Solution2(0.2)√(0.2298 + 0.0873) = 0.2253 t.
P9. GⁿMEDIUM

Gⁿ/2π = ½ [[1.8, 0.4−0.3i],[0.4+0.3i, 0.2]]. Find N, S and the polarization |S|/N.

HintCompare with Eq. 24.1.
SolutionN + Sz = 1.8 and N − Sz = 0.2 ⇒ N = 1.0, Sz = 0.8; Sx − iSy = 0.4 − 0.3i ⇒ Sx = 0.4, Sy = 0.3; |S| = 0.943 so P = 0.943.
P10. EntropyMEDIUM

Entropy of a spin with P = 0.5, in nats and bits.

Solutionp = (0.75, 0.25): −0.75 ln 0.75 − 0.25 ln 0.25 = 0.5623 nats = 0.8113 bits.
P11. p-bitHARDER

A p-bit has input ν/V₀ = 0.5. Find ⟨V⟩ and the probability of +1.

Solution⟨V⟩ = tanh 0.5 = 0.462; P(+1) = (1 + 0.462)/2 = 0.731.

9Common mistakes

MISTAKE"A spin pointing along −z has wavefunction (0, −1)... any minus sign is a different state."
CORRECTOverall phases do not change the state; (0, −1) and (0, 1) describe the same spin.
MISTAKE"Rotating the arrow by θ rotates the spinor by θ."
CORRECTThe spinor rotates by θ/2: hence cos²(θ/2) for electrons.
MISTAKE"MR = P²/(1−P²) always."
CORRECTThat is the resistor model; the tunnelling (MTJ) result is twice as large.
MISTAKE"Rashba spin lies along k."
CORRECTThe spin is in the plane, perpendicular to k.
MISTAKE"Gⁿ only tells the number of electrons."
CORRECTIts 2×2 blocks also hold the three components of the spin vector.
MISTAKE"A p-bit is a noisy bit that should be avoided."
CORRECTThe fluctuation is the resource: p-circuits sample distributions and invert functions.

10Explore

Files are in the course folder (course_materials).

Mini-investigations (15 min each)

  1. In the spin widget find the polarization for which the MTJ magnetoresistance reaches 100 %. Check with the calculator.
  2. In the p-bit widget find the smallest I₀ for which more than 95 % of time is spent in valid rows.
  3. In the notebook, add a Zeeman term to the Rashba lattice and plot the spin texture on the ring.

11Final presentation

Format: 10 min + 5 min questions. One page plan due at the end of C8.

CriterionWeightWhat we look for
Physics correctness40 %Right equation, assumptions stated, units checked.
Clarity of the visual25 %One figure that carries the message.
Own calculation25 %A run of your own, with numbers you can defend.
Questions10 %You can say what the model cannot do.

Plan template

  1. Topic and the physical question.
  2. Equation(s) and approximations.
  3. The calculation you will run and what you expect.
  4. The limitation you will state.

12Can I…?

Tick what you can do without notes. Your ticks are saved in this browser.

13After the course

You now have the full NEGF toolkit: contacts, scattering, spin and interactions. Good next steps: Datta's Quantum Transport: Atom to Transistor, nanoHUB-U, and recent literature on p-bits and spintronics.