pub trait OperateOnState<'a>:
OperateOnDensityMatrix<'a>
+ IntoIterator<Item = (Self::Index, Self::Value)>
+ FromIterator<(Self::Index, Self::Value)>
+ Extend<(Self::Index, Self::Value)>
+ PartialEq
+ Clone
+ Mul<CalculatorFloat>
+ Mul<CalculatorComplex>
+ Add
+ Subwhere
Self: 'a,
&'a Self: IntoIterator,
Self::Index: Clone + SymmetricIndex,
Self::Value: Mul<f64, Output = Self::Value> + Add<Self::Value, Output = Self::Value> + Clone + TruncateTrait + ConjugationTrait,{
// Provided method
fn hermitian_conjugate(&'a self) -> Self { ... }
}Expand description
Trait for all objects that can act on a quantum state like an operator.
§Example
use qoqo_calculator::CalculatorComplex;
use std::collections::HashMap;
use struqture::prelude::*;
use struqture::spins::{OperateOnSpins, PauliProduct, PauliOperator};
let mut so = PauliOperator::new();
let pp_0z = PauliProduct::new().z(0);
so.add_operator_product(pp_0z.clone(), CalculatorComplex::from(0.2)).unwrap();
// Functions provided in this :
assert_eq!(so.hermitian_conjugate(), so);Provided Methods§
Sourcefn hermitian_conjugate(&'a self) -> Self
fn hermitian_conjugate(&'a self) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.