pub struct Hamiltonian<Kind = Static> { /* private fields */ }Expand description
Static or explicitly time-dependent Hamiltonian with a type-state marker.
Implementations§
Source§impl Hamiltonian<Static>
impl Hamiltonian<Static>
pub fn new(operator: Operator) -> Result<Self>
pub fn operator(&self) -> &Operator
pub fn transpose(&self) -> Result<Self>
pub fn conjugated(&self) -> Result<Self>
pub fn adjoint(&self) -> Result<Self>
pub fn scaled(&self, coefficient: impl Into<Complex64>) -> Result<Self>
Source§impl Hamiltonian<Dynamic>
impl Hamiltonian<Dynamic>
pub fn new( static_part: Operator, dynamic_parts: Vec<DynamicComponent>, ) -> Result<Self>
pub fn evaluate(&self, time: f64, format: MatrixFormat) -> Result<Operator>
pub fn dynamic_components(&self) -> usize
pub fn static_part(&self) -> &Operator
pub fn transpose(&self) -> Result<Self>
pub fn conjugated(&self) -> Result<Self>
pub fn adjoint(&self) -> Result<Self>
pub fn scaled(&self, coefficient: impl Into<Complex64>) -> Result<Self>
Trait Implementations§
Source§impl<Kind: Clone> Clone for Hamiltonian<Kind>
impl<Kind: Clone> Clone for Hamiltonian<Kind>
Source§fn clone(&self) -> Hamiltonian<Kind>
fn clone(&self) -> Hamiltonian<Kind>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Kind: Debug> Debug for Hamiltonian<Kind>
impl<Kind: Debug> Debug for Hamiltonian<Kind>
Source§impl LinearOperator for Hamiltonian<Static>
impl LinearOperator for Hamiltonian<Static>
Source§fn format(&self) -> MatrixFormat
fn format(&self) -> MatrixFormat
Report the public materialization format.
Source§fn apply(&self, input: &[Complex64], output: &mut [Complex64]) -> Result<()>
fn apply(&self, input: &[Complex64], output: &mut [Complex64]) -> Result<()>
Compute
output = A * input. Read moreSource§fn apply_transpose(
&self,
input: &[Complex64],
output: &mut [Complex64],
) -> Result<()>
fn apply_transpose( &self, input: &[Complex64], output: &mut [Complex64], ) -> Result<()>
Apply the algebraic transpose without conjugating either operand. Read more
Source§fn apply_adjoint(
&self,
input: &[Complex64],
output: &mut [Complex64],
) -> Result<()>
fn apply_adjoint( &self, input: &[Complex64], output: &mut [Complex64], ) -> Result<()>
Apply the conjugate transpose.
Source§fn stored_triplets(&self) -> Result<Option<Vec<(usize, usize, Complex64)>>>
fn stored_triplets(&self) -> Result<Option<Vec<(usize, usize, Complex64)>>>
Return canonical stored nonzeros when the representation already owns them.
Source§fn shifted_solver(
&self,
shift: f64,
) -> Result<Option<Box<dyn ShiftedLinearSolver>>>
fn shifted_solver( &self, shift: f64, ) -> Result<Option<Box<dyn ShiftedLinearSolver>>>
Prepare a reusable solver for
(A - shift I) x = b, when supported.Source§impl TimeDependentOperator for Hamiltonian<Static>
impl TimeDependentOperator for Hamiltonian<Static>
Auto Trait Implementations§
impl<Kind> Freeze for Hamiltonian<Kind>
impl<Kind = Static> !RefUnwindSafe for Hamiltonian<Kind>
impl<Kind> Send for Hamiltonian<Kind>where
Kind: Send,
impl<Kind> Sync for Hamiltonian<Kind>where
Kind: Sync,
impl<Kind> Unpin for Hamiltonian<Kind>where
Kind: Unpin,
impl<Kind> UnsafeUnpin for Hamiltonian<Kind>
impl<Kind = Static> !UnwindSafe for Hamiltonian<Kind>
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<O> RuntimeAdjointLinearOperator<CpuRuntime> for Owhere
O: LinearOperator + ?Sized,
impl<O> RuntimeAdjointLinearOperator<CpuRuntime> for Owhere
O: LinearOperator + ?Sized,
Source§fn apply_adjoint_on(
&self,
_runtime: &CpuRuntime,
input: &CpuBuffer,
output: &mut CpuBuffer,
) -> Result<(), QmbedError>
fn apply_adjoint_on( &self, _runtime: &CpuRuntime, input: &CpuBuffer, output: &mut CpuBuffer, ) -> Result<(), QmbedError>
Compute
output = A† * input in runtime-owned storage.Source§impl<O> RuntimeLinearOperator<CpuRuntime> for Owhere
O: LinearOperator + ?Sized,
impl<O> RuntimeLinearOperator<CpuRuntime> for Owhere
O: LinearOperator + ?Sized,
Source§fn runtime_shape(&self) -> (usize, usize)
fn runtime_shape(&self) -> (usize, usize)
Return
(rows, columns) in runtime coordinates.Source§fn apply_on(
&self,
_runtime: &CpuRuntime,
input: &CpuBuffer,
output: &mut CpuBuffer,
) -> Result<(), QmbedError>
fn apply_on( &self, _runtime: &CpuRuntime, input: &CpuBuffer, output: &mut CpuBuffer, ) -> Result<(), QmbedError>
Apply this map to backend-owned buffers.
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.