Suppose I have the states \Psi
, \Phi
and \Zeta
and I also have the following relations given by the operators A
and B
when acting in the states
A.\Psi=1*\Psi;
B.\Psi=2*\Psi;
A.\Phi=3*\Phi;
B.\Phi=4*\Phi;
A.\Zeta=3*\Zeta;
B.\Zeta=4*\Zeta;
where I am denoting by a dot
the action of A
and B
. If I define
list1={A,B};
list2={10*\Psi,5\Phi + \Zeta};
And, from them, I multiply the two lists
list3=Table[Table[i.j,{i,list1}],{j,list2}]
giving
list3={{A.10*\Psi,B.10*\Psi},{A.(5\Phi + \Zeta),B.(5\Phi + \Zeta)}}
={{1*(10*\Psi),2*(10*\Psi)},{3*(5\Phi + \Zeta),4*(5\Phi + \Zeta)}}
where the second line comes after using the relations given in the first lines of code.
How do I make Mathematica write only the eigenvalues of the operators A and B when acting on list2 (I want it to write {{1,2},{3,4}} from list3)?
5\Phi + \Phi
is not equal to6\Phi
? Also, I'm having troubles understanding the task ... Are you looking for something like:a[psi] = 1; b[psi] = 2; a[phi] = 3; b[phi] = 4; Table[f[First@Variables@j], {f, {a, b}}, {j, {10 psi, 6 phi}}]
? $\endgroup$list2
are eigenstates? What should be the result of the code if it is not an eigenstate, for example,A[Ψ + Φ]
? $\endgroup$