Difference between revisions of "Remncomm.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:remncomm.m}} __NOTOC__ Removes from the Hermitian operator A the part that does not commute with the Hermitian operator B. ==Syntax== C=remncomm(A,EvB)...")
 
(Sync syntax/arguments/outputs with current Spinach source)
Line 1: Line 1:
 
{{DISPLAYTITLE:remncomm.m}} __NOTOC__
 
{{DISPLAYTITLE:remncomm.m}} __NOTOC__
 +
 
Removes from the Hermitian operator A the part that does not commute with the Hermitian operator B.
 
Removes from the Hermitian operator A the part that does not commute with the Hermitian operator B.
  
 
==Syntax==
 
==Syntax==
  
    C=remncomm(A,EvB)
+
A=remncomm(A,EvB)
  
 
==Arguments==
 
==Arguments==
  
    A    -  a square matrix
+
A    -  a square matrix
 
   
 
   
 
     EvB  -  a square matrix containing eigenvectors  
 
     EvB  -  a square matrix containing eigenvectors  
Line 15: Line 16:
 
==Outputs==
 
==Outputs==
  
    C    -  a square matrix
+
C    -  a square matrix
  
 
==Notes==
 
==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)).
 
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==
 
==See also==
 +
 
[[Kernel_utilities#Numerical_infrastructure|Numerical infrastructure]]
 
[[Kernel_utilities#Numerical_infrastructure|Numerical infrastructure]]
  
  
 
''Version 2.5, authors: [[Ilya Kuprov]]''
 
''Version 2.5, authors: [[Ilya Kuprov]]''

Revision as of 15:04, 5 April 2026


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

Syntax

A=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