pub enum Instruction {
    Alloc {
        dirty: bool,
        target: usize,
    },
    Free {
        dirty: bool,
        target: usize,
    },
    Gate {
        gate: QuantumGate,
        target: usize,
        control: Vec<usize>,
    },
    Measure {
        qubits: Vec<usize>,
        output: usize,
    },
    Plugin {
        name: String,
        target: Vec<usize>,
        args: String,
    },
    IntOp {
        op: ClassicalOp,
        result: usize,
        lhs: usize,
        rhs: usize,
    },
    IntSet {
        result: usize,
        value: i64,
    },
    Dump {
        qubits: Vec<usize>,
        output: usize,
    },
    End(EndInstruction),
}

Variants

Alloc

Fields

dirty: bool
target: usize

Free

Fields

dirty: bool
target: usize

Gate

Fields

target: usize
control: Vec<usize>

Measure

Fields

qubits: Vec<usize>
output: usize

Plugin

Fields

name: String
target: Vec<usize>
args: String

IntOp

Fields

result: usize
lhs: usize
rhs: usize

IntSet

Fields

result: usize
value: i64

Dump

Fields

qubits: Vec<usize>
output: usize

End(EndInstruction)

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.