Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleted #9240

Closed
NiclasS99 opened this issue Dec 4, 2022 · 2 comments
Closed

deleted #9240

NiclasS99 opened this issue Dec 4, 2022 · 2 comments
Labels
mod: algorithms Related to the Algorithms module mod: opflow Related to the Opflow module type: discussion

Comments

@NiclasS99
Copy link

NiclasS99 commented Dec 4, 2022

deleted

@woodsp-ibm woodsp-ibm added question mod: algorithms Related to the Algorithms module labels Dec 4, 2022
@woodsp-ibm
Copy link
Member

There is a recently released SamplingVQE which uses a Sampler instance from the newly introduced primitives . This can do CVaR via its aggregation parameter. Internally it has a _DiagonalEstimator to facilitate this. Though it seems there was bug in this which is being fixed #9221 and also a performance fix #9229. You can take a look at these. There is no standalone expectation as there was with the opflow based CVaRExpectation. Hope that helps.

@woodsp-ibm woodsp-ibm added the mod: opflow Related to the Opflow module label Dec 4, 2022
@woodsp-ibm
Copy link
Member

I will note that opflow and QuantumInstance will shortly be deprecated and subsequently removed. The algorithms here used to be based on these and these algorithms are now PendingDeprecation (will be shortly switched to deprecated at the same time as opflow/QI), having been 'replaced' by primitive versions, such as the SamplingVQE I noted above. It uses a class, which is not exposed as public class but can still be used _DiagonalEstimator which takes a new Sampler primitive, so it can get counts, but behaves like an Estimator in computing the expectation value of an observable - in this case for a diagonal operator. This code is more forward looking. But for the moment you can choose to use either, as you like - you could always compute the CVaR expectation directly yourself from executing circuits.

@NiclasS99 NiclasS99 changed the title Is there a way to implement CVaRExpectation without CircuitSampler? ---- Dec 29, 2022
@NiclasS99 NiclasS99 changed the title ---- deleted Dec 29, 2022
@NiclasS99 NiclasS99 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod: algorithms Related to the Algorithms module mod: opflow Related to the Opflow module type: discussion
Projects
None yet
Development

No branches or pull requests

3 participants