pub enum Instrument {
    Effects(Vec<Process>),
    ZMeasurement {
        pr_readout_error: f64,
    },
}
Expand description

Represents a quantum instrument; that is, a process that accepts a quantum state and returns the new state of a system and classical data extracted from that system.

Variants

Effects(Vec<Process>)

The effects of the instrument, represented as completely positive trace non-increasing (CPTNI) processes.

ZMeasurement

Fields

pr_readout_error: f64

Probability with which a result is flipped.

An instrument that measures a single qubit in the $Z$-basis, up to a readout error (probability of result being flipped).

Primarily useful when working with stabilizer states or other subtheories.

Implementations

Samples from this instrument, returning the measurement result and the new state of the system conditioned on that measurement result.

Returns a serialization of this instrument as a JSON object.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.