Skip to main content

DiagMatrix

Type Alias DiagMatrix 

Source
pub type DiagMatrix = Vec<f64>;
Expand description

Diagonal matrix type (stored as vector of diagonal elements).

Each entry represents one singular value on the diagonal. The length equals the bond dimension at that link.

§Examples

use tensor4all_simplett::DiagMatrix;

let diag: DiagMatrix = vec![1.0, 0.5, 0.25];
assert_eq!(diag.len(), 3);
assert!((diag[0] - 1.0).abs() < 1e-15);

Aliased Type§

pub struct DiagMatrix { /* private fields */ }