Expectation values using GroupedSite
Posted: 20 Jan 2019, 18:17
Caveat: probably I'm misunderstanding exactly how GroupedSite is working.
I'd like to evaluate something like for a MPS 'psi' which has each \(k\) adjacent sites grouped using GroupedSite.
I think one way would be to add the desired kind of operator to the GroupedSite class? But surely an easier way is to replace 'Sx' with the expression needed (which should just be a Kronecker product of \(k\) Sx operators).
A hint in the right direction would be helpful!
I'd like to evaluate something like
Code: Select all
psi.expectation_value('Sx')
I think one way would be to add the desired kind of operator to the GroupedSite class? But surely an easier way is to replace 'Sx' with the expression needed (which should just be a Kronecker product of \(k\) Sx operators).
A hint in the right direction would be helpful!