pub struct Hamiltonian { /* private fields */ }Expand description
A quantum Hamiltonian represented as a sum of Pauli terms.
H = Σ_i c_i P_i where P_i are Pauli strings
Implementations§
Source§impl Hamiltonian
impl Hamiltonian
Sourcepub fn num_qubits(&self) -> usize
pub fn num_qubits(&self) -> usize
Get the number of qubits.
Trait Implementations§
Source§impl Clone for Hamiltonian
impl Clone for Hamiltonian
Source§fn clone(&self) -> Hamiltonian
fn clone(&self) -> Hamiltonian
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 Hamiltonian
impl RefUnwindSafe for Hamiltonian
impl Send for Hamiltonian
impl Sync for Hamiltonian
impl Unpin for Hamiltonian
impl UnwindSafe for Hamiltonian
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