You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not able to get counts of simulation of a single S-gate with noise. There is no error without the noise-model or if another Hadamard-gate is added. The problem exists also in qiskit-ionq 0.5.1
Steps to reproduce the problem
from qiskit_ionq import IonQProvider
from qiskit import QuantumCircuit
import os
import qiskit_ionq
api_key = os.getenv('IONQ_API_KEY')
def main():
print(qiskit_ionq.__version__)
provider = IonQProvider(token=api_key)
backend = provider.get_backend("simulator")
backend.set_options(noise_model="aria-2")
qc = QuantumCircuit(1, 1)
qc.s(0)
# qc.h(0) # no error when uncommented
qc.measure([0], [0])
job = backend.run(qc, shots=1024)
print(job.get_counts())
if __name__ == '__main__':
main()
error message:
Traceback (most recent call last):
File "/Users/vrn738/PycharmProjects/hardware_benchmark/ionq/test.py", line 25, in <module>
main()
File "/Users/vrn738/PycharmProjects/hardware_benchmark/ionq/test.py", line 21, in main
print(job.get_counts())
^^^^^^^^^^^^^^^^
File "/Users/vrn738/PycharmProjects/hardware_benchmark/.venv/lib/python3.12/site-packages/qiskit_ionq/ionq_job.py", line 228, in get_counts
return self.result().get_counts(circuit)
^^^^^^^^^^^^^
File "/Users/vrn738/PycharmProjects/hardware_benchmark/.venv/lib/python3.12/site-packages/qiskit_ionq/ionq_job.py", line 286, in result
self._result = self._format_result(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vrn738/PycharmProjects/hardware_benchmark/.venv/lib/python3.12/site-packages/qiskit_ionq/ionq_job.py", line 494, in _format_result
(counts, probabilities) = _build_counts(
^^^^^^^^^^^^^^
File "/Users/vrn738/PycharmProjects/hardware_benchmark/.venv/lib/python3.12/site-packages/qiskit_ionq/ionq_job.py", line 109, in _build_counts
raise exceptions.IonQJobError("Cannot remap counts without data!")
qiskit_ionq.exceptions.IonQJobError: IonQJobError('Cannot remap counts without data!')
What is the expected behavior?
job.get_counts() should return the measurement counts
Suggested solutions
The text was updated successfully, but these errors were encountered:
qiskit-environment:
qiskit 1.0.2
qiskit-aer 0.14.2
qiskit-experiments 0.6.1
qiskit-ibm-experiment 0.4.7
qiskit-ionq 0.5.2
python version: python 3.12
OS: Mac OS 14.5
What is the current behavior?
Not able to get counts of simulation of a single S-gate with noise. There is no error without the noise-model or if another Hadamard-gate is added. The problem exists also in qiskit-ionq 0.5.1
Steps to reproduce the problem
error message:
What is the expected behavior?
job.get_counts()
should return the measurement countsSuggested solutions
The text was updated successfully, but these errors were encountered: