tensorflow / tensorflow/quantum
StochasticCost as a feature of layers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 665
- PR merge metrics
- No merged PRs in 30d
Description
In the past, subsampling of PauliTerms from input PauliSums was taken care of by an option in the SGDifferentiator module. However, there were a few issues with its implementation there:
- Instead of subsampling PauliTerms from PauliSums, it actually changed the shape of the measurement tensor by subsampling PauliSums.
- Had a python implementation instead of a C++ op backend.
- Does not fit the new differentiator interface being implemented in #409 .
Fortunately, in discussions on the design doc for the new differentiators, it looks like this could be a feature we still want to keep, and pull up to the level of tfq.layers. Since, this subsampling of PauliTerms can speed up the estimation of expectation values in any context, not just when seeking gradients. See also #230 for the possible interaction of such a feature with Engine. Thinking to take this on in the near future. Thoughts on this @MichaelBroughton @jaeyoo ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading tensorflow_quantum/python/differentiators/stochastic_differentiator.py and the new differentiator interface described in #409. Review the design discussion and #230 for the intended layer-level behavior; the work is complete when PauliTerm subsampling fits the interface, uses a C++ op backend, and works across expectation-value contexts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python, tensorflow
- Domain
- backend, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100