pub struct TensorNetwork {
pub n_particles: usize,
pub tensors: Vec<Array2<Complex64>>,
pub bond_dimensions: Vec<usize>,
}Expand description
Tensor network representation for large quantum systems
Fields§
§n_particles: usizeNumber of particles
tensors: Vec<Array2<Complex64>>Tensor components
bond_dimensions: Vec<usize>Bond dimensions
Implementations§
Source§impl TensorNetwork
impl TensorNetwork
Sourcepub fn decompose_state(&mut self, state: &Array1<Complex64>) -> Result<()>
pub fn decompose_state(&mut self, state: &Array1<Complex64>) -> Result<()>
Decompose quantum state into tensor network
Sourcepub fn apply_time_evolution(
&mut self,
_hamiltonian: &Array2<Complex64>,
_dt: f64,
) -> Result<()>
pub fn apply_time_evolution( &mut self, _hamiltonian: &Array2<Complex64>, _dt: f64, ) -> Result<()>
Apply time evolution to tensor network
Sourcepub fn reconstruct_state(&self) -> Result<Array1<Complex64>>
pub fn reconstruct_state(&self) -> Result<Array1<Complex64>>
Reconstruct full quantum state from tensor network
Trait Implementations§
Source§impl Clone for TensorNetwork
impl Clone for TensorNetwork
Source§fn clone(&self) -> TensorNetwork
fn clone(&self) -> TensorNetwork
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 TensorNetwork
impl RefUnwindSafe for TensorNetwork
impl Send for TensorNetwork
impl Sync for TensorNetwork
impl Unpin for TensorNetwork
impl UnwindSafe for TensorNetwork
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