gaussian_pulse_pwc

signals.gaussian_pulse_pwc(duration, segment_count, amplitude, width=None, center_time=None, drag=None, flat_duration=None, segmentation=SegmentationType.UNIFORM, *, name=None)

Create a Pwc representing a Gaussian pulse.

Parameters

  • duration (float) – The duration of the signal, TT.
  • segment_count (int) – The number of segments in the PWC. Must be at least four.
  • amplitude (float or complex or Tensor) – The amplitude of the Gaussian pulse, AA. It must either be a scalar or contain a single element.
  • width (float or Tensor or None , optional) – The standard deviation of the Gaussian pulse, σ\sigma. It must either be a scalar or contain a single element. Defaults to T/10T/10 or (Ttflat)/10(T-t_\mathrm{flat})/10 if flat_duration is passed.
  • center_time (float or None , optional) – The center of the Gaussian pulse, t0t_0. Defaults to half of the given value of the duration, T/2T/2.
  • drag (float or Tensor or None , optional) – The DRAG parameter, β\beta. If passed, it must either be a scalar or contain a single element. Defaults to no DRAG correction.
  • flat_duration (float or None , optional) – The amount of time to remain constant after the peak of the Gaussian, tflatt_\mathrm{flat}. If passed, it must be positive and less than the duration. Defaults to None, in which case no constant part is added to the Gaussian pulse.
  • segmentation (SegmentationType) – The type of segmentation for the signal. With a “MINIMAL” segmentation, most of the segments are placed in the non-constant parts of the signal. Defaults to “UNIFORM”, in which case the segments are uniformly distributed along the signal’s duration.
  • name (str or None , optional) – The name of the node.

Returns

The sampled Gaussian pulse. If no flat duration is passed then the pulse is evenly sampled between 00 and TT. If one is passed, the flat part of the pulse is described by one or two segments (depending on the values of center_time and segment_count), and the rest of the pulse is sampled with the remaining segments.

Return type

Pwc

SEE ALSO

Graph.signals.cosine_pulse_pwc : Create a Pwc representing a cosine pulse.

Graph.signals.gaussian_pulse_stf : Corresponding operation with Stf output.

Graph.signals.sech_pulse_pwc : Create a Pwc representing a hyperbolic secant pulse.

Graph.signals.square_pulse_pwc : Create a Pwc representing a square pulse.

Notes

The Gaussian pulse is defined as

Gaussian(t)={A(1iβ(tt1)σ2)exp((tt1)22σ2)ift<t1=t0tflat/2Aift0tflat/2t<t0+tflat/2A(1iβ(tt2)σ2)exp((tt2)22σ2)ift>t2=t0+tflat/2. \mathop{\mathrm{Gaussian}}(t) = \begin{cases} A \left(1-\frac{i\beta (t-t_1)}{\sigma^2}\right) \exp \left(- \frac{(t-t_1)^2}{2\sigma^2} \right) &\mathrm{if} \quad t < t_1=t_0- t_\mathrm{flat}/2\\ A &\mathrm{if} \quad t_0-t_\mathrm{flat}/2 \le t < t_0+t_\mathrm{flat}/2 \\ A \left(1-\frac{i\beta (t-t_2)}{\sigma^2}\right) \exp \left(- \frac{(t-t_2)^2}{2\sigma^2} \right) &\mathrm{if} \quad t > t_2=t_0+t_\mathrm{flat}/2 \end{cases} .

If the flat duration is zero (the default setting), this reduces to

Gaussian(t)=A(1iβ(tt0)σ2)exp((tt0)22σ2). \mathop{\mathrm{Gaussian}}(t) = A \left(1-\frac{i\beta (t-t_0)}{\sigma^2}\right) \exp \left(- \frac{(t-t_0)^2}{2\sigma^2} \right) .

Examples

Define a Gaussian PWC pulse.

>>> graph.signals.gaussian_pulse_pwc(
...     duration=3.0,
...     segment_count=100,
...     amplitude=1.0,
...     name="gaussian",
... )
<Pwc: name="gaussian", operation_name="discretize_stf", value_shape=(), batch_shape=()>
>>> result = bo.execute_graph(graph=graph, output_node_names="gaussian")
>>> result["output"]["gaussian"]
{
    'durations': array([0.03, 0.03, ..., 0.03, 0.03]),
    'values': array([4.77913973e-06, 7.80106730e-06, ..., 7.80106730e-06, 4.77913973e-06]),
    'time_dimension': 0
}

Define a flat-top Gaussian PWC pulse with a DRAG correction with minimal segmentation.

>>> graph.signals.gaussian_pulse_pwc(
...     duration=3.0,
...     segment_count=100,
...     amplitude=1.0,
...     width=0.2,
...     center_time=1.5,
...     drag=0.1,
...     flat_duration=0.2,
...     segmentation="MINIMAL",
...     name="drag",
... )
<Pwc: name="drag", operation_name="time_concatenate_pwc", value_shape=(), batch_shape=()>
>>> result = bo.execute_graph(graph=graph, output_node_names="gaussian_drag")
>>> result["output"]["gaussian_drag"]
{
    'durations': array([0.02857143, 0.02857143, ..., 0.02857143, 0.02857143]),
    'values': array([3.76551948e-11+1.30448351e-10j, 1.00289674e-10+3.40268532e-10j, ...,
                     1.00289593e-10-3.40268262e-10j, 3.76551637e-11-1.30448246e-10j]),
    'time_dimension': 0
}

Define a Gaussian pulse with optimizable parameters.

>>> amplitude = graph.optimizable_scalar(
...     lower_bound=0, upper_bound=2.*np.pi, name="amplitude"
... )
>>> width = graph.optimizable_scalar(
...     lower_bound=0.1, upper_bound=2., name="width"
... )
>>> drag = graph.optimizable_scalar(
...     lower_bound=0, upper_bound=1., name="drag"
... )
>>> graph.signals.gaussian_pulse_pwc(
...     duration=3.0,
...     segment_count=100,
...     amplitude=amplitude,
...     width=width,
...     drag=drag,
...     name="gaussian",
... )
<Pwc: name="gaussian", operation_name="discretize_stf", value_shape=(), batch_shape=()>

Was this useful?