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

Remove workarounds for qiskit-aer 0.13.0 #1330

Merged
merged 2 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements-extras.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
qiskit-ibm-provider>=0.6.1 # for submitting experiments to backends through the IBM provider
cvxpy>=1.3.2 # for tomography
scikit-learn # for discriminators
qiskit-aer>=0.11.0,<=0.12.2 # temporary version pin until 0.13.1 release
qiskit-aer>=0.11.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be

Suggested change
qiskit-aer>=0.11.0
qiskit-aer>=0.11.0, !=0.13.0

to be safe? Or should we just raise the requirement to 0.13.1?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put that at first but then took it out. The issues we were avoiding in 0.13.0 were Aer bugs (not treating reset as a default basis gate, changing the default simulation method leading to slower performance) that affected the tests. They were not actually issues with the experiments code. So I think the better argument would be to put !=0.13.0 into constraints.txt but in practice it's probably not worth the effort since anyone updating Aer now should end up with 0.13.1 any way, so avoiding 0.13.0 is a pretty niche case. It wouldn't hurt much though (just maybe the extra overhead of someone in the future seeing that in constraints.txt and thinking about it before taking it out).

qiskit_dynamics>=0.4.0 # for the PulseBackend
4 changes: 1 addition & 3 deletions test/library/tomography/tomo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ def readout_noise_model(num_qubits, seed=None):
p1g0s = 0.15 * rng.random(num_qubits)
p0g1s = 0.3 * rng.random(num_qubits)
amats = np.stack([[1 - p1g0s, p1g0s], [p0g1s, 1 - p0g1s]]).T
# Set `basis_gates` so that reset is included.
# See https://github.com/Qiskit/qiskit-aer/issues/1975
noise_model = NoiseModel(basis_gates=["id", "rz", "sx", "cx", "reset"])
noise_model = NoiseModel()
for i, amat in enumerate(amats):
noise_model.add_readout_error(amat.T, [i])
return noise_model