Question: Physics package - Issue with Expand and Simplify of Kets



I am using MAPLE for quantum computation.
It appears to me that the Physics[Expand] and Physics[Symplify] functions do not operate as I expected on
Kets with multiple quantum numbers. The functions no not consider the non commutative nature of tensor
products of Kets. (neither of bras incidently). It would be very useful if thos could be adjusted in some way.

Thank you for your help

LL

restart;

with(Physics):

Setup(mathematicalnotation=true,
      noncommutativecolor=black,
      quantumoperators=q,
      noncommutativeprefix={q,psi,beta});

[mathematicalnotation = true, noncommutativecolor = black, noncommutativeprefix = {beta, psi, q}, quantumoperators = {q}]

(1)

Ket(psi):=Ket(q,-1)*Ket(q,1)*Ket(q,-1);
Ket(psi):=Ket(q,-1,1,-1);
'q[1].Ket(psi)'=q[1].Ket(psi);
'q[2].Ket(psi)'=q[2].Ket(psi);
'q[3].Ket(psi)'=q[3].Ket(psi);

Physics:-`*`(Physics:-Ket(q, -1), Physics:-Ket(q, 1), Physics:-Ket(q, -1))

 

Physics:-Ket(q, -1, 1, -1)

 

Physics:-`.`(q[1], Physics:-Ket(psi)) = -Physics:-Ket(q, -1, 1, -1)

 

Physics:-`.`(q[2], Physics:-Ket(psi)) = Physics:-Ket(q, -1, 1, -1)

 

Physics:-`.`(q[3], Physics:-Ket(psi)) = -Physics:-Ket(q, -1, 1, -1)

(2)

Ket(beta,-1,-1):=(1/2)*(sqrt(2)*(Ket(q,-1)*Ket(q,-1)));
Ket(beta,-1,-1):=(1/2)*(sqrt(2)*(Ket(q,-1,-1)));

(1/2)*2^(1/2)*Physics:-`*`(Physics:-Ket(q, -1), Physics:-Ket(q, -1))

 

(1/2)*2^(1/2)*Physics:-Ket(q, -1, -1)

(3)

Ket(Prod):='Ket(psi)'*'Ket(beta,-1,-1)';

Physics:-`*`(Physics:-Ket(psi), Physics:-Ket(beta, -1, -1))

(4)

Ket(Prod):=Ket(psi)*Ket(beta,-1,-1);
'Expand(Ket(Prod))'=Expand(Ket(Prod));
'Expand(Ket(Prod))'<>'(Ket(Prod))';

'Simplify(Ket(Prod))'=Simplify(Ket(Prod));
'Simplify(Ket(Prod))'<>'(Ket(Prod))'

(1/2)*2^(1/2)*Physics:-`*`(Physics:-Ket(q, -1, 1, -1), Physics:-Ket(q, -1, -1))

 

Physics:-Expand(Physics:-Ket(Prod)) = (1/2)*2^(1/2)*Physics:-`*`(Physics:-Ket(q, -1, -1), Physics:-Ket(q, -1, 1, -1))

 

Physics:-Expand(Physics:-Ket(Prod)) <> Physics:-Ket(Prod)

 

Physics:-Simplify(Physics:-Ket(Prod)) = (1/2)*2^(1/2)*Physics:-`*`(Physics:-Ket(q, -1, -1), Physics:-Ket(q, -1, 1, -1))

 

Physics:-Simplify(Physics:-Ket(Prod)) <> Physics:-Ket(Prod)

(5)

q[1]*q[2]-q[2]*q[1]<>0;
q[1]*q[3]-q[3]*q[1]<>0;
q[2]*q[3]-q[3]*q[2]<>0;

Physics:-`*`(q[1], q[2])-Physics:-`*`(q[2], q[1]) <> 0

 

Physics:-`*`(q[1], q[3])-Physics:-`*`(q[3], q[1]) <> 0

 

Physics:-`*`(q[2], q[3])-Physics:-`*`(q[3], q[2]) <> 0

(6)

 


 

Download Expand_Simplify-of-Kets.mw


 

 

Please Wait...