pub struct BasisProjector { /* private fields */ }Expand description
Sparse isometric lift from a symmetry-reduced basis to its parent basis.
Implementations§
Source§impl BasisProjector
impl BasisProjector
Sourcepub fn from_operator(
projector: &(impl LinearOperator + ?Sized),
tolerance: f64,
) -> Result<Self>
pub fn from_operator( projector: &(impl LinearOperator + ?Sized), tolerance: f64, ) -> Result<Self>
Convert any explicit rectangular isometry into a reusable basis projector.
This is the narrow waist for reduced spaces whose columns are not representable by a one-dimensional orbit character, including higher-dimensional finite-group representations.
Sourcepub fn from_embedding<Reduced, Parent>(
reduced: &Reduced,
parent: &Parent,
) -> Result<Self>
pub fn from_embedding<Reduced, Parent>( reduced: &Reduced, parent: &Parent, ) -> Result<Self>
One-hot embedding of a selected basis into a compatible parent basis.
Sourcepub fn between<Reduced, Parent>(
reduced: &Reduced,
parent: &Parent,
) -> Result<Self>
pub fn between<Reduced, Parent>( reduced: &Reduced, parent: &Parent, ) -> Result<Self>
Isometric lift from any basis into an explicitly selected parent basis.
The reduced basis owns the symmetry-reduction convention through
Basis::reduction_image. Iterating the explicit parent states makes
this equally useful for built-in and runtime symmetry sectors, fixed
particle subspaces, and unrestricted parent spaces.
pub fn from_general<Parent>(basis: &GeneralBasis<Parent>) -> Result<Self>
pub const fn source_dimension(&self) -> usize
pub const fn reduced_dimension(&self) -> usize
Sourcepub fn project(
&self,
parent: &[Complex64],
reduced: &mut [Complex64],
) -> Result<()>
pub fn project( &self, parent: &[Complex64], reduced: &mut [Complex64], ) -> Result<()>
Apply the adjoint projector to a parent-space vector.
pub fn lifted(&self, reduced: &[Complex64]) -> Result<Vec<Complex64>>
pub fn projected(&self, parent: &[Complex64]) -> Result<Vec<Complex64>>
pub fn lift_batch( &self, reduced: &[Vec<Complex64>], ) -> Result<Vec<Vec<Complex64>>>
pub fn project_batch( &self, parent: &[Vec<Complex64>], ) -> Result<Vec<Vec<Complex64>>>
Sourcepub fn lift_density(&self, reduced: &[Complex64]) -> Result<Vec<Complex64>>
pub fn lift_density(&self, reduced: &[Complex64]) -> Result<Vec<Complex64>>
Lift a row-major reduced density matrix as P ρ P†.
Sourcepub fn symmetry_leakage_norm(
&self,
operator: &(impl LinearOperator + ?Sized),
) -> Result<f64>
pub fn symmetry_leakage_norm( &self, operator: &(impl LinearOperator + ?Sized), ) -> Result<f64>
Frobenius norm of (I - P P†) A P, evaluated one reduced column at a
time. Zero means the parent-space operator preserves this symmetry
sector; no parent-space square projector is formed.
pub fn preserves_operator_symmetry( &self, operator: &(impl LinearOperator + ?Sized), tolerance: f64, ) -> Result<bool>
Trait Implementations§
Source§impl Clone for BasisProjector
impl Clone for BasisProjector
Source§fn clone(&self) -> BasisProjector
fn clone(&self) -> BasisProjector
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BasisProjector
impl Debug for BasisProjector
Source§impl LinearOperator for BasisProjector
impl LinearOperator for BasisProjector
Source§fn format(&self) -> MatrixFormat
fn format(&self) -> MatrixFormat
Source§fn apply(&self, input: &[Complex64], output: &mut [Complex64]) -> Result<()>
fn apply(&self, input: &[Complex64], output: &mut [Complex64]) -> Result<()>
output = A * input. Read moreSource§fn stored_triplets(&self) -> Result<Option<Vec<(usize, usize, Complex64)>>>
fn stored_triplets(&self) -> Result<Option<Vec<(usize, usize, Complex64)>>>
Source§fn apply_real(&self, input: &[f64], output: &mut [f64]) -> Result<()>
fn apply_real(&self, input: &[f64], output: &mut [f64]) -> Result<()>
Source§fn apply_transpose(
&self,
input: &[Complex64],
output: &mut [Complex64],
) -> Result<()>
fn apply_transpose( &self, input: &[Complex64], output: &mut [Complex64], ) -> Result<()>
Source§fn apply_adjoint(
&self,
input: &[Complex64],
output: &mut [Complex64],
) -> Result<()>
fn apply_adjoint( &self, input: &[Complex64], output: &mut [Complex64], ) -> Result<()>
Source§fn shifted_solver(
&self,
_shift: f64,
) -> Result<Option<Box<dyn ShiftedLinearSolver>>>
fn shifted_solver( &self, _shift: f64, ) -> Result<Option<Box<dyn ShiftedLinearSolver>>>
(A - shift I) x = b, when supported.Auto Trait Implementations§
impl Freeze for BasisProjector
impl RefUnwindSafe for BasisProjector
impl Send for BasisProjector
impl Sync for BasisProjector
impl Unpin for BasisProjector
impl UnsafeUnpin for BasisProjector
impl UnwindSafe for BasisProjector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<O> RuntimeAdjointLinearOperator<CpuRuntime> for Owhere
O: LinearOperator + ?Sized,
impl<O> RuntimeAdjointLinearOperator<CpuRuntime> for Owhere
O: LinearOperator + ?Sized,
Source§fn apply_adjoint_on(
&self,
_runtime: &CpuRuntime,
input: &CpuBuffer,
output: &mut CpuBuffer,
) -> Result<(), QmbedError>
fn apply_adjoint_on( &self, _runtime: &CpuRuntime, input: &CpuBuffer, output: &mut CpuBuffer, ) -> Result<(), QmbedError>
output = A† * input in runtime-owned storage.Source§impl<O> RuntimeLinearOperator<CpuRuntime> for Owhere
O: LinearOperator + ?Sized,
impl<O> RuntimeLinearOperator<CpuRuntime> for Owhere
O: LinearOperator + ?Sized,
Source§fn runtime_shape(&self) -> (usize, usize)
fn runtime_shape(&self) -> (usize, usize)
(rows, columns) in runtime coordinates.Source§fn apply_on(
&self,
_runtime: &CpuRuntime,
input: &CpuBuffer,
output: &mut CpuBuffer,
) -> Result<(), QmbedError>
fn apply_on( &self, _runtime: &CpuRuntime, input: &CpuBuffer, output: &mut CpuBuffer, ) -> Result<(), QmbedError>
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.