Hi everyone,

This is a post about constructing operator bases, and some problems that I'm experiencing. I'm using SpinDynamica 2.5.5.

I would like to set an operator basis by multiplying together basis operators of two or more spin systems.

Suppose that I have two systems, {{1,1/2},{2,1/2}} and {{3,1/2}}.

I'd like to make an operator basis for the whole system {{1,1/2},{2,1/2},{3,1/2}} as follows:

SetSpinSystem[{{1,1/2},{2,1/2},{3,1/2}}]

basisops12=BasisOperators[CartesianProductOperatorBasis[{{1,1/2},{2,1/2}}]]

basisops3=BasisOperators[ShiftAndZOperatorBasis[{{3,1/2}}]]

(* the operator bases for {1,2} and {3} are arbitrary, but cannot be ZeemanKetBraOperatorBasis *)

basisops123=Flatten@Outer[Dot[#1,#2]&,basisops12,basisops3]

DefineOperatorBasis[basis123,basisops123]

SetOperatorBasis[basis123]

Now, up until this point it appears there are no problems. I find that executing BasisOperators[] gives an output equal to basisops123. CheckOperatorBasis[] outputs True. OperatorQ applied to any of the basis operators also gives True.

However, there are serious problems when using the basis to represent superoperators. Routines ExpressOperator, OperatorVectorRepresentation or SuperoperatorMatrixRepresentation all fail with some error message about incommensurate basis dimensions when multiplying matrices within SpinDynamica's internal workings. Any ideas on what is at fault or where a solution may lie?