-
Notifications
You must be signed in to change notification settings - Fork 91
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
Unable to use Qiskit features such as AmplitudeEstimation #200
Comments
Thanks @jplewa for submitting this issue! It looks like we currently don't support the Qiskit Meanwhile, as a workaround you could try to manually generate the circuit, transpile it and add measurement operators. Please give this code snippet a try and let me know if it works (picking up after defining the problem and ae_circuit = ae.construct_circuit(problem)
ae_circuit = transpile(ae_circuit, backend)
ae_circuit.add_register(0,ae_circuit.num_qubits)
for n in range(num_qubits):
ae_circuit.measure(n,n)
job = execute(ae_ciarcuit, backend=backend)
job_monitor(job)
result = job.result()
count = result.get_counts(ae_circuit) |
I think the errors are caused by this line in qiskit-ionq:
I know :) But I would have to implement my own Maximum Likelihood Estimator to be able to obtain equivalent results (the EDIT: The troublesome method from qiskit-ionq gets called here: |
FYI, my circuit becomes a one-element list of circuits after the method Quoting the docs: Returns:
List['QuantumCircuit']: The transpiled circuits, it is always a list even though
the length is one. I checked out how this is done in I also figured out that qiskit-ionq (which doesn't support multi-circuit experiments either) added a PR that at least makes it possible to run one-element circuit lists (see qiskit-community/qiskit-ionq#71). They also have more explicit error messages. I'll submit a PR to do the same here. |
I've been trying to play around with this example from Qiskit's docs. To submit the circuit to IonQ via Azure, I'm using these instructions.
When I get to the line
ae_result = ae.estimate(problem)
, I end up getting the following error:This is printed out in a loop until my computer runs out of RAM. If I run the code on IBM's online Quantum Lab, the code terminates with the error:
Is this the intended behavior? I'm able to run the circuit if I construct it manually via
ae.construct_circuit(problem, measurement=True)
and submit that to IonQ, but this way I can't use any of the nice post-processing provided by the wrapper.Apologies if this isn't the right way to ask, but I have no idea if this is a Qiskit, Azure, or IonQ issue.
The text was updated successfully, but these errors were encountered: