pub trait QpuSampler {
type Shots: ShotHistogram;
type Calibration;
// Required methods
fn sample(
&self,
circuit: &QuantumCircuit,
shots: u64,
) -> Result<Self::Shots, QuantumError>;
fn calibration(&self) -> Self::Calibration;
}Expand description
The generic sampler seam. Implementations return measurement shots as
classical ShotHistogram data at the Kleisli cut; no concrete vendor
adapter is shipped by this crate. Used only as a bound S: QpuSampler.
Required Associated Types§
Sourcetype Shots: ShotHistogram
type Shots: ShotHistogram
The classical shot histogram this sampler returns.
Sourcetype Calibration
type Calibration
The device calibration / topology metadata surfaced to the context
channel by qpu_effect.
Required Methods§
Sourcefn sample(
&self,
circuit: &QuantumCircuit,
shots: u64,
) -> Result<Self::Shots, QuantumError>
fn sample( &self, circuit: &QuantumCircuit, shots: u64, ) -> Result<Self::Shots, QuantumError>
Samples shots executions of circuit, returning the classical outcome
histogram or a typed failure. Deterministic implementations reproduce the
same histogram for the same input.
Sourcefn calibration(&self) -> Self::Calibration
fn calibration(&self) -> Self::Calibration
The device calibration surfaced at the Kleisli boundary.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".