Could you be more specific? It is easier to help if you give more information. I don’t really understand the equation or the code you wrote. Please write a self contained equation defining all of the variables, and a full code that you hope would work with all of the variables defined (and the code formatted, see Welcome to ITensor Discourse).