pub struct Q { /* private fields */ }Implementations§
Source§impl Q
impl Q
pub fn new() -> Q
pub fn add(&mut self, qb: Qubit) -> u32
pub fn zero(&mut self) -> u32
pub fn zeros(&mut self, n: u32) -> Vec<u32>
pub fn zero_log2(&mut self, n: u32) -> Vec<u32>
pub fn number_of_qubits(&self) -> u32
pub fn x(&mut self, qb: &[u32])
pub fn h(&mut self, qb: &[u32])
pub fn apply(&mut self, g: Gate)
pub fn cmodexp2(&mut self, a: u32, n: u32, r0: &[u32], r1: &[u32])
pub fn iqft(&mut self, qb: &[u32])
pub fn cr(&mut self, theta: f64, control: u32, target: u32)
pub fn state(&self) -> Vec<State>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Q
impl RefUnwindSafe for Q
impl Send for Q
impl Sync for Q
impl Unpin for Q
impl UnwindSafe for Q
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