[][src]Struct qip::pipeline::StateModifier

pub struct StateModifier {
    pub name: String,
    pub modifier: StateModifierType,
}

A named state modifier.

Fields

name: String

Name of modifier.

modifier: StateModifierType

Mechanism of modifier.

Implementations

impl StateModifier[src]

pub fn new_unitary(name: String, op: UnitaryOp) -> StateModifier[src]

Create a new unitary state modifier (matrices, swaps, ...)

pub fn new_measurement(
    name: String,
    id: u64,
    indices: Vec<u64>
) -> StateModifier
[src]

Create a new measurement state modifier.

pub fn new_measurement_basis(
    name: String,
    id: u64,
    indices: Vec<u64>,
    angle: f64
) -> StateModifier
[src]

Create a new measurement state modifier on an off-computational basis: cos(angle)|0> + sin(angle)|1>

pub fn new_stochastic_measurement(
    name: String,
    id: u64,
    indices: Vec<u64>
) -> StateModifier
[src]

Create a new stochastic measurement which doesn't affect the state but gives the adds the chance of each state.

pub fn new_stochastic_measurement_basis(
    name: String,
    id: u64,
    indices: Vec<u64>,
    angle: f64
) -> StateModifier
[src]

Create a new stochastic measurement state modifier on an off-computational basis: cos(angle)|0> + sin(angle)|1>

pub fn new_side_channel(
    name: String,
    handles: &[MeasurementHandle],
    f: Box<SideChannelModifierFn>
) -> StateModifier
[src]

Create a new side channel state modifier which builds part of the circuit dependent on the measured values from previous steps.

pub fn new_debug(
    name: String,
    indices: Vec<Vec<u64>>,
    f: Box<dyn Fn(Vec<Vec<f64>>)>
) -> StateModifier
[src]

Create a new debug state modifier (which doesn't modify the state).

Trait Implementations

impl Debug for StateModifier[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,