add_static_field

Model.add_static_field(static_field, target_spins=None)

Add a static field to the model.

Parameters:
  • static_field (StaticField) – Static field instance to attach.

  • target_spins (str | Sequence[str] | None) – Optional override of the spins affected by the field. None keeps or sets the field to act on all spins. Providing a value replaces any existing target list and emits a warning when it changes.

Raises:

SimphonyError – If the provided targets reference spins that are not part of the model.