tensorflow / tensorflow/quantum

Support for Projectors in Expectation Calculations

Open
#357 2 comments 0 reactions 1 assignee View on GitHub

@MichaelBroughton is already working on this.

Since Sep 2, 2020.

kind/feature-request priority/review
Dominant language
Python
Stars
2.2k
Forks
665
PR merge metrics
No merged PRs in 30d

Description

Right now Cirq does not allow such things as:

a = cirq.Z(q0) * cirq.Z(q0) + projector(0111011001)
a.expectation_from_wavefunction(a, ...)

One must manually write out the projection operators like:

a = (1 - cirq.Z(q)) / 2 * (1 + cirq.Z(q2)) / 2 . . .

Storing such a large paulisum can quickly grow to be prohibitive despite the matrix having just one entry in the end and the post-processing step being very simple to implement on a real device. It would be nice if we could have this feature put into Cirq and then relayed up and supported in TFQ. What do people think ? @zaqqwerty .

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.