aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/cirq/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/cirq/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/cirq/default.nix30
1 files changed, 13 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/cirq/default.nix b/nixpkgs/pkgs/development/python-modules/cirq/default.nix
index 98fc3b9ff05..21f9c5446c3 100644
--- a/nixpkgs/pkgs/development/python-modules/cirq/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/cirq/default.nix
@@ -10,7 +10,7 @@
, networkx
, numpy
, pandas
-, pythonProtobuf # pythonPackages.protobuf
+, protobuf
, requests
, scipy
, sortedcontainers
@@ -28,15 +28,15 @@
buildPythonPackage rec {
pname = "cirq";
- version = "0.8.0";
+ version = "0.8.2";
- disabled = pythonOlder "3.5";
+ disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "quantumlib";
repo = "cirq";
rev = "v${version}";
- sha256 = "01nnv7r595sp60wvp7750lfdjwdsi4q0r4lmaj6li09zsdw0r4b3";
+ sha256 = "0xs46s19idh8smf80zhgraxwh3lphcdbljdrhxwhi5xcc41dfsmf";
};
patches = [
@@ -48,12 +48,13 @@ buildPythonPackage rec {
})
];
- # Cirq locks protobuf==3.8.0, but tested working with default pythonPackages.protobuf (3.7). This avoids overrides/pythonPackages.protobuf conflicts
postPatch = ''
substituteInPlace requirements.txt \
+ --replace "freezegun~=0.3.15" "freezegun" \
+ --replace "matplotlib~=3.0" "matplotlib" \
--replace "networkx~=2.4" "networkx" \
- --replace "protobuf==3.8.0" "protobuf" \
- --replace "freezegun~=0.3.15" "freezegun"
+ --replace "numpy~=1.16, < 1.19" "numpy" \
+ --replace "protobuf~=3.12.0" "protobuf"
'';
propagatedBuildInputs = [
@@ -63,7 +64,7 @@ buildPythonPackage rec {
matplotlib
networkx
pandas
- pythonProtobuf
+ protobuf
requests
scipy
sortedcontainers
@@ -72,7 +73,7 @@ buildPythonPackage rec {
];
doCheck = true;
- # pythonImportsCheck = [ "cirq" "cirq.Ciruit" ]; # cirq's importlib hook doesn't work here
+ # pythonImportsCheck = [ "cirq" "cirq.Circuit" ]; # cirq's importlib hook doesn't work here
dontUseSetuptoolsCheck = true;
checkInputs = [
pytestCheckHook
@@ -86,16 +87,10 @@ buildPythonPackage rec {
pytestFlagsArray = [
"--ignore=dev_tools" # Only needed when developing new code, which is out-of-scope
+ "--benchmark-disable" # Don't need to run benchmarks when packaging.
];
disabledTests = [
- "test_serialize_sympy_constants" # fails due to small error in pi (~10e-7)
- "test_convert_to_ion_gates" # fails due to rounding error, 0.75 != 0.750...2
-
- # Newly disabled tests on cirq 0.8
- # TODO: test & figure out why failing
- "engine_job_test"
- "test_health"
- "test_run_delegation"
+ "test_convert_to_ion_gates" # fails on some systems due to rounding error, 0.75 != 0.750...2
] ++ lib.optionals stdenv.isAarch64 [
# Seem to fail due to math issues on aarch64?
"expectation_from_wavefunction"
@@ -105,6 +100,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.";
homepage = "https://github.com/quantumlib/cirq";
+ changelog = "https://github.com/quantumlib/Cirq/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ drewrisinger ];
};