Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Asyncio error while running job on simulator #378

@TimVroomans

Description

@TimVroomans

Bug report

Describe the bug

Calling QIProvider().get_backend("QX emulator").run(circuit), where circuit is a Qiskit QuantumCircuit caused, raised RuntimeError: asyncio.run() cannot be called from a running event loop

To Reproduce

from qiskit import QuantumCircuit
from qiskit_quantuminspire.qi_provider import QIProvider

# Define a circuit
circuit = QuantumCircuit(1, 1)
circuit.measure(0, 0)

# Submit to simulator
provider = QIProvider()
simulator_backend = provider.get_backend("QX emulator")
job = simulator_backend.run(circuit)

Expected behavior

If using the interface correctly, I expected the job to run and return a bunch of zeroes.
If not using the interface correctly, I expected a clear error message pointing me to my mistake

Screenshots

Image

Image

Operating System (please complete the following information)

  • OS: Windows 10

Additional context

Add any other context about the problem here:

  • Python version: 3.9 in a mamba environment
  • List of installed packages (pip list or equivalent):
    Package Version

aiohappyeyeballs 2.4.4
aiohttp 3.11.11
aiosignal 1.3.2
annotated-types 0.7.0
anyio 4.6.2
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asttokens 2.0.5
async-lru 2.0.4
async-timeout 5.0.1
attrs 24.3.0
babel 2.16.0
backcall 0.2.0
beautifulsoup4 4.12.3
bleach 6.2.0
Brotli 1.0.9
cachetools 5.5.1
certifi 2024.12.14
cffi 1.17.1
chardet 5.2.0
charset-normalizer 3.3.2
click 8.1.8
colorama 0.4.6
comm 0.2.1
debugpy 1.8.11
decorator 5.1.1
defusedxml 0.7.1
dill 0.3.8
distlib 0.3.9
exceptiongroup 1.2.0
executing 0.8.3
fastjsonschema 2.20.0
filelock 3.17.0
frozenlist 1.5.0
gmpy2 2.2.1
h11 0.14.0
httpcore 1.0.2
httpx 0.27.0
idna 3.7
importlib_metadata 8.5.0
ipykernel 6.29.5
ipython 8.15.0
jedi 0.19.2
Jinja2 3.1.5
json5 0.9.25
jsonschema 4.23.0
jsonschema-specifications 2023.7.1
jupyter_client 8.6.3
jupyter_core 5.7.2
jupyter-events 0.10.0
jupyter-lsp 2.2.0
jupyter_server 2.14.1
jupyter_server_terminals 0.4.4
jupyterlab 4.3.4
jupyterlab-pygments 0.1.2
jupyterlab_server 2.27.3
libqasm 0.6.9
markdown-it-py 3.0.0
MarkupSafe 2.1.3
matplotlib-inline 0.1.6
mdurl 0.1.2
mistune 2.0.4
mkl_fft 1.3.11
mkl_random 1.2.8
mkl-service 2.4.0
mpmath 1.3.0
multidict 6.1.0
nbclient 0.8.0
nbconvert 7.16.4
nbformat 5.10.4
nest-asyncio 1.6.0
networkx 3.2.1
notebook_shim 0.2.3
numpy 1.26.4
oauthlib 3.2.2
opensquirrel 0.3.0
overrides 7.4.0
packaging 24.2
pandocfilters 1.5.0
parso 0.8.4
pbr 5.6.0
pickleshare 0.7.5
pip 25.0
platformdirs 4.3.6
pluggy 1.5.0
prometheus_client 0.21.0
prompt-toolkit 3.0.43
propcache 0.2.1
psutil 5.9.0
pure-eval 0.2.2
pycparser 2.21
pydantic 2.10.6
pydantic_core 2.27.2
pydantic-settings 2.7.1
Pygments 2.15.1
PyJWT 2.10.1
pyproject-api 1.9.0
PySocks 1.7.1
python-dateutil 2.9.0.post0
python-dotenv 1.0.1
python-json-logger 3.2.1
pywin32 308
pywinpty 2.0.14
PyYAML 6.0.2
pyzmq 26.2.0
qi-compute-api-client 0.46.0
qiskit 1.3.2
qiskit-quantuminspire 0.8.0
quantuminspire 0.1.0
referencing 0.30.2
requests 2.32.3
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rich 13.9.4
rpds-py 0.22.3
rustworkx 0.16.0
scipy 1.13.1
Send2Trash 1.8.2
setuptools 72.1.0
shellingham 1.5.4
six 1.16.0
sniffio 1.3.0
soupsieve 2.5
stack-data 0.2.0
stevedore 5.4.0
symengine 0.13.0
sympy 1.13.3
terminado 0.17.1
tinycss2 1.2.1
tomli 2.2.1
tornado 6.4.2
tox 4.24.1
traitlets 5.14.3
typer 0.15.1
typing_extensions 4.12.2
urllib3 2.3.0
virtualenv 20.29.1
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.8.0
wheel 0.45.1
win-inet-pton 1.1.0
yarl 1.18.3
zipp 3.21.0

  • Anything else that might be relevant

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions