-
Notifications
You must be signed in to change notification settings - Fork 14
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
LABS using circuit? #28
Comments
@jmlarson1, thank you for raising this issue! This is indeed a bug as the support for Qiskit simulation leveraging the parameterized QAOA circuit appears to have been lost. Somehow, this has escaped our test coverage, which is unfortunate. The short of it is that simply instantiating parameterized QAOA circuit and passing it to get_qaoa_objective should work. We will aim to resolve this soon (though possibly after the holidays). |
Many of us, including @Shagun-G are interested in having this functionality |
@jmlarson1 @Shagun-G @mmenickelly: import numpy as np
from qokit.parameter_utils import get_best_known_parameters_for_LABS_wrt_overlap_for_p
from qokit.qaoa_objective_labs import get_qaoa_labs_objective
N = 7
p = 8
gamma, beta = get_best_known_parameters_for_LABS_wrt_overlap_for_p(N, p)
f1 = get_qaoa_labs_objective(N, p, parameterization="gamma beta", simulator="auto")
f2 = get_qaoa_labs_objective(N, p, parameterization="gamma beta", simulator="qiskit")
assert np.isclose(f1(gamma, beta), f2(gamma, beta)) |
Thank you. I need to try a different build because I get an error:
|
I would suggest trying to re-install from source in a clean venv/conda environment. |
@jmlarson1 was your issue resolved by #30? |
Yes! The example works for me. Thank you. Is there some obvious way to pass the desired number of shots to the But that doesn't work (and I don't even see that |
The simulator does not support emulating shot-based noise. Only exact expectation value is returned currently. |
That is understandable. Is there a shot-based get_qaoa_labs_objective (without a simulator, perhaps)? |
Is there an example where QOKit evaluates the LABS circuit instead of the statevector simulation?
In the
qaoa_objective_labs
file:QOKit/qokit/qaoa_objective_labs.py
Line 19 in 29e010c
I see that the circuit is imported, but I don't see where it is ever used/evaluated? Isn't this necessary for large N?
(I see QOKit has this implemented for portfolio optimization though.)
@mmenickelly
The text was updated successfully, but these errors were encountered: