-
Notifications
You must be signed in to change notification settings - Fork 370
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
Aer sampler does not truncate to active number of qubits #2084
Labels
bug
Something isn't working
Comments
+1 |
Could you provide full script to reproduce the problem? |
from qiskit import *
from qiskit_aer.primitives import Sampler
sampler = Sampler()
qc = QuantumCircuit(100, 2)
qc.h(98)
qc.cx(98, 99)
qc.measure([98, 99], [0, 1])
sampler.run(qc).result() |
This issue is fixed by release 0.14.1 |
Merged
I'm sorry but I had implemented wrongly this one: qiskit-aer/qiskit_aer/backends/aerbackend.py Line 355 in 7b93719
I fixed this |
I confirmed that 0.15 can run
and
, which were reported in this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Informations
What is the current behavior?
For many years now, the Aer simulator has truncated a circuit to only the active qubits, allowing for simulating transpiled circuits against device noise models; even when the full device number of qubits is larger than Aer supports (but the circuits active width is small enough for Aer to handle). However, the Aer
Sampler
does not perform the same truncation. E.g. using 5 qubits, and transpiling to an Eagle, the old Aer simulator will still truncate and run the circuit.works fine. But doing the same thing via the Aer sampler raises:
CircuitTooWideForTarget: 'Number of qubits (127) in circuit-8195 is greater than maximum (30) in the coupling_map'
Steps to reproduce the problem
Run a transpiled circuit that is smaller than 30Q in active qubits, but transpiled against a 127Q system
What is the expected behavior?
The sampler should truncate to active qubits only, just like the simulator does.
Suggested solutions
The text was updated successfully, but these errors were encountered: