Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-cirq for openSUSE:Factory 
checked in at 2021-11-21 23:52:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cirq (Old)
 and      /work/SRC/openSUSE:Factory/.python-cirq.new.1895 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-cirq"

Sun Nov 21 23:52:13 2021 rev:3 rq:932764 version:0.9.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cirq/python-cirq.changes  2021-02-07 
15:24:21.218222103 +0100
+++ /work/SRC/openSUSE:Factory/.python-cirq.new.1895/python-cirq.changes        
2021-11-21 23:52:42.602150814 +0100
@@ -1,0 +2,6 @@
+Fri Nov 12 13:25:24 UTC 2021 - Guillaume GARDET <guillaume.gar...@opensuse.org>
+
+- Add upstream patch to fix test on aarch64:
+  * 4636.patch
+
+-------------------------------------------------------------------

New:
----
  4636.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-cirq.spec ++++++
--- /var/tmp/diff_new_pack.qjOg2n/_old  2021-11-21 23:52:43.086149254 +0100
+++ /var/tmp/diff_new_pack.qjOg2n/_new  2021-11-21 23:52:43.090149241 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-cirq
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,6 +27,8 @@
 License:        Apache-2.0
 URL:            https://github.com/quantumlib/Cirq
 Source:         
https://github.com/quantumlib/Cirq/archive/v%{version}.tar.gz#/%{packagename}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM - https://github.com/quantumlib/Cirq/issues/4379
+Patch1:         4636.patch
 BuildRequires:  %{python_module PyLaTeX}
 BuildRequires:  %{python_module freezegun >= 0.3.15}
 BuildRequires:  %{python_module google-api-core >= 1.14.0}
@@ -77,6 +79,7 @@
 
 %prep
 %setup -q -n %{packagename}-%{version}
+%patch1 -p2
 
 %build
 %python_build

++++++ 4636.patch ++++++
>From 8a8e858b96210927de74d3a532c15487bcd4bd24 Mon Sep 17 00:00:00 2001
From: Dave Bacon <daba...@gmail.com>
Date: Mon, 8 Nov 2021 01:01:36 +0000
Subject: [PATCH] Fix operator spaces test which fails due to precision on some
 architectures

---
 cirq-core/cirq/linalg/operator_spaces_test.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cirq-core/cirq/linalg/operator_spaces_test.py 
b/cirq-core/cirq/linalg/operator_spaces_test.py
index fe1f41757eb..fc2a0c719f9 100644
--- a/cirq-core/cirq/linalg/operator_spaces_test.py
+++ b/cirq-core/cirq/linalg/operator_spaces_test.py
@@ -175,7 +175,9 @@ def test_hilbert_schmidt_inner_product_is_linear(a, m1, b, 
m2):
 @pytest.mark.parametrize('m', (I, X, Y, Z, H, SQRT_X, SQRT_Y, SQRT_Z))
 def test_hilbert_schmidt_inner_product_is_positive_definite(m):
     v = cirq.hilbert_schmidt_inner_product(m, m)
-    assert np.isreal(v)
+    # Cannot check using np.is_real due to bug in aarch64.
+    # See https://github.com/quantumlib/Cirq/issues/4379
+    assert np.isclose(np.imag(v), 1e-16)
     assert v.real > 0
 
 

Reply via email to