CorrespondsTo

Trait CorrespondsTo 

Source
pub trait CorrespondsTo<T> {
    // Required method
    fn corresponds_to(&self) -> T;
}
Expand description

Trait linking indices of lower symmetry to one with higher symmetry

Several indices of a lower symmetry (e.g. normal ordered products of creators and annihilators) can correspond to the same index of a higher symmetry (e.g. Hermitian products where a pair of hermitian conjugated products of creators and annihilators is indexed by a single index)

use struqture::prelude::*;
use struqture::CorrespondsTo;
use struqture::bosons::{BosonProduct, HermitianBosonProduct};

let hbp = HermitianBosonProduct::new([0, 2, 4], [1, 3, 5]).unwrap();
let bp_1 = BosonProduct::new([0, 2, 4], [1, 3, 5]).unwrap();
let bp_2 = BosonProduct::new([1, 3, 5], [0, 2, 4]).unwrap();
let bp1_coresponds: HermitianBosonProduct = bp_1.corresponds_to();
let bp2_coresponds: HermitianBosonProduct = bp_2.corresponds_to();

assert_eq!(hbp, bp1_coresponds);
assert_eq!(hbp, bp2_coresponds);

Required Methods§

Source

fn corresponds_to(&self) -> T

Implementors§