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 {δtn} for each segment, in units of seconds. Every element must be positive. Represented as a 1D array of length N, where N is number of segments.
- rabi_rates (np.ndarray , optional) – The Rabi rates {Ωn} for each segment, in units of radians per second. Every element must be nonnegative. Represented as a 1D array of length N, where N 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 {ϕn} for each segment. Represented as a 1D array of length N, where N is number of segments. You can omit this field if the azimuthal angle is zero on all segments.
- detunings (np.ndarray , optional) – The detunings {Δn} for each segment, in units of radians per second. Represented as a 1D array of length N, where N 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:
H(t)=21(Ω(t)eiϕ(t)σ−+Ω(t)e−iϕ(t)σ+)+21Δ(t)σz,where Ω(t) is the Rabi rate, ϕ(t) is the azimuthal angle (or drive phase), Δ(t) is the detuning, σ±=(σx∓iσy)/2, and σk are the Pauli matrices.
The controls are piecewise-constant, meaning Ω(t)=Ωn for tn−1≤t<tn, where t0=0 and tn=tn−1+δtn (and similarly for ϕ(t) and Δ(t)).
For each segment of the control, the constant Hamiltonian effects unitary time evolution of the form:
Un=exp[−i2θn(un⋅σ)],where θn=Ωn2+Δn2δtn, un is the unit vector in the direction (Ωncosϕn,Ωnsinϕn,Δn), and σ=(σx,σy,σz). This unitary time evolution corresponds to a rotation of the Bloch sphere of an angle θn about the axis un.
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. |