summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-04-02 22:07:53 +0200
committerGitHub <noreply@github.com>2021-04-02 22:07:53 +0200
commitcd016b7bbd96a6c84f9bf0e57282d75fd2a8896d (patch)
tree271570141f71b17cb05a3694c9271003eaf22e21
parent5fba3382ff28e0177944ef2172ab5777f3cf0678 (diff)
parent6864b3192e9407ea9638e52d53fdcd562b974545 (diff)
downloadnixpkgs-cd016b7bbd96a6c84f9bf0e57282d75fd2a8896d.tar
nixpkgs-cd016b7bbd96a6c84f9bf0e57282d75fd2a8896d.tar.gz
nixpkgs-cd016b7bbd96a6c84f9bf0e57282d75fd2a8896d.tar.bz2
nixpkgs-cd016b7bbd96a6c84f9bf0e57282d75fd2a8896d.tar.lz
nixpkgs-cd016b7bbd96a6c84f9bf0e57282d75fd2a8896d.tar.xz
nixpkgs-cd016b7bbd96a6c84f9bf0e57282d75fd2a8896d.tar.zst
nixpkgs-cd016b7bbd96a6c84f9bf0e57282d75fd2a8896d.zip
Merge pull request #118352 from drewrisinger/dr-pr-cirq-bump
python3Packages.cirq: 0.9.1 -> 0.10.0
-rw-r--r--pkgs/development/python-modules/cirq/default.nix25
1 files changed, 9 insertions, 16 deletions
diff --git a/pkgs/development/python-modules/cirq/default.nix b/pkgs/development/python-modules/cirq/default.nix
index 16c61f2e895..f0b576299b2 100644
--- a/pkgs/development/python-modules/cirq/default.nix
+++ b/pkgs/development/python-modules/cirq/default.nix
@@ -3,7 +3,6 @@
 , buildPythonPackage
 , pythonOlder
 , fetchFromGitHub
-, freezegun
 , google-api-core
 , matplotlib
 , networkx
@@ -14,8 +13,10 @@
 , scipy
 , sortedcontainers
 , sympy
+, tqdm
 , typing-extensions
   # test inputs
+, freezegun
 , pytestCheckHook
 , pytest-asyncio
 , pytest-benchmark
@@ -27,7 +28,7 @@
 
 buildPythonPackage rec {
   pname = "cirq";
-  version = "0.9.1";
+  version = "0.10.0";
 
   disabled = pythonOlder "3.6";
 
@@ -35,42 +36,36 @@ buildPythonPackage rec {
     owner = "quantumlib";
     repo = "cirq";
     rev = "v${version}";
-    sha256 = "0mygvpq7kzga8l1w2jvwv9a2n3akpss45hrx250gdrnqjp6xrw64";
+    sha256 = "0xinml44n2lfl0q2lb2apmn69gsszlwim83082f66vyk0gpwd4lr";
   };
 
   postPatch = ''
     substituteInPlace requirements.txt \
-      --replace "freezegun~=0.3.15" "freezegun" \
       --replace "matplotlib~=3.0" "matplotlib" \
       --replace "networkx~=2.4" "networkx" \
       --replace "numpy~=1.16" "numpy" \
-      --replace "protobuf~=3.12.0" "protobuf"
-
-    # Fix serialize_sympy_constants test by allowing small errors in pi
-    substituteInPlace cirq/google/arg_func_langs_test.py \
-      --replace "'float_value': float(str(np.float32(sympy.pi)))" "'float_value': pytest.approx(float(str(np.float32(sympy.pi))))"
+      --replace "protobuf~=3.13.0" "protobuf"
   '';
 
   propagatedBuildInputs = [
-    freezegun
     google-api-core
-    numpy
     matplotlib
     networkx
+    numpy
     pandas
     protobuf
     requests
     scipy
     sortedcontainers
     sympy
+    tqdm
     typing-extensions
   ];
 
-  doCheck = true;
   # pythonImportsCheck = [ "cirq" "cirq.Circuit" ];  # cirq's importlib hook doesn't work here
-  dontUseSetuptoolsCheck = true;
   checkInputs = [
     pytestCheckHook
+    freezegun
     pytest-asyncio
     pytest-benchmark
     ply
@@ -84,9 +79,7 @@ buildPythonPackage rec {
     "--ignore=cirq/contrib/"  # requires external (unpackaged) python packages, so untested.
     "--benchmark-disable" # Don't need to run benchmarks when packaging.
   ];
-  disabledTests = [
-    "test_convert_to_ion_gates" # fails on some systems due to rounding error, 0.75 != 0.750...2
-  ] ++ lib.optionals stdenv.isAarch64 [
+  disabledTests = lib.optionals stdenv.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"