Derivation of a general expression in quantum algebra

F.P. Laussy - fabrice.laussy@gmail.com
26 January 2011

Updated: 10 April 2011.

Here I show how one can use Mathematica to quickly compute tedious quantum algebra. The method can be very easily generalized.

Clear["Global`*"]

Pauli matrices:

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

Commute[μ,ν,η,θ] computes [(σ^(†μ))(σ^ν),(σ^(†η))(σ^θ)] through the formula that is spelled down:

Commute[μ_,ν_,η_,θ_]:=σ ν θ (η-μ)+σd μ η(ν-θ)+(IdentityMatrix[2]-2σd.σ)((1-μ)ν η(1-θ)-μ(1-ν)(1-η)θ)

All the possible cases:

ind=Flatten[Table[{i,j,k,l},{i,0,1},{j,0,1},{k,0,1},{l,0,1}],3]

Particular cases:

Commute[1,0,0,1]

Commute[0,1,1,0]

Commute[0,μ,η,0]//MatrixForm

So [(σ^μ),(σ^(†η))]=η μ (1-2(SuperDagger[σ])σ)  [obviously].

(Result=Commute[1,1,μ,ν])//MatrixForm

You can display it more bautifully, this becomes [(SuperDagger[σ])σ,(σ^(†μ))(σ^ν)]=μ (1-ν) σ+(-1+μ) ν (SuperDagger[σ])

(Result σd)[[2,1]]"(SuperDagger[σ])"+(Result σ)[[1,2]]"σ"+(Result (IdentityMatrix[2]-2σd.σ))[[1,1]]"(1-2(SuperDagger[σ])σ)"

It would take a bit more of work to make it simplify to more succinct expressions. The above, for instance, can be reduced to (μ-ν)(σ^(†μ))(σ^ν).

The general case:

(Result=Commute[μ,ν,η,θ])//MatrixForm

(Result σd)[[2,1]]"(SuperDagger[σ])"+(Result σ)[[1,2]]"σ"+(Result (IdentityMatrix[2]-2σd.σ))[[1,1]]"(1-2(SuperDagger[σ])σ)"

Which is our main result. I didn’t give much thought to the question whether this can be simplified along the lines of [(SuperDagger[σ])σ,(σ^(†μ))(σ^ν)]=(σ^(†μ))(σ^ν)(μ-ν) rather than the result which is spit out by the code, but going through the same parametrization quickly, I would think that no.

All the cases:

{#[[1]],MatrixForm[#[[2]]]}&/@Transpose[{ind,Commute@@#&/@ind}]//Column

How the formula was obtained in the first place?

I computed it by brute force:

bruteCommute[μ_,ν_,η_,λ_]:=MatrixPower[σd,μ].MatrixPower[σ,ν].MatrixPower[σd,η].MatrixPower[σ,λ]-MatrixPower[σd,η].MatrixPower[σ,λ].MatrixPower[σd,μ].MatrixPower[σ,ν]

{#[[1]],MatrixForm[#[[2]]]}&/@Transpose[{ind,bruteCommute@@#&/@ind}]//Column

I did it this bit by hand, extracting the nonzero elements:

({{{{0,1,1,0},1-2(SuperDagger[σ])σ}}, {{{0,1,1,1},σ}}, {{{1,0,0,1},-1+2(SuperDagger[σ])σ}}, {{{1,0,1,1},-(SuperDagger[σ])}}, {{{1,1,0,1},-σ}}, {{{1,1,1,0},(SuperDagger[σ])}}})

and encoding the associated list as coefficients, for instance, {0,1,1,0}→μ(1-ν)(1-η)θ. Then simplyfing brings us to the same formula as above.