quil.waveform.sampling

 1# This file is automatically generated by pyo3_stub_gen
 2# ruff: noqa: F401
 3
 4from quil._quil.waveform.sampling import IqSamples, IqSamplesIter, IqSamplesRevIter, SamplingError
 5__all__ = [
 6    "IqSamples",
 7    "IqSamplesIter",
 8    "IqSamplesRevIter",
 9    "SamplingError",
10]
class IqSamples:

The result of sampling a waveform, representing a sequence of IQ value samples.

def get(self, /, index):

Get the nth sample. The same as indexing, but returns None instead of raising an error if the index is out of range.

def count(self, /, value):

Return the number of occurrences of the specified sample.

Part of the collections.abc.Sequence interface.

def index(self, /, value, start=0, stop=None):

Return the first occurrences of the specified sample. Raises ValueError if the value is not present.

Part of the collections.abc.Sequence interface.

def iq_values(self, /):

Convert this sequence of samples into an explicit numpy array.

The length of this array is [self.sample_count()][Self::sample_count], and its values are given by [self[_]][Self::get].

sample_count

The number of samples. The same as len.

class IqSamples.Flat(quil.waveform.sampling.IqSamples):

A flat waveform, consisting of a single IQ value repeated some number of times.

This is a more optimizable special-case representation for [IqSamples::Samples(vec![iq; sample_count])][Self::Samples], but is otherwise equivalent.

iq
sample_count
class IqSamples.Samples(quil.waveform.sampling.IqSamples):

A literal sequence of IQ samples.

samples
class IqSamplesIter:
class IqSamplesRevIter:
class SamplingError(quil._quil.waveform.WaveformError):

Errors that may occur when sampling waveforms.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
add_note
args