Struct quantum::gate::Gate [] [src]

pub struct Gate { /* fields omitted */ }

Represents a quantum gate: a quantum regster transformation.

This gate is tagged with a width, and contains a unitary matrix representing the numerical transformation in the computational basis.

This gate may be applied to a ket to update the ket's state.

Currently we do not check whether the matrix is unitary.

See Wikipedia for more information.

Methods

impl Gate
[src]

Construct a new quantum gate, given width and computational basis matrix.

Currently we do not check whether the matrix is unitary.

Panics

We panic if the supplied matrix is non-square or not of dimension width.

Width of the gate.

Representative matrix.

Trait Implementations

impl Debug for Gate
[src]

Formats the value using the given formatter.