Repository: qiskit-community/qiskit-optimization (language: python)

Issue:
Unpin numpy
<!--
⚠️ If you do not respect this template, your pull request will be closed.
⚠️ Your pull request title should be short detailed and understandable for all.
⚠️ Also, please add it in the CHANGELOG file under Unreleased section.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary

docplex 2.28.240 was released on Aug 2 with numpy 2 support. So, I unpin the numpy version
https://pypi.org/project/docplex/2.28.240/#history

requires #630 to pass CI 

### Details and comments



Pin pip for "pip check"
<!--
⚠️ If you do not respect this template, your pull request will be closed.
⚠️ Your pull request title should be short detailed and understandable for all.
⚠️ Also, please add it in the CHANGELOG file under Unreleased section.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary

`pip check` of CI fails since a couple of days ago.
```
gurobipy 11.0.3 is not supported on this platform
```

I found an issue of pip https://github.com/pypa/pip/issues/12884 is likely to be related to the failure. I try to pin pip only for `pip check`.


### Details and comments



Unpin numpy
<!--
⚠️ If you do not respect this template, your pull request will be closed.
⚠️ Your pull request title should be short detailed and understandable for all.
⚠️ Also, please add it in the CHANGELOG file under Unreleased section.
⚠️ If your pull request fixes an open issue, please link to the issue.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.
-->

### Summary

docplex 2.28.240 was released on Aug 2 with numpy 2 support. So, I unpin the numpy version
https://pypi.org/project/docplex/2.28.240/#history

requires #630 to pass CI 

### Details and comments





Discussion / hints:
## Pull Request Test Coverage Report for [Build 10259574678](https://coveralls.io/builds/69057968)


### Details

* **0** of **0**   changed or added relevant lines in **0** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage remained the same at **92.857%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/69057968/badge)](https://coveralls.io/builds/69057968) |
| :-- | --: |
| Change from base [Build 10255575761](https://coveralls.io/builds/69052524): |  0.0% |
| Covered Lines: | 4446 |
| Relevant Lines: | 4788 |

---
##### 💛  - [Coveralls](https://coveralls.io)

Yes, let's backport it.
## Pull Request Test Coverage Report for [Build 10242188201](https://coveralls.io/builds/69032882)


### Details

* **0** of **0**   changed or added relevant lines in **0** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage remained the same at **92.857%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/69032882/badge)](https://coveralls.io/builds/69032882) |
| :-- | --: |
| Change from base [Build 10042117970](https://coveralls.io/builds/68778234): |  0.0% |
| Covered Lines: | 4446 |
| Relevant Lines: | 4788 |

---
##### 💛  - [Coveralls](https://coveralls.io)

## Pull Request Test Coverage Report for [Build 10259574678](https://coveralls.io/builds/69057968)


### Details

* **0** of **0**   changed or added relevant lines in **0** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage remained the same at **92.857%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/69057968/badge)](https://coveralls.io/builds/69057968) |
| :-- | --: |
| Change from base [Build 10255575761](https://coveralls.io/builds/69052524): |  0.0% |
| Covered Lines: | 4446 |
| Relevant Lines: | 4788 |

---
##### 💛  - [Coveralls](https://coveralls.io)

Yes, let's backport it.

Fix patch:
diff --git a/requirements.txt b/requirements.txt
index 244fc92a..03abc804 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,7 @@
 qiskit>=0.44
 qiskit-algorithms>=0.2.0
 scipy>=1.9.0,<1.14
-numpy>=1.17,<2
+numpy>=1.17
 docplex>=2.21.207,!=2.24.231
 setuptools>=40.1.0
 networkx>=2.6.3


Test patch:
diff --git a/test/algorithms/qrao/test_quantum_random_access_optimizer.py b/test/algorithms/qrao/test_quantum_random_access_optimizer.py
index 6dda3a31..30d0cbbf 100644
--- a/test/algorithms/qrao/test_quantum_random_access_optimizer.py
+++ b/test/algorithms/qrao/test_quantum_random_access_optimizer.py
@@ -1,6 +1,6 @@
 # This code is part of a Qiskit project.
 #
-# (C) Copyright IBM 2023.
+# (C) Copyright IBM 2023, 2024.
 #
 # This code is licensed under the Apache License, Version 2.0. You may
 # obtain a copy of this license in the LICENSE.txt file in the root directory
@@ -70,7 +70,7 @@ def test_solve_relaxed_vqe(self):
         """Test QuantumRandomAccessOptimizer with VQE."""
         vqe = VQE(
             ansatz=self.ansatz,
-            optimizer=COBYLA(),
+            optimizer=COBYLA(tol=1e-6),
             estimator=Estimator(),
         )
         qrao = QuantumRandomAccessOptimizer(min_eigen_solver=vqe)
@@ -78,9 +78,13 @@ def test_solve_relaxed_vqe(self):
         self.assertIsInstance(relaxed_results, VQEResult)
         self.assertAlmostEqual(relaxed_results.eigenvalue, -2.73861, delta=1e-4)
         self.assertEqual(len(relaxed_results.aux_operators_evaluated), 3)
-        self.assertAlmostEqual(relaxed_results.aux_operators_evaluated[0][0], 0.31632, delta=1e-4)
-        self.assertAlmostEqual(relaxed_results.aux_operators_evaluated[1][0], 0, delta=1e-4)
-        self.assertAlmostEqual(relaxed_results.aux_operators_evaluated[2][0], 0.94865, delta=1e-4)
+        self.assertAlmostEqual(
+            relaxed_results.aux_operators_evaluated[0][0].item(), 0.31632, delta=1e-4
+        )
+        self.assertAlmostEqual(relaxed_results.aux_operators_evaluated[1][0].item(), 0, delta=1e-4)
+        self.assertAlmostEqual(
+            relaxed_results.aux_operators_evaluated[2][0].item(), 0.94865, delta=1e-4
+        )
         self.assertIsInstance(rounding_context, RoundingContext)
         self.assertEqual(rounding_context.circuit.num_qubits, self.ansatz.num_qubits)
         self.assertEqual(rounding_context.encoding, self.encoding)