-
Notifications
You must be signed in to change notification settings - Fork 365
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
Circuits with Reset
can not be transpiled with AerSimulator
with a noise model
#1975
Labels
bug
Something isn't working
Comments
This was referenced Oct 27, 2023
github-merge-queue bot
pushed a commit
to qiskit-community/qiskit-experiments
that referenced
this issue
Oct 31, 2023
This sets the basis gates explicitly on the `NoiseModel` used for some tomography tests. Without this, some of the test circuits fail to transpile because `reset` is not in the equivalence library when using qiskit-aer 0.13.0 (see Qiskit/qiskit-aer#1975).
github-merge-queue bot
pushed a commit
to qiskit-community/qiskit-experiments
that referenced
this issue
Oct 31, 2023
This sets the basis gates explicitly on the `NoiseModel` used for some tomography tests. Without this, some of the test circuits fail to transpile because `reset` is not in the equivalence library when using qiskit-aer 0.13.0 (see Qiskit/qiskit-aer#1975).
Closed by #1976 |
mergify bot
pushed a commit
to qiskit-community/qiskit-experiments
that referenced
this issue
Oct 31, 2023
This sets the basis gates explicitly on the `NoiseModel` used for some tomography tests. Without this, some of the test circuits fail to transpile because `reset` is not in the equivalence library when using qiskit-aer 0.13.0 (see Qiskit/qiskit-aer#1975). (cherry picked from commit c2c6097)
wshanks
added a commit
to wshanks/qiskit-experiments
that referenced
this issue
Nov 28, 2023
+ Unpin qiskit-aer extra requirement now that 0.13.1 has been released and we do not have to worry about Qiskit/qiskit-aer#1985 + Remove workaround in test for Qiskit/qiskit-aer#1975 Note that the tests will not pass with 0.13.0 because the workaround was removed, but the workaround was for an Aer bug so we don't reflect it as an incomapitibility with qiskit-experiments.
wshanks
added a commit
to wshanks/qiskit-experiments
that referenced
this issue
Nov 28, 2023
+ Unpin qiskit-aer extra requirement now that 0.13.1 has been released and we do not have to worry about Qiskit/qiskit-aer#1985 + Remove workaround in test for Qiskit/qiskit-aer#1975 Note that the tests will not pass with 0.13.0 because the workaround was removed, but the workaround was for an Aer bug so we don't reflect it as an incomapitibility with qiskit-experiments.
github-merge-queue bot
pushed a commit
to qiskit-community/qiskit-experiments
that referenced
this issue
Nov 29, 2023
+ Unpin qiskit-aer extra requirement now that 0.13.1 has been released and we do not have to worry about Qiskit/qiskit-aer#1985 + Remove workaround in test for Qiskit/qiskit-aer#1975 Note that the tests will not pass with 0.13.0 because the workaround was removed, but the workaround was for an Aer bug so we don't reflect it as an incomapitibility with qiskit-experiments.
github-merge-queue bot
pushed a commit
to qiskit-community/qiskit-experiments
that referenced
this issue
Nov 29, 2023
+ Unpin qiskit-aer extra requirement now that 0.13.1 has been released and we do not have to worry about Qiskit/qiskit-aer#1985 + Remove workaround in test for Qiskit/qiskit-aer#1975 Note that the tests will not pass with 0.13.0 because the workaround was removed, but the workaround was for an Aer bug so we don't reflect it as an incomapitibility with qiskit-experiments.
github-merge-queue bot
pushed a commit
to qiskit-community/qiskit-experiments
that referenced
this issue
Nov 29, 2023
+ Unpin qiskit-aer extra requirement now that 0.13.1 has been released and we do not have to worry about Qiskit/qiskit-aer#1985 + Remove workaround in test for Qiskit/qiskit-aer#1975 Note that the tests will not pass with 0.13.0 because the workaround was removed, but the workaround was for an Aer bug so we don't reflect it as an incomapitibility with qiskit-experiments.
itoko
pushed a commit
to itoko/qiskit-experiments
that referenced
this issue
Dec 12, 2023
+ Unpin qiskit-aer extra requirement now that 0.13.1 has been released and we do not have to worry about Qiskit/qiskit-aer#1985 + Remove workaround in test for Qiskit/qiskit-aer#1975 Note that the tests will not pass with 0.13.0 because the workaround was removed, but the workaround was for an Aer bug so we don't reflect it as an incomapitibility with qiskit-experiments.
nkanazawa1989
pushed a commit
to nkanazawa1989/qiskit-experiments
that referenced
this issue
Jan 17, 2024
This sets the basis gates explicitly on the `NoiseModel` used for some tomography tests. Without this, some of the test circuits fail to transpile because `reset` is not in the equivalence library when using qiskit-aer 0.13.0 (see Qiskit/qiskit-aer#1975).
nkanazawa1989
pushed a commit
to nkanazawa1989/qiskit-experiments
that referenced
this issue
Jan 17, 2024
+ Unpin qiskit-aer extra requirement now that 0.13.1 has been released and we do not have to worry about Qiskit/qiskit-aer#1985 + Remove workaround in test for Qiskit/qiskit-aer#1975 Note that the tests will not pass with 0.13.0 because the workaround was removed, but the workaround was for an Aer bug so we don't reflect it as an incomapitibility with qiskit-experiments.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Informations
What is the current behavior?
When trying to transpile a circuit with a
Reset
instruction with anAerSimulator
backend with a noise model, the transpiler raises an exception about "reset" not being in the equivalence library.Steps to reproduce the problem
What is the expected behavior?
Successful transpilation
Suggested solutions
This is a consequence of the conversion to
BackendV2
. Before the conversion,AerSimulator
had no target object so this code would execute and insertreset
into the list of allowed instructions. Now when the noise model is set as an option, this code sets the basis gates:qiskit-aer/qiskit_aer/backends/aer_simulator.py
Lines 901 to 902 in 85831ee
which takes the intersection of the default set with the basis gates of the noise model:
qiskit-aer/qiskit_aer/backends/aer_simulator.py
Lines 945 to 947 in 85831ee
which defaults to just a small set of gates:
qiskit-aer/qiskit_aer/noise/noise_model.py
Lines 197 to 201 in 85831ee
These cached basis gates get used to set the backend configuration basis gates:
qiskit-aer/qiskit_aer/backends/aer_simulator.py
Line 868 in 85831ee
The
convert_to_target()
function whichAerSimulator
uses to generate the target object uses the configuration basis gates to set the instructions in the target and so "reset" is not included.I am not sure if it makes sense to add
reset
to the default set forNoiseModel
or if some other solution is preferred. My workaround for now is to useNoiseModel(basis_gates=["id", "rz", "sx", "cx", "reset"])
.The text was updated successfully, but these errors were encountered: