I can add a second, maybe easier to implement, interface:
ampo += c1,"X[1,2]",p
ampo += c2,"X[2,2]",p
where c1, c2 are complex coefficients and p is an integer.
The parenthesis could be stripped from the operator name (X)
and parsed separately. The complex coefficient would be put in position [1,2], [2,2] of the X operator, and so on. This could be generalized to operators X with more that two indices.
I have something like this implemented in the C++ version of itensor.
What do you think?
Lello