DrivenControl
class qctrlopencontrols.DrivenControl(durations, rabi_rates=None, azimuthal_angles=None, detunings=None, name=None)
A piecewise-constant driven control for a single qubit.
Parameters
- durations (np.ndarray) – The durations for each segment, in units of seconds. Every element must be positive. Represented as a 1D array of length , where is number of segments.
- rabi_rates (np.ndarray , optional) – The Rabi rates for each segment, in units of radians per second. Every element must be nonnegative. Represented as a 1D array of length , where is number of segments. You can omit this field if the Rabi rate is zero on all segments.
- azimuthal_angles (np.ndarray , optional) – The azimuthal angles for each segment. Represented as a 1D array of length , where is number of segments. You can omit this field if the azimuthal angle is zero on all segments.
- detunings (np.ndarray , optional) – The detunings for each segment, in units of radians per second. Represented as a 1D array of length , where is number of segments. You can omit this field if the detuning is zero on all segments.
- name (string , optional) – An optional string to name the control. Defaults to
None
.
Notes
This class represents a control for a single driven qubit with Hamiltonian:
where is the Rabi rate, is the azimuthal angle (or drive phase), is the detuning, , and are the Pauli matrices.
The controls are piecewise-constant, meaning for , where and (and similarly for and ).
For each segment of the control, the constant Hamiltonian effects unitary time evolution of the form:
where , is the unit vector in the direction , and . This unitary time evolution corresponds to a rotation of the Bloch sphere of an angle about the axis .
Methods
export | Returns a dictionary formatted for plotting using the Q-CTRL Visualizer package. |
export_to_file | Prepares and saves the driven control in a file. |
resample | Returns a new driven control obtained by resampling this control. |
Attributes
amplitude_x | Returns the x-amplitude. |
amplitude_y | Returns the y-amplitude. |
angles | Returns the Bloch sphere rotation angles. |
directions | Returns the Bloch sphere rotation directions. |
duration | Returns the total duration of the control. |
maximum_detuning | Returns the maximum detuning of the control. |
maximum_duration | Returns the duration of the longest control segment. |
maximum_rabi_rate | Returns the maximum Rabi rate of the control. |
minimum_duration | Returns the duration of the shortest control segment. |
number_of_segments | Returns the number of segments. |
times | Returns the boundary times of the control segments. |