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

Qiskit Job Id Retrival Error for qiskit-QAOA with Ionq Azure Quantum Provider #259

Closed
leonox opened this issue Feb 8, 2022 · 4 comments
Closed

Comments

@leonox
Copy link

leonox commented Feb 8, 2022

Describe the bug
Dear Azure Quantum Devs&Users, I am currently using qiskit on ionq hardware via azure quantum providers (as part of a quantum inspired application). Using the std example I can directly run circuits but not a qaoa optimization (Error:"FAILURE: Can not get job id, Resubmit the qobj to get job id. Error: 'list' object has no attribute 'clbits' ") - could this be because Quantum Instance does not utilizie ionq_provider/backend yet or the azure provider is missing arguments and what could help to identify/resolve the issue?

To Reproduce
Code excerpts:
azure_provider = AzureQuantumProvider(subscription_id="subid", resource_group="rog", name="qc", location="West Europe", credential=credential) simulator_backend = azure_provider.get_backend('ionq.simulator') seed = 42 cobyla = COBYLA() cobyla.set_options(maxiter=250) quantum_instance = QuantumInstance(backend=simulator_backend, seed_simulator=seed, seed_transpiler=seed) qaoa_mes = QAOA(optimizer=cobyla, reps=3, quantum_instance=quantum_instance) qaoa = MinimumEigenOptimizer(qaoa_mes) result = qaoa.solve(qp) throws the error
with simulator_backend = Aer.get_backend('aer_simulator') it runs like a charm

azure_provider = AzureQuantumProvider(subscription_id="subid", resource_group="rog", name="qc", location="West Europe", credential=credential) simulator_backend = azure_provider.get_backend('ionq.simulator'); quantum_instance = QuantumInstance(backend=simulator_backend, seed_simulator=seed, seed_transpiler=seed) circuit = QuantumCircuit(3, 3) circuit.name = "Qiskit Sample - 3-qubit GHZ circuit" circuit.h(0) circuit.measure([0, 1, 2], [0, 1, 2]) job = simulator_backend.run(circuit, shots=100) result = job.result() works

Expected behavior
return result without error

System information

  • OS: Windows
  • packages:
    azure-quantum 0.21.2112.180703 pypi_0 pypi
    qiskit 0.34.1 pypi_0 pypi
    qiskit-aer 0.10.2 pypi_0 pypi
    qiskit-ibmq-provider 0.18.3 pypi_0 pypi
    qiskit-ignis 0.7.0 pypi_0 pypi
    qiskit-ionq 0.1.4 pypi_0 pypi
    qiskit-optimization 0.3.0 pypi_0 pypi
    qiskit-terra 0.19.1 pypi_0 pypi
@cgranade cgranade transferred this issue from microsoft/Quantum Feb 24, 2022
@cgranade
Copy link
Contributor

Thanks for filing! I've transferred the issue to the repo where we track issues with Azure Quantum usage from Python metaprogramming frameworks so that we can triage and respond appropriately. Thank you!

@anpaz
Copy link
Member

anpaz commented Mar 25, 2022

This seems like another instance of #224

@anpaz
Copy link
Member

anpaz commented Mar 28, 2022

@leonox, we think we have identified the problem and should get fixed with #278.
In the meanwhile, we have published a beta package in case you want to try it yourself, you can pick it by installing version 0.23.201228b1, as in:

pip install azure-quantum[qiskit]==0.23.201228b1`

This is a pre-release version out of https://github.com/microsoft/qdk/tree/6814e494f754c619a1b17a05644d93e3064529ae. I was able to run your example using this version.
Let us know how it goes.

@leonox
Copy link
Author

leonox commented Apr 8, 2022

Great thank you - the ionq.qpu and ionq.simulator are now responding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants