I am interested in creating Hamiltonians built from multi-site terms which are not easily expressed as sums of (tensor products of) single-site basis operators. OpSum()
supports multisite operators, but I am not sure about how to turn the resulting OpSum into an MPO, as the naive method—as in the following code—fails:
sites = siteinds("Qubit",2)
opsum = OpSum()
add!(opsum,"CNOT",1,2)
H = MPO(opsum,sites)
with the last line producing an error. What is the correct syntax here?