Checking quantum algebra

F.P. Laussy
fabrice.laussy@gmail.com

In this notebook, we check a list of identities from the Wolverhampton Lectures on Physics (Electrodynamics).

The annihilation operator for a two-level system

σ=(({{0, 1}, {0, 0}}));

That is our notation for (SuperDagger[σ])

σd=(({{0, 0}, {1, 0}}));

The identity matrix:

Id=IdentityMatrix[2];

Commutator:

Com[A_,B_]:=A.B-B.A

We need that the 0th power of a matrix be the identity, even if this matrix is singular, which is not by default for Mathematica, although this being the usual definition.

Unprotect[MatrixPower]
MatrixPower[m_?SquareMatrixQ,0]:=IdentityMatrix[Length[m]]
Protect[MatrixPower]

We are checking in the same order than in the corresponding blog post, e.g., the first line is checking [(SuperDagger[σ])σ,(σ^(†μ))(σ^ν)]=(μ-ν)(σ^(†μ))(σ^ν):

The number of the identity that we check:

idnumber=1;

ToString[idnumber++]<>" is "<>ToString/@(Table[Com[σd.σ,MatrixPower[σd,μ].MatrixPower[σ,ν]]==(μ-ν) MatrixPower[σd,μ].MatrixPower[σ,ν],{μ,0,1},{ν,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[Com[σ,MatrixPower[σd,μ]]==μ(Id-2MatrixPower[σd,μ].σ),{μ,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[Com[σd,MatrixPower[σ,ν]]==ν(2σd.MatrixPower[σ,ν]-Id),{ν,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[Com[σ,MatrixPower[σd,μ]].MatrixPower[σ,ν]==μ MatrixPower[σd,1-μ].MatrixPower[σ,ν]-2μ(1-ν)MatrixPower[σd,μ].MatrixPower[σ,1-ν],{μ,0,1},{ν,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[MatrixPower[σd,μ].Com[σd,MatrixPower[σ,ν]]==2(1-μ)ν MatrixPower[σd,1-μ].MatrixPower[σ,ν]-ν MatrixPower[σd,μ].MatrixPower[σ,1-ν],{μ,0,1},{ν,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[MatrixPower[σ,ν+1]==(1-ν) MatrixPower[σ,1-ν],{ν,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[MatrixPower[σd,μ+1]==(1-μ) MatrixPower[σd,1-μ],{μ,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[MatrixPower[σ,ν].σd==ν Id+(1-2ν) σd.MatrixPower[σ,ν],{ν,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[σ.MatrixPower[σd,μ]==μ Id+(1-2μ) MatrixPower[σd,μ].σ,{μ,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[σ.MatrixPower[σd,μ].MatrixPower[σ,ν]==μ MatrixPower[σd,1-μ].MatrixPower[σ,ν]+(1-2μ)(1-ν) MatrixPower[σd,μ].MatrixPower[σ,1-ν],{μ,0,1},{ν,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[MatrixPower[σd,μ].MatrixPower[σ,ν].σd==ν MatrixPower[σd,μ].MatrixPower[σ,1-ν]+(1-2ν)(1-μ) MatrixPower[σd,1-μ].MatrixPower[σ,ν],{μ,0,1},{ν,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[σd.σ.MatrixPower[σd,μ].MatrixPower[σ,ν]==μ MatrixPower[σd,μ].MatrixPower[σ,ν]+(1-μ)(1-ν)MatrixPower[σd,1-μ].MatrixPower[σ,1-ν],{μ,0,1},{ν,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[MatrixPower[σd,μ].MatrixPower[σ,ν].σd.σ==ν MatrixPower[σd,μ].MatrixPower[σ,ν]+(1-μ)(1-ν)MatrixPower[σd,1-μ].MatrixPower[σ,1-ν],{μ,0,1},{ν,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[σ.MatrixPower[σd,μ+1].MatrixPower[σ,ν]==(1-μ) (MatrixPower[σd,μ].MatrixPower[σ,ν]- (1-μ)(1-ν)MatrixPower[σd,1-μ].MatrixPower[σ,1-ν]),{μ,0,1},{ν,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[MatrixPower[σd,μ].MatrixPower[σ,ν+1].σd==(1-ν) (MatrixPower[σd,μ].MatrixPower[σ,ν]- (1-μ)(1-ν)MatrixPower[σd,1-μ].MatrixPower[σ,1-ν]),{μ,0,1},{ν,0,1}]//Flatten//Union)

ToString[idnumber++]<>" is "<>ToString/@(Table[σ.MatrixPower[σd,μ].MatrixPower[σ,ν].σd==(1-μ-ν) (MatrixPower[σd,μ].MatrixPower[σ,ν]- MatrixPower[σd,1-μ].MatrixPower[σ,1-ν]),{μ,0,1},{ν,0,1}]//Flatten//Union)