[][src]Struct qip::pipeline::LocalQuantumState

pub struct LocalQuantumState<P: Precision> { /* fields omitted */ }

A basic representation of a quantum state, given by a vector of complex numbers stored locally on the machine (plus an arena of equal size to work in).

Implementations

impl<P: Precision> LocalQuantumState<P>[src]

pub fn new_from_full_state(
    n: u64,
    state: Vec<Complex<P>>,
    order: Representation
) -> Result<LocalQuantumState<P>, CircuitError>
[src]

Make a new LocalQuantumState from a fully defined state.

pub fn state_ref(&self) -> &Vec<Complex<P>>[src]

Return a reference to the internal state.

pub fn mut_state_ref(&mut self) -> &mut Vec<Complex<P>>[src]

Return a mutable reference to the internal state.

pub fn clone_state(&mut self, order: Representation) -> Vec<Complex<P>>[src]

Clone the state in either the natural_order or the internal order.

Trait Implementations

impl<P: Precision> Clone for LocalQuantumState<P>[src]

impl<P: Debug + Precision> Debug for LocalQuantumState<P>[src]

impl<P: Precision> QuantumState<P> for LocalQuantumState<P>[src]

fn new(n: u64) -> LocalQuantumState<P>[src]

Build a new LocalQuantumState

fn new_from_initial_states(
    n: u64,
    states: &[RegisterInitialState<P>]
) -> LocalQuantumState<P>
[src]

Build a local state using a set of initial states for subsets of the qubits. These initial states are made from the qubit handles.

Auto Trait Implementations

impl<P> RefUnwindSafe for LocalQuantumState<P> where
    P: RefUnwindSafe

impl<P> Send for LocalQuantumState<P>

impl<P> Sync for LocalQuantumState<P>

impl<P> Unpin for LocalQuantumState<P> where
    P: Unpin

impl<P> UnwindSafe for LocalQuantumState<P> where
    P: UnwindSafe

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