DrivingField

class DrivingField(name, direction)

Represent an AC magnetic field.

The AC magnetic field is used to drive the spin system. At initialization, only the direction of the field is set. Time-dependence of the field can be set by adding a pulse with the add_..._pulse() methods.

Initialize a driving magnetic field.

Parameters:
  • name (str) – Name of the driving field.

  • direction (List[float]) – Direction of the driving field. If not a unit vector, it will be normalized.

Hint

An x-directional microwave field can be initialized with:

driving_field_MW = simphony.DrivingField(direction = [1, 0, 0], name = 'MW_x')

Methods

add_discrete_pulse(samples, frequency, dt[, ...])

Add a pulse to the driving field with piecewise-constant envelope.

add_pulse(pulse)

Add a general pulse to the driving field.

add_rectangle_pulse(amplitude, frequency, ...)

Add a pulse to the driving field with rectangular envelope (constant-amplitude).

add_wait(duration)

Add an idle section to the driving field.

plot_pulses([function, start, end, ax])

Plot the added pulse(s).

remove_all_pulses()

Remove all previously added pulses from the driving field.

Attributes

last_pulse_end

End time of the latest-ending pulse.

name

Name of the driving field.

pulses

Pulses added to the driving field.

vec

Vector corresponding the unit vector of the magnetic field.

x

The \(x\) components of the magnetic field's unit vector.

y

The \(y\) components of the magnetic field's unit vector.

z

The \(z\) components of the magnetic field's unit vector.