pyquil.quiltwaveforms module

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

Bases: pyquil.quilatom.TemplateWaveform

detuning: Optional[float] = None

An optional frequency detuning factor.

out() str[source]
phase: Optional[float] = None

An optional phase shift factor.

samples(rate: float) numpy.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.

scale: Optional[float] = None

An optional global scaling factor.

class pyquil.quiltwaveforms.DragGaussianWaveform(duration: float, fwhm: float, t0: float, anh: float, alpha: float, scale: Optional[float] = None, phase: Optional[float] = None, detuning: Optional[float] = None)[source]

Bases: pyquil.quilatom.TemplateWaveform

A DRAG Gaussian pulse.

alpha: float

Dimensionles DRAG parameter.

anh: float

The anharmonicity of the qubit, f01-f12 (Hertz).

detuning: Optional[float] = None

An optional frequency detuning factor.

fwhm: float

The Full-Width-Half-Max of the gaussian (seconds).

out() str[source]
phase: Optional[float] = None

An optional phase shift factor.

samples(rate: float) numpy.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.

scale: Optional[float] = None

An optional global scaling factor.

t0: float

The center time coordinate of the Gaussian (seconds).

class pyquil.quiltwaveforms.ErfSquareWaveform(duration: float, risetime: float, pad_left: float, pad_right: float, scale: Optional[float] = None, phase: Optional[float] = None, detuning: Optional[float] = None)[source]

Bases: pyquil.quilatom.TemplateWaveform

A pulse with a flat top and edges that are error functions (erf).

detuning: Optional[float] = None

An optional frequency detuning factor.

out() str[source]
pad_left: float

Amount of zero-padding to add to the left of the pulse (seconds).

pad_right: float

Amount of zero-padding to add to the right of the pulse (seconds).

phase: Optional[float] = None

An optional phase shift factor.

risetime: float

The width of each of the rise and fall sections of the pulse (seconds).

samples(rate: float) numpy.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.

scale: Optional[float] = None

An optional global scaling factor.

class pyquil.quiltwaveforms.FlatWaveform(duration: float, iq: numbers.Complex, scale: Optional[float] = None, phase: Optional[float] = None, detuning: Optional[float] = None)[source]

Bases: pyquil.quilatom.TemplateWaveform

A flat (constant) waveform.

detuning: Optional[float] = None

An optional frequency detuning factor.

iq: numbers.Complex

A raw IQ value.

out() str[source]
phase: Optional[float] = None

An optional phase shift factor.

samples(rate: float) numpy.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.

scale: Optional[float] = None

An optional global scaling factor.

class pyquil.quiltwaveforms.GaussianWaveform(duration: float, fwhm: float, t0: float, scale: Optional[float] = None, phase: Optional[float] = None, detuning: Optional[float] = None)[source]

Bases: pyquil.quilatom.TemplateWaveform

A Gaussian pulse.

detuning: Optional[float] = None

An optional frequency detuning factor.

fwhm: float

The Full-Width-Half-Max of the Gaussian (seconds).

out() str[source]
phase: Optional[float] = None

An optional phase shift factor.

samples(rate: float) numpy.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.

scale: Optional[float] = None

An optional global scaling factor.

t0: float

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: Optional[float] = None, phase: Optional[float] = None, detuning: Optional[float] = None)[source]

Bases: pyquil.quilatom.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

alpha: float

Dimensionles DRAG parameter.

anh: float

The anharmonicity of the qubit, f01-f12 (Hertz).

detuning: Optional[float] = None

An optional frequency detuning factor.

fwhm: float

The Full-Width-Half-Max of the Gaussian (seconds).

out() str[source]
phase: Optional[float] = None

An optional phase shift factor.

samples(rate: float) numpy.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.

scale: Optional[float] = None

An optional global scaling factor.

second_order_hrm_coeff: float

Second order coefficient (see Warren 1984).

t0: float

The center time coordinate of the Gaussian (seconds).

pyquil.quiltwaveforms.waveform(name: str) Callable[[type], type][source]

Define a Quil-T wavefom with the given name.