-
Notifications
You must be signed in to change notification settings - Fork 45
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
Issues in running QAOA algorithm against Rigetti backend #128
Comments
Hi @Thevendran. I was able to successfully run your code on a simulator backend. For the record, here is the code I ran:
with the local backend, |
I was able to reproduce the first issue. There seems to be a bug in I wasn't able to reproduce the second issue. Can you share the backtrace as well as your version information for the Python packages you are using? |
New issue: #132 |
@Thevendran using the branch of If you are still having this issue, could you please share the full code snippet that reproduces the problem, the full error output (including backtrace), and the output of |
Hi @Thevendran , I also couldn't reproduce the second issue. With |
Closing at the first issue must have been fixed by #135 and there is not enough information to find the root cause for the second issue. The recent code changes (filtering QPU gatesets) might be helping. Please reopen this issue if you still run into these issues. |
Hi.
I am facing issues in running QAOA algorithm against Rigetti backend. Following is the optimization code that I am using.
sampler = BackendSampler(
backend=AWSBraketProvider().get_backend("Aspen-M-3"),
skip_transpilation=False,
options={"shots": 100}
)
qaoa = QAOA(sampler=sampler, optimizer=COBYLA())
qaoa_solver = MinimumEigenOptimizer(qaoa)
result = qaoa_solver.solve(qp)
I am facing the following 2 issues:
Issue #1
When the number of binary variables is more than 2, I am getting the following error:
Observable's qubit count 1 and the size of the target qubit set QubitSet([Qubit(4), Qubit(0)]) must be equal
Example quadratic function that triggered the issue :
Minimize -30*x0^2 + 14*x0*x1 + 14*x0*x2 - 35*x1^2 + 14*x1*x2 - 29*x2^2
Issue #2
As the number of binary variables increases gradually (for ex. 10 variables), I am getting the following different error:
QiskitError: "Cannot unroll the circuit to the given basis, dict_keys(['measure', 'cz', 'cx', 'cp', 'h', 'id', 'p', 'rx', 'ry', 'rz', 's', 'sdg', 'swap', 't', 'tdg', 'x', 'y', 'z']). Instruction measure not found in equivalence library and no rule found to expand."
Example quadratic function that triggered the issue:
Minimize -36*x0^2 + 16*x0*x1 + 16*x0*x2 + 16*x0*x3 + 16*x0*x4 + 16*x0*x5 + 16*x0*x6 - 41*x1^2 + 16*x1*x2 + 16*x1*x3 + 16*x1*x4 + 16*x1*x7 + 16*x1*x8 - 43*x2^2 + 16*x2*x3 + 16*x2*x5 + 16*x2*x7 + 16*x2*x9 - 42*x3^2 + 16*x3*x6 + 16*x3*x8 + 16*x3*x9 - 35*x4^2 + 16*x4*x5 + 16*x4*x6 + 16*x4*x7 + 16*x4*x8 - 42*x5^2 + 16*x5*x6 + 16*x5*x7 + 16*x5*x9 - 40*x6^2 + 16*x6*x8 + 16*x6*x9 - 40*x7^2 + 16*x7*x8 + 16*x7*x9 - 35*x8^2 + 16*x8*x9 - 41*x9^2
Please help suggest a solution.
The text was updated successfully, but these errors were encountered: