Open Roger-luo opened 6 years ago
Note, I make use of pipe for some of the API, to explain this:
Pauli4 for example:
This calculates the expectation of Z
on the 4
-th site (the id is not related to lattice).
povm = Pauli4()
povm.rho(samples).measure(Z).on(4)
For MPS, this would be
mps = MPS(*tensors)
povm.rho(samples).contract(mps) # -> fidelity
From: https://github.com/PIQuIL/QuCumber/issues/72#event-1965047890
Regarding the proposal:
SICPOVMBase
,Pauli4
can be your examplecontract
method insideclass DensityMatrix
if you want to work on thiscc: @akshat998