From 7bd8cb566810c61a7d8555a3c16c2fe643eaacd9 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 4 Apr 2022 14:10:36 -0400 Subject: [PATCH 1/2] Only install terra from binary for wheel jobs In the recently released terra 0.20.0 release the minimum python packaging spec supported is manylinux2014 now. On the main branch we bumped the manylinux base image we use for wheel jobs to manylinux2014 in #1498. However, on the stable 0.10.x branch we don't want to do that since we probably should not drop support for older environments on a stable release. This commit updates the wheel job config to instead install terra from a compatible binary wheel instead of using the latest release. This should hopefully avoid the CI failure but still enable us to run without building terra from source or dropping support for manylinux2010. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 01b42e6c56..c32e5f3662 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ test-command = "python {project}/tools/verify_wheels.py" # tendency to crash if they're installed from source by `pip install`, and since # Numpy 1.22 there are no i686 wheels, so we force pip to use older ones without # restricting any dependencies that Numpy and Scipy might have. -before-test = "pip install --only-binary=numpy,scipy numpy scipy" +before-test = "pip install --only-binary=numpy,scipy,qiskit-terra numpy scipy qiskit-terra" [tool.cibuildwheel.linux] before-all = "yum install -y openblas-devel" From a8e6be4be2f83bcd9d3e58d260c61dee51bef762 Mon Sep 17 00:00:00 2001 From: Hitomi Takahashi Date: Fri, 4 Mar 2022 16:35:06 +0900 Subject: [PATCH 2/2] Use unitary equivalence instead of circuit equality in noise tests (#1446) * Use unitary equivalence instead of circuit equality in noise tests Recent qiskit-terra reduces I gates and some tests of Aer failed in equality checks of QuantumCircuit injected as noise. This PR change a way of equality check from object equality to unitary equivalence of QuantumCircuit. Co-authored-by: Matthew Treinish Co-authored-by: Hiroshi Horii --- test/terra/noise/test_standard_errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/terra/noise/test_standard_errors.py b/test/terra/noise/test_standard_errors.py index eaba494eed..816a58d0a6 100644 --- a/test/terra/noise/test_standard_errors.py +++ b/test/terra/noise/test_standard_errors.py @@ -520,7 +520,7 @@ def test_pauli_error_2q_gate_from_string_1qonly(self): for i in range(actual.size): circ, prob = actual.error_term(i) expected_circ, expected_prob = expected.error_term(i) - self.assertEqual(circ, expected_circ) + self.assertTrue(qi.Operator(circ).equiv(qi.Operator(expected_circ))) self.assertAlmostEqual(prob, expected_prob) def test_pauli_error_2q_gate_from_pauli(self):