pyquil.quiltwaveforms module¶
- class pyquil.quiltwaveforms.BoxcarAveragerKernel(duration: float, scale: float | None = None, phase: float | None = None, detuning: float | None = None)[source]¶
Bases:
TemplateWaveform
- NAME: ClassVar[str] = 'boxcar_kernel'¶
- property detuning: Expression | MemoryReference | int | float | complex | number | None¶
An optional frequency detuning factor.
- property phase: Expression | MemoryReference | int | float | complex | number | None¶
An optional phase shift factor.
- samples(rate: float) ndarray [source]¶
A reference implementation of waveform sample generation.
Note: this is close but not always exactly equivalent to the actual IQ values produced by the waveform generators on Rigetti hardware. The actual ADC process imposes some alignment constraints on the waveform duration (in particular, it must be compatible with the clock rate).
- Parameters:
rate – The sample rate, in Hz.
- Returns:
An array of complex samples.
- property scale: Expression | MemoryReference | int | float | complex | number | None¶
An optional global scaling factor.
- class pyquil.quiltwaveforms.DragGaussianWaveform(duration: float, fwhm: float, t0: float, anh: float, alpha: float, scale: float | None = None, phase: float | None = None, detuning: float | None = None)[source]¶
Bases:
TemplateWaveform
A DRAG Gaussian pulse.
- NAME: ClassVar[str] = 'drag_gaussian'¶
- property alpha: Expression | MemoryReference | int | float | complex | number | None¶
Dimensionles DRAG parameter.
- property anh: Expression | MemoryReference | int | float | complex | number | None¶
The anharmonicity of the qubit, f01-f12 (Hertz).
- property detuning: Expression | MemoryReference | int | float | complex | number | None¶
An optional frequency detuning factor.
- property fwhm: Expression | MemoryReference | int | float | complex | number | None¶
The Full-Width-Half-Max of the gaussian (seconds).
- property phase: Expression | MemoryReference | int | float | complex | number | None¶
An optional phase shift factor.
- samples(rate: float) ndarray [source]¶
A reference implementation of waveform sample generation.
Note: this is close but not always exactly equivalent to the actual IQ values produced by the waveform generators on Rigetti hardware. The actual ADC process imposes some alignment constraints on the waveform duration (in particular, it must be compatible with the clock rate).
- Parameters:
rate – The sample rate, in Hz.
- Returns:
An array of complex samples.
- property scale: Expression | MemoryReference | int | float | complex | number | None¶
An optional global scaling factor.
- property t0: Expression | MemoryReference | int | float | complex | number | None¶
The center time coordinate of the Gaussian (seconds).
- class pyquil.quiltwaveforms.ErfSquareWaveform(duration: float, risetime: float, pad_left: float, pad_right: float, scale: float | None = None, phase: float | None = None, detuning: float | None = None)[source]¶
Bases:
TemplateWaveform
A pulse with a flat top and edges that are error functions (erf).
- NAME: ClassVar[str] = 'erf_square'¶
- property detuning: Expression | MemoryReference | int | float | complex | number | None¶
An optional frequency detuning factor.
- property pad_left: Expression | MemoryReference | int | float | complex | number | None¶
Amount of zero-padding to add to the left of the pulse (seconds)
- property pad_right: Expression | MemoryReference | int | float | complex | number | None¶
Amount of zero-padding to add to the right of the pulse (seconds).
- property phase: Expression | MemoryReference | int | float | complex | number | None¶
An optional phase shift factor.
- property risetime: Expression | MemoryReference | int | float | complex | number | None¶
The width of each of the rise and fall sections of the pulse (seconds).
- samples(rate: float) ndarray [source]¶
A reference implementation of waveform sample generation.
Note: this is close but not always exactly equivalent to the actual IQ values produced by the waveform generators on Rigetti hardware. The actual ADC process imposes some alignment constraints on the waveform duration (in particular, it must be compatible with the clock rate).
- Parameters:
rate – The sample rate, in Hz.
- Returns:
An array of complex samples.
- property scale: Expression | MemoryReference | int | float | complex | number | None¶
An optional global scaling factor.
- class pyquil.quiltwaveforms.FlatWaveform(duration: float, iq: complex, scale: float | None = None, phase: float | None = None, detuning: float | None = None)[source]¶
Bases:
TemplateWaveform
A flat (constant) waveform.
- NAME: ClassVar[str] = 'flat'¶
- property detuning: Expression | MemoryReference | int | float | complex | number | None¶
An optional frequency detuning factor.
- property iq: Expression | MemoryReference | int | float | complex | number | None¶
A raw IQ value.
- property phase: Expression | MemoryReference | int | float | complex | number | None¶
An optional phase shift factor.
- samples(rate: float) ndarray [source]¶
A reference implementation of waveform sample generation.
Note: this is close but not always exactly equivalent to the actual IQ values produced by the waveform generators on Rigetti hardware. The actual ADC process imposes some alignment constraints on the waveform duration (in particular, it must be compatible with the clock rate).
- Parameters:
rate – The sample rate, in Hz.
- Returns:
An array of complex samples.
- property scale: Expression | MemoryReference | int | float | complex | number | None¶
An optional global scaling factor.
- class pyquil.quiltwaveforms.GaussianWaveform(duration: float, fwhm: float, t0: float, scale: float | None = None, phase: float | None = None, detuning: float | None = None)[source]¶
Bases:
TemplateWaveform
A Gaussian pulse.
- NAME: ClassVar[str] = 'gaussian'¶
- property detuning: Expression | MemoryReference | int | float | complex | number | None¶
An optional frequency detuning factor.
- property fwhm: Expression | MemoryReference | int | float | complex | number | None¶
The Full-Width-Half-Max of the Gaussian (seconds).
- property phase: Expression | MemoryReference | int | float | complex | number | None¶
An optional phase shift factor.
- samples(rate: float) ndarray [source]¶
A reference implementation of waveform sample generation.
Note: this is close but not always exactly equivalent to the actual IQ values produced by the waveform generators on Rigetti hardware. The actual ADC process imposes some alignment constraints on the waveform duration (in particular, it must be compatible with the clock rate).
- Parameters:
rate – The sample rate, in Hz.
- Returns:
An array of complex samples.
- property scale: Expression | MemoryReference | int | float | complex | number | None¶
An optional global scaling factor.
- property t0: Expression | MemoryReference | int | float | complex | number | None¶
The center time coordinate of the Gaussian (seconds).
- class pyquil.quiltwaveforms.HrmGaussianWaveform(duration: float, fwhm: float, t0: float, anh: float, alpha: float, second_order_hrm_coeff: float, scale: float | None = None, phase: float | None = None, detuning: float | None = None)[source]¶
Bases:
TemplateWaveform
A Hermite Gaussian waveform.
- REFERENCE: Effects of arbitrary laser or NMR pulse shapes on population
inversion and coherence Warren S. Warren. 81, (1984); doi: 10.1063/1.447644
- NAME: ClassVar[str] = 'hrm_gaussian'¶
- property alpha: Expression | MemoryReference | int | float | complex | number | None¶
Dimensionles DRAG parameter.
- property anh: Expression | MemoryReference | int | float | complex | number | None¶
The anharmonicity of the qubit, f01-f12 (Hertz).
- property detuning: Expression | MemoryReference | int | float | complex | number | None¶
An optional frequency detuning factor.
- property fwhm: Expression | MemoryReference | int | float | complex | number | None¶
The Full-Width-Half-Max of the Gaussian (seconds).
- property phase: Expression | MemoryReference | int | float | complex | number | None¶
An optional phase shift factor.
- samples(rate: float) ndarray [source]¶
A reference implementation of waveform sample generation.
Note: this is close but not always exactly equivalent to the actual IQ values produced by the waveform generators on Rigetti hardware. The actual ADC process imposes some alignment constraints on the waveform duration (in particular, it must be compatible with the clock rate).
- Parameters:
rate – The sample rate, in Hz.
- Returns:
An array of complex samples.
- property scale: Expression | MemoryReference | int | float | complex | number | None¶
An optional global scaling factor.
- property second_order_hrm_coeff: Expression | MemoryReference | int | float | complex | number | None¶
Second order coefficient (see Warren 1984).
- property t0: Expression | MemoryReference | int | float | complex | number | None¶
The center time coordinate of the Gaussian (seconds).