[][src]Trait qip::qubits::NonUnitaryBuilder

pub trait NonUnitaryBuilder {
    fn measure(&mut self, q: Qubit) -> (Qubit, MeasurementHandle);
fn measure_basis(
        &mut self,
        q: Qubit,
        phase: f64
    ) -> (Qubit, MeasurementHandle); }

A builder which supports non-unitary operations

Required methods

fn measure(&mut self, q: Qubit) -> (Qubit, MeasurementHandle)

Add a measure op to the pipeline for q and return a reference which can later be used to access the measured value from the results of pipeline::run.

fn measure_basis(&mut self, q: Qubit, phase: f64) -> (Qubit, MeasurementHandle)

Measure in the basis of cos(phase)|0> + sin(phase)|1>

Loading content...

Implementors

impl NonUnitaryBuilder for OpBuilder[src]

Loading content...