remncomm.m

From Spinach Documentation Wiki
Revision as of 12:29, 25 April 2026 by Kuprov (talk | contribs) (Normalise sequential blank lines)
Jump to: navigation, search

Removes from the Hermitian operator A the part that does not commute with the Hermitian operator B.

Syntax

    C=remncomm(A,EvB)

Arguments

   A     -  a square matrix

   EvB   -  a square matrix containing eigenvectors 
            of B in columns

Outputs

   C     -  a square matrix

Notes

When the matrix B is diagonal, the part of A that commutes with it is the diagonal part, so just use diag(diag(A)).

See also

Numerical infrastructure

Version 2.5, authors: Ilya Kuprov