pub struct SiteMPO<T: TTScalar> { /* private fields */ }Expand description
Center-canonical form of MPO with orthogonality center
The tensors to the left of the center are left-orthogonal (left-isometric), and the tensors to the right are right-orthogonal (right-isometric).
Implementations§
Source§impl<T: TTScalar> SiteMPO<T>
impl<T: TTScalar> SiteMPO<T>
Sourcepub fn from_mpo(mpo: MPO<T>, center: usize) -> Result<Self>
pub fn from_mpo(mpo: MPO<T>, center: usize) -> Result<Self>
Create a SiteMPO from an MPO, placing the center at the given position
Sourcepub fn site_tensor(&self, i: usize) -> &Tensor4<T>
pub fn site_tensor(&self, i: usize) -> &Tensor4<T>
Get the site tensor at position i
Sourcepub fn site_tensor_mut(&mut self, i: usize) -> &mut Tensor4<T>
pub fn site_tensor_mut(&mut self, i: usize) -> &mut Tensor4<T>
Get mutable reference to the site tensor at position i
Sourcepub fn site_tensors(&self) -> &[Tensor4<T>] ⓘ
pub fn site_tensors(&self) -> &[Tensor4<T>] ⓘ
Get all site tensors
Sourcepub fn site_tensors_mut(&mut self) -> &mut [Tensor4<T>] ⓘ
pub fn site_tensors_mut(&mut self) -> &mut [Tensor4<T>] ⓘ
Get mutable access to site tensors
Sourcepub fn move_center_left(&mut self) -> Result<()>
pub fn move_center_left(&mut self) -> Result<()>
Move the orthogonality center one position to the left
Sourcepub fn move_center_right(&mut self) -> Result<()>
pub fn move_center_right(&mut self) -> Result<()>
Move the orthogonality center one position to the right
Sourcepub fn set_center(&mut self, target: usize) -> Result<()>
pub fn set_center(&mut self, target: usize) -> Result<()>
Move the orthogonality center to the specified position
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for SiteMPO<T>
impl<T> RefUnwindSafe for SiteMPO<T>where
T: RefUnwindSafe,
impl<T> Send for SiteMPO<T>
impl<T> Sync for SiteMPO<T>
impl<T> Unpin for SiteMPO<T>where
T: Unpin,
impl<T> UnsafeUnpin for SiteMPO<T>
impl<T> UnwindSafe for SiteMPO<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
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