MelkoCollective / Pepinillo

Preparing Entangled POVMs in Informationally compLete Learning Operators
Apache License 2.0
2 stars 2 forks source link

Tensor network proposal from @akshat998 #1

Open Roger-luo opened 6 years ago

Roger-luo commented 6 years ago

From: https://github.com/PIQuIL/QuCumber/issues/72#event-1965047890

Regarding the proposal:

  1. POVM types: you can implement your own POVM types by inheriting SICPOVMBase, Pauli4 can be your example
  2. MPS types: I have implemented this, but serialization methods are not implemented yet, if you want I can let you work on this
  3. noise is not implemented yet
  4. tensor contraction for local operators is done, contraction with a tensor network should be similar, you can implement the contract method inside class DensityMatrix if you want to work on this

cc: @akshat998

Roger-luo commented 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