---
title: "Pulse Switching of a Nanomagnet Interactive Lab | Sandbox Physics"
description: "How can a field pulse shorter than a nanosecond flip a nanomagnet, and why does a longer pulse fail? The pulse does not push the magnetization straight over."
canonical_url: "https://sandboxphysics.com/labs/macrospin-switching/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/macrospin-switching/"
last_modified: "2026-10-30"
---

Micromagnetics · Single-domain switching

# Pulse Switching of a Nanomagnet

**How can a field pulse shorter than a nanosecond flip a nanomagnet, and why does a longer pulse fail?** The pulse does not push the magnetization straight over. It tips the moment slightly out of the film, and the strong field from the film's own magnetic surfaces then spins it around in the plane. If the pulse ends after half a turn, the magnet settles pointing the other way; if it ends after a full turn, the magnet comes back, so a longer pulse can fail.

Hit a 500 nm permalloy bar with a field pulse and follow its magnetization around a sphere. Each cell of the switching map is a full trajectory, so the pulse lengths that flip the bar show up as stripes.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

The bar is the 500 nm by 125 nm by 3 nm permalloy element of the muMAG standard problem 4, with saturation magnetization 800 kA/m. Here it moves as one rigid moment (a macrospin), so it has no domains, no edge modes and no spin waves; the real element reverses through nonuniform states. Its only anisotropy is the shape anisotropy of a uniformly magnetized rectangular prism (Aharoni 1998). The Landau-Lifshitz-Gilbert equation is integrated with fourth-order Runge-Kutta steps of 0.25 ps (1 ps for the map). Temperature is left out; a 1 degree starting tilt stands in for thermal disorder. A run counts as switched or returned once the pulse is off and its energy has fallen below the saddle between the two wells.

Outcome: switched to the other well. Each map cell is one full trajectory from the same equation; the white ring marks the current pulse.

More numbers and the saved record

Outcome fixed once the energy fell below the saddle at $0.14\,\mathrm{ns}$

Last sign change of the easy-axis component in the window $0.09\,\mathrm{ns}$

Switching map: switched trajectories / trajectories run $422\ /\ 1280$

Demagnetizing factors along x, y, z $0.0092,\ 0.0382,\ 0.9526$

In-plane shape-anisotropy field $29.1\,\mathrm{mT}$

Largest change of the unit length within one step, before renormalizing $1.54\times10^{-13}$

The JSON record holds the parameters, the model constants, the sampled trajectory with its energy, and every cell of the switching map.

