I have the problem when I run my code
# define Hamiltonian
from qiskit.opflow import PauliSumOp, X, I, Z, Y
H = ((X^(I)^I))+ (X^I^I) + ((X^(I^(2))*2/2)/2) + (X^I^I) + (X^Z^I) + (X^I^I/3)
H += (I^I^X)
print(H)
the result is
3.5 * XII
+ 1.0 * XZI
+ 0.3333333333333333 * XII
+ 1.0 * IIX
The problem is I don't know why the qiskit.opflow doesn't combine two terms of XII tensor together. I have worked on it for a while but have not worked, so I hope for your help, tks.