Spin

class Spin(dimension, name, qubit_subspace, gyromagnetic_ratio, zero_field_splitting=0.0, local_quasistatic_noise=None)

Represent a spin.

Initialize a spin.

Parameters:
  • dimension (int) – Dimension, must be 2 for spin-1/2, 3 for spin-1, and so on.

  • name (str) – Name of the spin.

  • qubit_subspace (Tuple[float, float]) – The quantum numbers that defines the qubit subspace.

  • gyromagnetic_ratio (float) – Gyromagnetic ratio of the spin (in \(\text{MHz}/\text{T}\)).

  • zero_field_splitting (float) – Zero-field splitting (or quadrupole moment) of the spin (in \(\text{MHz}\)).

  • local_quasistatic_noise (Components1D | None) – Local-quasistatic noise components of the spin (in \(\text{MHz}\)).

Raises:

SimphonyError – If an invalid dimension or qubit subspace is provided.

Hint

For example, one can define an NV electron spin as:

spin = Spin(
    dimension = 3,
    name = 'NV-e',
    qubit_subspace = (0, -1),
    gyromagnetic_ratio = 28020, # MHz
    zero_field_splitting = 2880, # MHz
    local_quasistatic_noise = [0, 0, 1] # MHz
)

Attributes

dimension

Dimension, it is 2 for spin-1/2, 3 for spin-1, and so on.

gyromagnetic_ratio

Gyromagnetic ratio of the spin (in \(\text{MHz}/\text{T}\)).

local_quasistatic_noise

The local quasistatic noise components (in \(\text{MHz}\)).

name

Name of the spin.

operator

Spin operator.

operator_qubit_subspace

Pauli operators defined on the qubit subspace.

quantum_nums

Quantum numbers corresponding to spin operator.

qubit_subspace

Qubit subspace that is defined by a two-length subset of the quantum_nums.

rotating_frame_frequency

Rotating frame frequency corresponding to spin.

virtual_phase

Virtual z-phase corresponding to spin.

zero_field_splitting

Zero-field splitting (or quadrupole moment) (in \(\text{MHz}\)).