[][src]Enum dqcsim::bindings::dqcs_gate_type_t

#[repr(C)]pub enum dqcs_gate_type_t {
    DQCS_GATE_TYPE_INVALID,
    DQCS_GATE_TYPE_UNITARY,
    DQCS_GATE_TYPE_MEASUREMENT,
    DQCS_GATE_TYPE_PREP,
    DQCS_GATE_TYPE_CUSTOM,
}

Types of DQCsim gates.

Variants

DQCS_GATE_TYPE_INVALID

Invalid gate type. Used as an error return value.

DQCS_GATE_TYPE_UNITARY

Unitary gates have one or more target qubits, zero or more control qubits, and a unitary matrix, sized for the number of target qubits.

The semantics are that the unitary matrix expanded by the number of control qubits is applied to the qubits.

The data field may add pragma-like hints to the gate, for instance to represent the line number in the source file that generated the gate, error modelling information, and so on. This data may be silently ignored.

DQCS_GATE_TYPE_MEASUREMENT

Measurement gates have one or more measured qubits and a 2x2 unitary matrix representing the basis.

The semantics are:

This allows any measurement basis to be used.

The data field may add pragma-like hints to the gate, for instance to represent the line number in the source file that generated the gate, error modelling information, and so on. This data may be silently ignored.

DQCS_GATE_TYPE_PREP

Prep gates have one or more target qubits and a 2x2 unitary matrix representing the basis.

The semantics are:

This allows any initial state to be used.

The data field may add pragma-like hints to the gate, for instance to represent the line number in the source file that generated the gate, error modelling information, and so on. This data may be silently ignored.

DQCS_GATE_TYPE_CUSTOM

Custom gates perform a user-defined mixed quantum-classical operation, identified by a name. They can have zero or more target, control, and measured qubits, of which only the target and control sets must be mutually exclusive. They also have an optional matrix of arbitrary size.

The semantics are:

Trait Implementations

impl Clone for dqcs_gate_type_t[src]

impl Copy for dqcs_gate_type_t[src]

impl Debug for dqcs_gate_type_t[src]

impl<'_> From<&'_ GateType> for dqcs_gate_type_t[src]

impl PartialEq<dqcs_gate_type_t> for dqcs_gate_type_t[src]

impl StructuralPartialEq for dqcs_gate_type_t[src]

Auto Trait Implementations

impl RefUnwindSafe for dqcs_gate_type_t

impl Send for dqcs_gate_type_t

impl Sync for dqcs_gate_type_t

impl Unpin for dqcs_gate_type_t

impl UnwindSafe for dqcs_gate_type_t

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,