no method matching opsum on boson indices

I am new to ITensor so I apologize in advance if my question is trivial. I am toying around trying to do scalar field theory and am defining field operators on a set of boson sites of max occupation of d. I define several functions relevant to a scalar field theory.
However, when I opsum phi2 over indices in sites, I get this error.


Which has me confused since my site type is defined as boson. What am I doing wrong.
Thank you very much.

Hi Jake, it’s a good question. I think the issue may be that Julia doesn’t overload functions unless you “import” them first. Or you can put the module name in front of the function (ITensors.) to tell Julia it’s an overload.

So please try writing the names of the functions as

function ITensors.op(…)

to see if that allows Julia to find your overloads.