pub struct Pulse {
pub duration: f64,
pub amplitude: f64,
pub frequency: f64,
pub phase: f64,
pub envelope: PulseEnvelope,
pub sample_rate: f64,
pub phase_modulation: Option<Box<dyn Fn(f64) -> f64 + Send + Sync>>,
}
Expand description
Pulse waveform for control signals
Fields§
§duration: f64
Duration of the pulse in nanoseconds
amplitude: f64
Amplitude (0.0 to 1.0, scaled by hardware limits)
frequency: f64
Frequency in GHz
phase: f64
Phase in radians
envelope: PulseEnvelope
Pulse envelope shape
sample_rate: f64
Sampling rate in GSa/s
phase_modulation: Option<Box<dyn Fn(f64) -> f64 + Send + Sync>>
Additional phase modulation function
Implementations§
Source§impl Pulse
impl Pulse
Sourcepub fn new(
duration: f64,
amplitude: f64,
frequency: f64,
phase: f64,
envelope: PulseEnvelope,
sample_rate: f64,
) -> Self
pub fn new( duration: f64, amplitude: f64, frequency: f64, phase: f64, envelope: PulseEnvelope, sample_rate: f64, ) -> Self
Create a new pulse
Sourcepub fn generate_waveform(&self) -> QuantRS2Result<Array1<Complex64>>
pub fn generate_waveform(&self) -> QuantRS2Result<Array1<Complex64>>
Generate pulse waveform samples
Sourcepub fn generate_drag_waveform(
&self,
) -> QuantRS2Result<(Array1<Complex64>, Array1<Complex64>)>
pub fn generate_drag_waveform( &self, ) -> QuantRS2Result<(Array1<Complex64>, Array1<Complex64>)>
Generate DRAG pulse (for reduced leakage)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pulse
impl !RefUnwindSafe for Pulse
impl Send for Pulse
impl Sync for Pulse
impl Unpin for Pulse
impl !UnwindSafe for Pulse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.