How to recover Pauli matrices properties in Mathematica?

8

1

I want to do a cross or dot product involving a vector of Pauli matrices
$ \vec\sigma=(\sigma^1, \sigma^2, \sigma^3) $; for example, $ \vec\sigma\times\vec\sigma=2\mathrm i\vec\sigma $ and $ \vec\sigma\cdot\vec\sigma=3 I_{2\times2} $.

Is there a simple way to do these operations?

user3654016

Posted 2016-10-27T22:32:23.877

Reputation: 81

Vectors like your $\sigma$ can be mapped to quaternions. You could consider doing this and using the Quaternions package. I'm saying this because implementing the algebraic properties of these matrices is the same as implementing quaternion calculations. Also, we do need a fourth basis vector $I$ as evidenced by your last relationship ($\sigma_i^2 = I$).

– Szabolcs – 2016-10-28T13:51:39.407

Answers

12

The Pauli vector:

σ = Table[PauliMatrix[i], {i, 1, 3}]
MatrixForm /@ σ

enter image description here

One can define a dot product of matrices (in spaces of arbitrary dimension):

dot[a_, b_] := Total @ MapThread[Dot, {a, b}]

Then

dot[σ, σ] // MatrixForm

enter image description here

For the cross product of matrices, I literally took the cross product of vectors

Cross[{a, b, c}, {x, y, z}] /. {Times[A_Symbol, B_Symbol] -> Dot[A, B]}

{b.z - c.y, -a.z + c.x, a.y - b.x}

and redefined it as (in a 3D space)

cross[{a_, b_, c_}, {x_, y_, z_}] := {b.z - c.y, -a.z + c.x, a.y - b.x}

This gives

MatrixForm /@ cross[σ, σ]

enter image description here

i.e.

cross[σ, σ] == 2 I σ

True


Because I particularly like the multidimensional cross product of vectors, I'd like to post a few links:

corey979

Posted 2016-10-27T22:32:23.877

Reputation: 22 814

3

There is a function called PauliMatrix. Here is the product of two such matrices:

PauliMatrix[1].PauliMatrix[2]

For example:

PauliMatrix[1].PauliMatrix[1] == PauliMatrix[4]

True

or

PauliMatrix[1].PauliMatrix[2] == -PauliMatrix[2].PauliMatrix[1]

True

bill s

Posted 2016-10-27T22:32:23.877

Reputation: 62 963

2I think the OP wants symbolic results, rather than explicitly specifying the matrices. – QuantumDot – 2016-10-27T22:43:35.213

The Pauli matrices are just particular case of geometric (Clifford) algebra orthonormal base elements. So you need some software of geometric algebra. Till you find better one, can look at my own implementation https://github.com/ArturasAcus/GeometricAlgebra. To mimic Pauli matrices you can use Cl[3,0] algebra (or Cl[2,0], where the role of third matrix is plays a bivector.

– user18792 – 2016-11-04T07:02:35.080

1

If you want to go the GeometricAlgebra way (as suggested in @user18792 's comment), there is a thread on this: https://mathematica.stackexchange.com/a/223597/63709 and a slick Paclet based implementation of generalized Geometric Algebra https://github.com/sw1sh/GeometricAlgebra

– Joshua Schrier – 2020-08-04T16:43:21.923

2

Let

pv = σ /@ Range[3];

Then this verifies $ \vec{\sigma}\cdot\vec{\sigma}=3I $:

(Inner[Dot, pv, pv] /. σ -> PauliMatrix) == 3 IdentityMatrix[2]
True

And this verifies $ \vec{\sigma}\times\vec{\sigma}=2\mathrm i\vec{\sigma} $:

2 HodgeDual[Outer[f, pv, pv]] // Normal;
(% /. {f -> Dot, σ -> PauliMatrix}) == (2 I pv /. σ -> PauliMatrix)
True

Αλέξανδρος Ζεγγ

Posted 2016-10-27T22:32:23.877

Reputation: 8 492

1

Another possibility using FeynCalc 9.3 or above (could be interesting for particle physicists)

CLC[i, j, k] CSI[j].CSI[k] // PauliSimplify[#, PauliReduce -> True] & // FCE
2 I CSI[i]
CSI[i].CSI[i] // PauliSimplify // FCE
3

CSI is a shortcut for a Cartesian Pauli sigma matrix, while CLC denotes a Cartesian Levi-Civita tensor. PauliSimplify handles simplifications of the Pauli algebra. The option PauliReduce is used to reduce every Pauli chain to at most one Pauli matrix per term. FCE converts the output into a notation that is easier to read (external notation).

vsht

Posted 2016-10-27T22:32:23.877

Reputation: 3 088