summary refs log tree commit diff
path: root/pkgs/development/python-modules/cirq-core
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2021-11-12 22:25:16 +0000
committerRobert Scott <code@humanleg.org.uk>2021-11-12 22:25:16 +0000
commita1f3840107e6cc0c18a2a767bb42860b1ec4e29a (patch)
treed1186c5774cf0adebd067be2046e6b66085d543a /pkgs/development/python-modules/cirq-core
parent4e61e1242c091246e008ff104e82f0901a37b9ca (diff)
downloadnixpkgs-a1f3840107e6cc0c18a2a767bb42860b1ec4e29a.tar
nixpkgs-a1f3840107e6cc0c18a2a767bb42860b1ec4e29a.tar.gz
nixpkgs-a1f3840107e6cc0c18a2a767bb42860b1ec4e29a.tar.bz2
nixpkgs-a1f3840107e6cc0c18a2a767bb42860b1ec4e29a.tar.lz
nixpkgs-a1f3840107e6cc0c18a2a767bb42860b1ec4e29a.tar.xz
nixpkgs-a1f3840107e6cc0c18a2a767bb42860b1ec4e29a.tar.zst
nixpkgs-a1f3840107e6cc0c18a2a767bb42860b1ec4e29a.zip
python3Packages.cirq-core: fix for aarch64
apply upstream patches fixing the test tolerances
Diffstat (limited to 'pkgs/development/python-modules/cirq-core')
-rw-r--r--pkgs/development/python-modules/cirq-core/default.nix21
1 files changed, 17 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/cirq-core/default.nix b/pkgs/development/python-modules/cirq-core/default.nix
index eae189ce404..83674eb8c76 100644
--- a/pkgs/development/python-modules/cirq-core/default.nix
+++ b/pkgs/development/python-modules/cirq-core/default.nix
@@ -3,6 +3,7 @@
 , buildPythonPackage
 , pythonOlder
 , fetchFromGitHub
+, fetchpatch
 , duet
 , matplotlib
 , networkx
@@ -43,6 +44,22 @@ buildPythonPackage rec {
 
   sourceRoot = "source/${pname}";
 
+  patches = [
+    # present in upstream master - remove after 0.13.1
+    (fetchpatch {
+      name = "fix-test-tolerances.part-1.patch";
+      url = "https://github.com/quantumlib/Cirq/commit/eb1d9031e55d3c8801ea44abbb6a4132b2fc5126.patch";
+      sha256 = "0ka24v6dfxnap9p07ni32z9zccbmw0lbrp5mcknmpsl12hza98xm";
+      stripLen = 1;
+    })
+    (fetchpatch {
+      name = "fix-test-tolerances.part-2.patch";
+      url = "https://github.com/quantumlib/Cirq/commit/a28d601b2bcfc393336375c53e5915fd16455395.patch";
+      sha256 = "0k2dqsm4ydn6556d40kc8j04jgjn59z4wqqg1jn1r916a7yxw493";
+      stripLen = 1;
+    })
+  ];
+
   postPatch = ''
     substituteInPlace requirements.txt \
       --replace "matplotlib~=3.0" "matplotlib" \
@@ -84,10 +101,6 @@ buildPythonPackage rec {
   disabledTests = [
     "test_metadata_search_path" # tries to import flynt, which isn't in Nixpkgs
     "test_benchmark_2q_xeb_fidelities" # fails due pandas MultiIndex. Maybe issue with pandas version in nix?
-  ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [
-    # Seem to fail due to math issues on aarch64?
-    "expectation_from_wavefunction"
-    "test_single_qubit_op_to_framed_phase_form_output_on_example_case"
   ];
 
   meta = with lib; {