[Course: how magnetization finds its own texture](https://sandboxphysics.com/stories/micromagnetics/)

Physics tutorial

## Flipping a nanomagnet with a timed kick

**Background** A thin permalloy bar 500 nm long has two stable states: magnetized toward +x or toward -x. Magnetic memories and logic flip such bars with field or current pulses lasting well under a nanosecond.

**Why it matters** A field along -x would flip the bar slowly, by letting damping drain energy turn after turn. A field across the bar carries it over about five times sooner, but only if the pulse ends at the right moment.

Start with the essentials

- **Focus question**: How can a field pulse shorter than a nanosecond flip a nanomagnet, and why does a longer pulse fail?
- **One-sentence intuition**: A transverse pulse starts a precession around the film normal; the bar switches when the pulse ends after an odd number of half turns and its energy then sits below the saddle.

### Core mathematical model

#### Landau-Lifshitz-Gilbert equation

$$
\frac{\mathrm{d}\mathbf{m}}{\mathrm{d}t}=-\gamma_0\,\mathbf{m}\times\mathbf{H}_{\mathrm{eff}}+\alpha\,\mathbf{m}\times\frac{\mathrm{d}\mathbf{m}}{\mathrm{d}t}
$$

The first term turns $\mathbf{m}$ around the effective field; the second, with damping $\alpha$, pulls it toward the field. Both keep $\lvert\mathbf{m}\rvert=1$. Here $\gamma_0=2.211\times10^{5}\,\mathrm{m\,A^{-1}\,s^{-1}}$.

#### Effective field of a uniformly magnetized bar

$$
\mathbf{H}_{\mathrm{eff}}=\mathbf{H}_{\mathrm{p}}+\mathbf{H}_{\mathrm{b}}-M_{\mathrm{s}}\left(N_x m_x,\;N_y m_y,\;N_z m_z\right)
$$

For the 500 by 125 by 3 nm prism the demagnetizing factors are $N_x=0.0092$, $N_y=0.0382$ and $N_z=0.953$, so $x$ is the easy axis and leaving the film plane costs the most energy.

#### Damping only removes energy

$$
\frac{\mathrm{d}E}{\mathrm{d}t}=-\frac{\alpha\,\gamma_0\,\mu_0 M_{\mathrm{s}}}{1+\alpha^{2}}\,\bigl\lvert\mathbf{m}\times\mathbf{H}_{\mathrm{eff}}\bigr\rvert^{2}\le 0
$$

With the field held fixed, the energy per volume can only fall. Once the pulse is off and the energy is below the saddle, the moment can no longer reach the other well, so the outcome is decided.

#### Kittel frequency of small oscillations

$$
f_{\mathrm{K}}=\frac{\gamma_0}{2\pi}\sqrt{\bigl[H_{\mathrm{b}}+(N_y-N_x)M_{\mathrm{s}}\bigr]\bigl[H_{\mathrm{b}}+(N_z-N_x)M_{\mathrm{s}}\bigr]}
$$

Without bias field this gives 4.66 GHz; the ringing measured from the simulated trajectory after a small kick is 4.65 GHz.

### Common difficulties

#### Longer is not stronger

**Typical misconception** If a pulse flips the magnet, a longer or stronger pulse will flip it too.

**Better mental model** Precessional switching is about timing. The pulse keeps the moment turning; what matters is where the moment is when the pulse ends.

#### Damping is not the engine here

**Typical misconception** Damping is what drags the moment to the other side.

**Better mental model** With a transverse pulse, precession carries the moment across and damping only settles it. With a field along -x, damping does the work, and the reversal takes several times longer.

#### What the model leaves out

**Typical misconception** A real 500 nm bar reverses as one rigid moment.

**Better mental model** The bar is the 500 nm by 125 nm by 3 nm permalloy element of the muMAG standard problem 4, with saturation magnetization 800 kA/m. Here it moves as one rigid moment (a macrospin), so it has no domains, no edge modes and no spin waves; the real element reverses through nonuniform states. Its only anisotropy is the shape anisotropy of a uniformly magnetized rectangular prism (Aharoni 1998). The Landau-Lifshitz-Gilbert equation is integrated with fourth-order Runge-Kutta steps of 0.25 ps (1 ps for the map). Temperature is left out; a 1 degree starting tilt stands in for thermal disorder. A run counts as switched or returned once the pulse is off and its energy has fallen below the saddle between the two wells.

### Run the experiment

1. 01

   #### Watch one flip

   Start from A half-turn pulse flips it and let the run play.

   **What to observe:** The trail lifts slightly off the equator, swings around to -x and spirals in. The energy climbs above the saddle line during the pulse and drops below it once the pulse stops.

2. 02

   #### Make the pulse longer

   Drag Pulse length from 140 ps up to 350 ps.

   **What to observe:** The moment makes almost a full turn while the pulse is on and settles back at +x. Same field, same energy kick, opposite result.

3. 03

   #### Read the switching map

   Look at the right-hand map, then click cells in different stripes.

   **What to observe:** Red and blue stripes alternate along the pulse length. Each stripe is one more half turn; stronger pulses turn faster, so the stripes bend toward shorter pulses. Below about 20 mT nothing switches.

4. 04

   #### Switch off damping

   Choose Without damping it circles forever.

   **What to observe:** After the pulse the energy stays flat above the saddle and the moment keeps circling both wells. Its unit length still holds to better than one part in a trillion per step.

5. 05

   #### Compare with Kittel

   Choose A small kick rings at the Kittel frequency, then raise the bias field in the advanced group.

   **What to observe:** The ringing frequency read from the trajectory stays within half a percent of the Kittel formula as the bias changes.

Physical conclusion

A transverse pulse is a timer: half a precession turn flips the bar, a full turn brings it back, and damping decides only how quickly it settles.

## Related experiments and articles

Micromagnetics · Reading path

### Micromagnetics: how magnetization finds its own texture

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **A magnetic moment circles a field before it settles**](https://sandboxphysics.com/stories/micromagnetics/precession-and-damping/)
2. [Article **A nanomagnet’s shape sets its easy axis and how it switches**](https://sandboxphysics.com/stories/micromagnetics/shape-anisotropy-and-switching/)

Fields & matter · Starter path

## From a field to an electron microscope

Map an electric field and steer a charged particle. Then find the electron's wavelength and use electron beams to see a crystal and a surface.

[Start here → **Make an Electric Field Visible** Move the probe around a dipole and check that the field always points downhill on the potential landscape. Observe · 8 min](https://sandboxphysics.com/labs/electric-field/)

1. [1 Make an Electric Field Visible](https://sandboxphysics.com/labs/electric-field/)
2. [2 A Charge Bending through Fields](https://sandboxphysics.com/labs/charged-particle/)
3. [3 Electron Wavelength & Voltage](https://sandboxphysics.com/labs/electron-wavelength/)
4. [4 Electron Diffraction & Reciprocal Space](https://sandboxphysics.com/labs/electron-diffraction/)
5. [5 TEM Bright Field, Dark Field & SAED](https://sandboxphysics.com/labs/tem-mode-selector/)
6. [6 SEM Secondary-Electron Topography](https://sandboxphysics.com/labs/sem-topography/)

[View the full path →](https://sandboxphysics.com/topics/fields-and-matter/#starter-path)
