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

Some fake simulators throw NoiseError when running an empty circuit #2192

Open
weucode opened this issue Jul 11, 2024 · 0 comments
Open

Some fake simulators throw NoiseError when running an empty circuit #2192

weucode opened this issue Jul 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@weucode
Copy link

weucode commented Jul 11, 2024

Informations

  • Qiskit Aer version:
  • Python version:
  • Operating system:

What is the current behavior?

Currently, some fake simulators throw a NoiseError exception when running an empty quantum circuit (initialized and measured).

qiskit_aer.noise.noiseerror.NoiseError: 'Invalid T_2 relaxation time parameter: T_2 greater than 2 * T_1.'

Steps to reproduce the problem

Run the following program:

from qiskit.circuit import QuantumCircuit
from qiskit import transpile
from qiskit_ibm_runtime.fake_provider import FakeSherbrooke, FakeArmonkV2, FakeAuckland, FakeBelemV2
from qiskit_aer import AerSimulator


qc = QuantumCircuit(1)
qc.measure_all()

backend = FakeSherbrooke()

transpiled_qc = transpile(qc, backend=backend, scheduling_method='asap')
job = backend.run(transpiled_qc)
print(job.result().get_counts())

However, running the same circuit on the real quantum computer or AerSimulator will output the measurement result successfully.

from qiskit.circuit import QuantumCircuit
from qiskit import transpile
from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit_aer import AerSimulator


qc = QuantumCircuit(1)
qc.measure_all()

service = QiskitRuntimeService()
backend = service.backend("ibm_sherbrooke")
backend_sim = AerSimulator.from_backend(backend) # Both backend and backend_sim can run successfully. 

transpiled_qc = transpile(qc, backend=backend, scheduling_method='asap')
job1 = backend.run(transpiled_qc)
print(job1.result().get_counts())
job2 = backend_sim.run(transpiled_qc)
print(job2.result().get_counts())

What is the expected behavior?

The behavior should be consistent across both fake and real backends.

@weucode weucode added the bug Something isn't working label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant