Enum qip_iterators::iterators::MatrixOp
source · pub enum MatrixOp<P> {
Matrix(Vec<usize>, Vec<P>),
SparseMatrix(Vec<usize>, Vec<Vec<(usize, P)>>),
Swap(Vec<usize>, Vec<usize>),
Control(Vec<usize>, Vec<usize>, Box<MatrixOp<P>>),
}Expand description
Ops which can be applied to quantum states.
Variants§
Matrix(Vec<usize>, Vec<P>)
Indices, Matrix data
SparseMatrix(Vec<usize>, Vec<Vec<(usize, P)>>)
Indices, per row [(col, value)]
Swap(Vec<usize>, Vec<usize>)
A indices, B indices
Control(Vec<usize>, Vec<usize>, Box<MatrixOp<P>>)
Control indices, Op indices, Op
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<P> RefUnwindSafe for MatrixOp<P>where P: RefUnwindSafe,
impl<P> Send for MatrixOp<P>where P: Send,
impl<P> Sync for MatrixOp<P>where P: Sync,
impl<P> Unpin for MatrixOp<P>where P: Unpin,
impl<P> UnwindSafe for MatrixOp<P>where P: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more