remove_spin

Model.remove_spin(spin, include_interactions=False)

Remove a spin from the model.

Parameters:
  • spin (BaseSpin | str) – Spin instance or spin name.

  • include_interactions (bool) – Whether interactions involving the spin should be removed automatically.

Raises:

SimphonyError – If the spin is not part of the model or other attached components still reference it.

Return type:

None

Note

Removing a spin is conservative by default. Interactions referencing the spin must be removed explicitly first, unless include_interactions=True is used. Targeted static fields and driving fields referencing the spin must always be removed explicitly before the spin can be removed.