Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Opflow Cvar Implementation #1345

Merged
merged 55 commits into from
Oct 15, 2020
Merged

Opflow Cvar Implementation #1345

merged 55 commits into from
Oct 15, 2020

Conversation

BryceFuller
Copy link
Contributor

@BryceFuller BryceFuller commented Oct 13, 2020

Summary

This PR adds a new StateFn object: CVaRMeasurement which is a subclass of OperatorStateFn and also modifies other opflow class methods to accommodate this new class.

Details and comments

The CVaRMeasurement object is structurally very similar to an OperatorStateFn object as it has a primitive attribute which accepts OperatorBase objects. Unlike OperatorStateFn, this object has a parameter alpha in [0,1] which is used when computing the CVaR. For more details on CVaR in the context of quantum computing, see: https://arxiv.org/abs/1907.04769.

@Cryoris Cryoris added this to the 0.8 milestone Oct 15, 2020
@Cryoris Cryoris added the Changelog: New Feature Include in the Added section of the changelog label Oct 15, 2020
@Cryoris Cryoris merged commit e5cd9d2 into qiskit-community:master Oct 15, 2020
@Cryoris Cryoris deleted the cvar-isolated branch October 15, 2020 13:40
mtreinish pushed a commit to mtreinish/qiskit-core that referenced this pull request Nov 20, 2020
* clean push w/o huge history

* fix __new__ w/o changing StateFn.__new__

* update cvar statefn to latest verrsion

* fix lint

* alpha must be in [0,1]

* add check that operators must be diagonal

* cvar not used statefn.__new__ due to alpha

* add small test file

* add cvar expectation

* fix spsa in case delta_obj=0

* rename cvar statefn to cvar measurement

* add cvar expectation

* wrote a release note for cvar and added comments to CVaRExpectation

* changing docstring to try and prevent sphynx errors

* Update releasenotes/notes/cvar-expectation-bbc2ccff95132b35.yaml

* add more tests and fix coeff

* allow ``add``

Co-authored-by: Cryoris <jules.gacon@googlemail.com>
Co-authored-by: Julien Gacon <jul@zurich.ibm.com>
Co-authored-by: Julien Gacon <gaconju@gmail.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
manoelmarques pushed a commit to manoelmarques/qiskit-terra that referenced this pull request Dec 2, 2020
* clean push w/o huge history

* fix __new__ w/o changing StateFn.__new__

* update cvar statefn to latest verrsion

* fix lint

* alpha must be in [0,1]

* add check that operators must be diagonal

* cvar not used statefn.__new__ due to alpha

* add small test file

* add cvar expectation

* fix spsa in case delta_obj=0

* rename cvar statefn to cvar measurement

* add cvar expectation

* wrote a release note for cvar and added comments to CVaRExpectation

* changing docstring to try and prevent sphynx errors

* Update releasenotes/notes/cvar-expectation-bbc2ccff95132b35.yaml

* add more tests and fix coeff

* allow ``add``

Co-authored-by: Cryoris <jules.gacon@googlemail.com>
Co-authored-by: Julien Gacon <jul@zurich.ibm.com>
Co-authored-by: Julien Gacon <gaconju@gmail.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
manoelmarques pushed a commit to manoelmarques/qiskit-terra that referenced this pull request Dec 7, 2020
* clean push w/o huge history

* fix __new__ w/o changing StateFn.__new__

* update cvar statefn to latest verrsion

* fix lint

* alpha must be in [0,1]

* add check that operators must be diagonal

* cvar not used statefn.__new__ due to alpha

* add small test file

* add cvar expectation

* fix spsa in case delta_obj=0

* rename cvar statefn to cvar measurement

* add cvar expectation

* wrote a release note for cvar and added comments to CVaRExpectation

* changing docstring to try and prevent sphynx errors

* Update releasenotes/notes/cvar-expectation-bbc2ccff95132b35.yaml

* add more tests and fix coeff

* allow ``add``

Co-authored-by: Cryoris <jules.gacon@googlemail.com>
Co-authored-by: Julien Gacon <jul@zurich.ibm.com>
Co-authored-by: Julien Gacon <gaconju@gmail.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog: New Feature Include in the Added section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants