gaussian_pulse_stf
- signals.gaussian_pulse_stf(amplitude, width, center_time, drag=None)
Create an Stf representing a Gaussian pulse.
- Parameters:
amplitude (float or complex or Tensor) – The amplitude of the Gaussian pulse, \(A\). It must either be a scalar or contain a single element.
width (float or Tensor) – The standard deviation of the Gaussian pulse, \(\sigma\). It must either be a scalar or contain a single element.
center_time (float or Tensor) – The center of the Gaussian pulse, \(t_0\). It must either be a scalar or contain a single element.
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.
- Returns:
The sampleable Gaussian pulse.
- Return type:
See also
Graph.signals.gaussian_pulse_pwc
Corresponding operation with Pwc output.
Graph.signals.sech_pulse_stf
Create an Stf representing a hyperbolic secant pulse.
Notes
The Gaussian pulse is defined as
\[\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 sampleable Gaussian pulse.
>>> gaussian = graph.signals.gaussian_pulse_stf( ... amplitude=1.0, width=0.1, center_time=0.5 ... ) >>> graph.discretize_stf( ... gaussian, duration=1, segment_count=5, 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.2, 0.2, 0.2, 0.2, 0.2]), 'values': array([3.35462628e-04, 1.35335283e-01, 1.00000000e+00, 1.35335283e-01, 3.35462628e-04]), 'time_dimension': 0}
Define a sampleable Gaussian with a DRAG correction.
>>> drag_gaussian = graph.signals.gaussian_pulse_stf( ... amplitude=1.0, width=0.1, center_time=0.5, drag=0.2 ... ) >>> graph.discretize_stf( ... drag_gaussian, duration=1, segment_count=5, name="drag_gaussian" ... ) <Pwc: name="drag_gaussian", operation_name="discretize_stf", value_shape=(), batch_shape=()> >>> result = bo.execute_graph(graph=graph, output_node_names="drag_gaussian") >>> result["output"]["drag_gaussian"] {'durations': array([0.2, 0.2, 0.2, 0.2, 0.2]), 'values': array([3.35462628e-04+0.0026837j , 1.35335283e-01+0.54134113j, 1.00000000e+00+0.j , 1.35335283e-01-0.54134113j, 3.35462628e-04-0.0026837j ]), 'time_dimension': 0}
Define a sampleable 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=0.5, name="width" ... ) >>> center_time = graph.optimizable_scalar( ... lower_bound=0.2, upper_bound=0.8, name="center_time" ... ) >>> drag = graph.optimizable_scalar( ... lower_bound=0, upper_bound=0.5, name="drag" ... ) >>> graph.signals.gaussian_pulse_stf( ... amplitude=amplitude, width=width, center_time=center_time, drag=drag ... ) <Stf: operation_name="multiply", value_shape=(), batch_shape=()>