Measure an operator that is a product of many local operators?

Dear itensor:

I want to measure the following operator:

\prod_{m=1}^{N_o}{\left( c_{m,1}^{\dagger}c_{m,2}+c_{m,2}^{\dagger}c_{m,1} \right)}

the operator c^\dagger,c represents the spinless fermion creation or annihilation operator. The index ( m ) represents the index of the unit cell, with two lattice sites(1,2) within each unit cell. The entire operator is a product of a series of operators. Is there a method in ITensor to measure this operator?


I think the best strategy for measuring this operator would be the following:

  1. form this operator as a two-site “gate” type of tensor (not that it is any type of quantum gate, but just that it has the structure of a general two-site operator tensor)
  2. using the procedure outlined here apply it to a copy of the state you are measuring
  3. take the overlap of that modified state with the original state

Let me know if that seems like a good plan to you.