pyquil.quiltwaveforms module

Waveform templates that are commonly useful when working with pulse programs.

class pyquil.quiltwaveforms.BoxcarAveragerKernel(duration: float, scale: float | None = None, phase: float | None = None, detuning: float | None = None)[source]

Bases: TemplateWaveform

A boxcar averaging kernel.

Initialize a new BoxcarAveragerKernel.

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]

Get the samples of the waveform at a given sample rate.

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.

Initialize a new DragGaussianWaveform.

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]

Get the samples of the waveform at a given sample rate.

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).

Initialize a new ErfSquareWaveform.

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]

Get the samples of the waveform at a given sample rate.

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.

Initialize a new FlatWaveform.

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]

Get the samples of the waveform at a given sample rate.

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.

Initialize a new GaussianWaveform.

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]

Get the samples of the waveform at a given sample rate.

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

Initialize a new HrmGaussianWaveform.

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]

Get the samples of the waveform at a given sample rate.

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).