pub struct CliffordCircuit {
pub nqbits: usize,
pub gates: Vec<CliffordGate>,
}Fields§
§nqbits: usize§gates: Vec<CliffordGate>Implementations§
Source§impl CliffordCircuit
impl CliffordCircuit
pub fn new(nqbits: usize) -> Self
pub fn from_vec(gates: Vec<(String, Vec<usize>)>) -> Self
pub fn random(nqubits: usize, ngates: usize) -> Self
pub fn extend_with(&mut self, other: &CliffordCircuit)
Sourcepub fn cnot_count(&self) -> usize
pub fn cnot_count(&self) -> usize
Counts the number of CNOT gates
Sourcepub fn entangling_count(&self) -> usize
pub fn entangling_count(&self) -> usize
Counts the number of CNOT gates
Sourcepub fn cnot_depth(&self) -> usize
pub fn cnot_depth(&self) -> usize
Computes the CNOT depth of the circuit
Sourcepub fn entangling_depth(&self) -> usize
pub fn entangling_depth(&self) -> usize
Computes the CNOT depth of the circuit
Trait Implementations§
Source§impl Clone for CliffordCircuit
impl Clone for CliffordCircuit
Source§fn clone(&self) -> CliffordCircuit
fn clone(&self) -> CliffordCircuit
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CliffordCircuit
impl RefUnwindSafe for CliffordCircuit
impl Send for CliffordCircuit
impl Sync for CliffordCircuit
impl Unpin for CliffordCircuit
impl UnwindSafe for CliffordCircuit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more