{"id":28122,"library":"qiskit-ionq","title":"Qiskit IonQ Provider","description":"Qiskit provider for IonQ backends, enabling users to run quantum circuits on IonQ's trapped-ion quantum computers via the IonQ API. Current version: 1.0.2, requires Python >=3.10 and Qiskit >=2.0. Releases are on-demand.","status":"active","version":"1.0.2","language":"python","source_language":"en","source_url":"https://github.com/qiskit-community/qiskit-ionq","tags":["quantum-computing","qiskit","ionq","quantum-provider"],"install":[{"cmd":"pip install qiskit-ionq","lang":"bash","label":"Install from PyPI"},{"cmd":"pip install 'qiskit-ionq[visualization]'","lang":"bash","label":"Install with visualization extras"}],"dependencies":[{"reason":"Core dependency for quantum circuit construction and transpilation.","package":"qiskit","optional":false},{"reason":"HTTP client for IonQ API calls.","package":"requests","optional":false},{"reason":"Used for optional visualization features.","package":"matplotlib","optional":true}],"imports":[{"note":"IonQProvider is a top-level export in qiskit_ionq, not in a submodule.","wrong":"from qiskit_ionq.providers import IonQProvider","symbol":"IonQProvider","correct":"from qiskit_ionq import IonQProvider"},{"note":"IonQBackend is exported from qiskit_ionq directly; it is not part of Qiskit's core providers.","wrong":"from qiskit.providers.ionq import IonQBackend","symbol":"IonQBackend","correct":"from qiskit_ionq import IonQBackend"}],"quickstart":{"code":"from qiskit_ionq import IonQProvider\nfrom qiskit import QuantumCircuit\n\n# Initialize provider with your API token from environment variable\nprovider = IonQProvider(token=os.environ.get('IONQ_API_TOKEN', 'your_token_here'))\n\n# Get backend\nbackend = provider.get_backend('ionq_simulator')\n\n# Create a simple Bell state circuit\nqc = QuantumCircuit(2, 2)\nqc.h(0)\nqc.cx(0, 1)\nqc.measure([0, 1], [0, 1])\n\n# Run the circuit\njob = backend.run(qc, shots=1024)\nprint(job.result().get_counts())","lang":"python","description":"Runs a Bell state circuit on the IonQ simulator backend. Requires IONQ_API_TOKEN environment variable."},"warnings":[{"fix":"Upgrade Qiskit to 2.x and qiskit-ionq to 1.x: pip install 'qiskit>=2.0' 'qiskit-ionq>=1.0.0'","message":"Version 1.0.0+ requires Qiskit >=2.0. Older versions of qiskit-ionq (0.x) are incompatible with Qiskit >=2.0. Upgrade both together.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Ensure you pass circuits as `QuantumCircuit` instances: `backend.run(qc)`","message":"The `run` method now expects circuits to be in a Qiskit `QuantumCircuit` object, not a list of `Instruction` or `Operation` objects.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Set the IONQ_API_TOKEN environment variable or pass token='your_token' to IonQProvider.","message":"IonQProvider accepts a token via constructor parameter or environment variable IONQ_API_TOKEN. Not providing either will raise an authentication error.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Upgrade to the latest version: pip install --upgrade qiskit-ionq","cause":"Using an outdated version (<1.0.0) where the class was named differently or not exported.","error":"ImportError: cannot import name 'IonQProvider' from 'qiskit_ionq'"},{"fix":"Use `backend.run(circuit, shots=1024)` instead of `backend.run(circuits=circuit, ...)`.","cause":"Passing circuits as keyword argument 'circuits' instead of positional argument.","error":"TypeError: backend.run() got an unexpected keyword argument 'circuits'"},{"fix":"Set the IONQ_API_TOKEN environment variable or pass a valid token to IonQProvider.","cause":"Missing or invalid API token.","error":"qiskit_ionq.exceptions.IonQAuthenticationError: 401 Client Error: Unauthorized"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}