1
$\begingroup$

I am trying to do a simple quantum mechanical calculation that involves both vector and spinor indices. Abstractly, the calculation of the vector $\vec{v}$ looks like the following:

abstract equation

The right-most object involves the contraction of quantum states $\psi$ and $\phi$ with the $x,y,z$ Pauli matrices $\boldsymbol{\sigma}_{x,y,z}$. I use the bold (but it's hard to see) to indicate abstract quantum operators and the vector to indicate having three components for three spatial coordinates ${x,y,z}$.

In any case, you can accomplish this calculation by first using a matrix representation to evaluate the right-most object like:

matrix representation of quantum spin contraction

Then, we can easily take the cross product with $\vec{q}$ of the resulting expression with only vector indices.

What I'm looking for is a way to set this up in Mathematica as either my own library or an existing library that can easily handle many such calculations without me needing to "unpack" things much further than the abstract notation in my first equation. Does something like this exist?

I am aware of the library suggested here but that's for what seems to be more detailed calculations than I am doing and I can't decide if the overhead of learning is worth it.

$\endgroup$

1 Answer 1

1
$\begingroup$

If I were you and worked with Pauli spin matrices and concrete three dimensional vectors and/or two component spinors, I would make my own tool packages. For example, to compute v from q, phi, and psi, the code will be something like

ClearAll[vcalc];
vcalc[q_:{_,_,_},psi_:{_,_},phi_:{_,_}]:=Module[{pm},
  psi.(#/.pm->PauliMatrix).phi&/@Cross[q,pm/@Range[3]]];

vcalc[{q1,q2,q3},{\[Psi]1,\[Psi]2},{\[Phi]1,\[Phi]2}]//MatrixForm

example

If you have enough collection of such small tools, then you will be able to tackle many computations just combining these.

If you want to deal with vector and matrices without referring to their indices, you will be happy with VectorSymbol and MatrixSymbol introduced in Ver 14.1.

$\endgroup$
2
  • $\begingroup$ Thanks! typo in last line, calc should be vcalc no? $\endgroup$ Commented Aug 2, 2024 at 15:20
  • $\begingroup$ Thank you. I corrected the typo. $\endgroup$ Commented Aug 3, 2024 at 0:07

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.