paraqeet.signal.pwc_generator.PWCGenerator#
- class paraqeet.signal.pwc_generator.PWCGenerator(envelopes, tlist, max_amplitude=None)[source]#
Bases:
GeneratorConvert a complex envelope to PWC pulse.
This sets the pulse parameters to the tlist points. The gradient of the pulse wrt the PWC bins is 1 at that time point and zero everywhere else.
This Generator doesn’t add the LO signal to the envelope pulse. Driving with a PWC pulse (without the LO) is usually done in the rotating frame of drive.
This Generator converts the input complex pulse to the ‘in-phase’ and ‘out-of-phase’ components. This naming convention is used by following [Krantz2019]. In the literature of signal processing these are also called ‘in-phase’ and ‘quadrature’ components (refer to https://en.wikipedia.org/wiki/In-phase_and_quadrature_components).
[Krantz2019] Krantz et al., “A Quantum Engineer’s Guide to Superconducting Qubits.” Applied Physics Reviews 6(2019).
- _envs: list[Waveform]
List of Envelopes
- _tlist: Array
Left time points for discretization. These can be used for propagation and optimization.
- _time_grid: Array
Time grid used to discretize the pulse. These are shifted from tlist by dt, and doesn’t include zero time.
- _max_amplitude: float
Maximum amplitude of the drive
- _inphase: Quantity
The in-phase component of the pulse
- _outofphase: Quantity
The out-of-phase component of the pulse
- _optimizable_paramters: list[Quantity]
List of own parameters that would be optimized by the optimizer.
- _multiply_flat_top: bool
Flag to multiply flat-top-Gaussain pulse to the signal to ensure it starts and ends at zero.
- Parameters:
envelopes (List[Waveform]) – List of input devices.
tlist (Array)
max_amplitude (float | None)
- __init__(envelopes, tlist, max_amplitude=None)[source]#
- Parameters:
envelopes (list[Waveform] | None)
tlist (Array)
max_amplitude (float | None)
Methods
__init__(envelopes, tlist[, max_amplitude])get_gradient_at_timestep(time)Return signal gradient wrt inphase and out-of-phase.
Return number of PWC pixels generated by the PWC generator.
Return a list of parameters.
get_value(times)Generate the PWC signal for time(s) 't'.
get_value_and_gradient(times)Return signal gradient wrt inphase and out-of-phase.
set_all_optimizable_parameters(all_params)Set all optimizable parameters in the optimization.
set_optimizable_parameters(params)Set specified parameters to be optimized.
Attributes
Get the optimizable parameters
Gets the list of envelopes.
Get the maximum drive amplitude.
Flag to multiply the pulse with a FlatTop.
Get the name of the parameter.
Get the optimizable parameters
Get time grid discretization for generating PWC pulse.
- property all_optimizable_parameters: list[Quantity]#
Get the optimizable parameters
- Returns:
The list of all the optimizable parameters considered in the optimization
- Return type:
list[Quantity]
- property envs: list[Waveform]#
Gets the list of envelopes.
- Returns:
The list of waveforms associated with the generator.
- Return type:
list[Waveform]
- get_gradient_at_timestep(time)[source]#
Return signal gradient wrt inphase and out-of-phase.
This returns a list of ones as the gradient of the envelope wrt a step is 1 for that time bin and 0 everywhere else.
- Parameters:
time (Array) – One time step.
- Returns:
PWC signal gradients.
- Return type:
Array
- get_number_of_pwc_pixels()[source]#
Return number of PWC pixels generated by the PWC generator.
- Return type:
int
- get_parameters()[source]#
Return a list of parameters.
Return the inphase and out-of-phase as parameters.
- Returns:
All Parameters describing the signal.
- Return type:
list[Quantity]
- get_value(times)[source]#
Generate the PWC signal for time(s) ‘t’.
- Parameters:
times (Array) – One-dimensional vector of timestamps.
- Returns:
Returns the signal vector.
- Return type:
Array
- get_value_and_gradient(times)[source]#
Return signal gradient wrt inphase and out-of-phase.
This returns a list of ones as the gradient of the envelope wrt a step is 1 for that time bin and 0 everywhere else.
- Parameters:
times (Array) – Array of time steps.
- Returns:
PWC signal gradients.
- Return type:
Array
- property max_amplitude: float#
Get the maximum drive amplitude.
- Return type:
The value of the maximum drive amplitude.
- property multiply_flat_top: bool#
Flag to multiply the pulse with a FlatTop.
This can be used to make the start and end values zeros and force the PWC pulse to change smoothly.
- Returns:
multiply_flat_top – Flag value for multiply_flat_top.
- Return type:
bool
- property name: str | None#
Get the name of the parameter.
- Returns:
Name of the parameter.
- Return type:
str | None
- property optimizable_parameters: list[Quantity]#
Get the optimizable parameters
- Returns:
The list of optimizable parameters associated with the object.
- Return type:
list[Quantity]
- set_all_optimizable_parameters(all_params)[source]#
Set all optimizable parameters in the optimization.
- set_optimizable_parameters(params)[source]#
Set specified parameters to be optimized.
Optimizable parameters can be inphase and out-of-phase.
- Parameters:
params (list[Quantity])
- Return type:
None
- property tlist: Array#
Get time grid discretization for generating PWC pulse.
- Returns:
Array of time points at which envelope is discretized.
- Return type:
Array