From 14e649ed6f9b53d83e6f8970859fea98d0455c00 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 28 Apr 2023 00:49:38 +0300 Subject: [PATCH 1/4] python310Packages.cirq-core: fix build --- .../python-modules/cirq-core/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/cirq-core/default.nix b/pkgs/development/python-modules/cirq-core/default.nix index c37e60c9ac86..9bc81a09960c 100644 --- a/pkgs/development/python-modules/cirq-core/default.nix +++ b/pkgs/development/python-modules/cirq-core/default.nix @@ -45,11 +45,20 @@ buildPythonPackage rec { sourceRoot = "source/${pname}"; + patches = [ + # https://github.com/quantumlib/Cirq/pull/5991 + (fetchpatch { + url = "https://build.opensuse.org/public/source/openSUSE:Factory/python-cirq/cirq-pr5991-np1.24.patch?rev=8"; + stripLen = 1; + hash = "sha256-d2FpaxM1PsPWT9ZM9v2gVrnLCy9zmvkkyAVgo85eL3U="; + }) + ]; + postPatch = '' substituteInPlace requirements.txt \ --replace "matplotlib~=3.0" "matplotlib" \ --replace "networkx~=2.4" "networkx" \ - --replace "numpy~=1.16" "numpy" + --replace "numpy>=1.16,<1.24" "numpy" ''; propagatedBuildInputs = [ @@ -91,6 +100,8 @@ buildPythonPackage rec { "test_metadata_search_path" # Fails due pandas MultiIndex. Maybe issue with pandas version in nix? "test_benchmark_2q_xeb_fidelities" + # https://github.com/quantumlib/Cirq/pull/5991 + "test_json_and_repr_data" ]; meta = with lib; { From 24978ed771787bba7ec4356d4b661ae051dcb336 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 28 Apr 2023 00:50:04 +0300 Subject: [PATCH 2/4] python310Packages.pyquil: relax deps --- pkgs/development/python-modules/pyquil/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/pyquil/default.nix b/pkgs/development/python-modules/pyquil/default.nix index 02a659e88c19..822d5da24535 100644 --- a/pkgs/development/python-modules/pyquil/default.nix +++ b/pkgs/development/python-modules/pyquil/default.nix @@ -40,6 +40,7 @@ buildPythonPackage rec { pythonRelaxDeps = [ "lark" + "networkx" ]; nativeBuildInputs = [ From cf6fb1bbccbe74f4fc76e446d75ffa8f02d0e32d Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 28 Apr 2023 00:50:29 +0300 Subject: [PATCH 3/4] python310Packages.cirq-ionq: disable deprecated tests --- pkgs/development/python-modules/cirq-ionq/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/cirq-ionq/default.nix b/pkgs/development/python-modules/cirq-ionq/default.nix index 080497441898..bf96d35b5318 100644 --- a/pkgs/development/python-modules/cirq-ionq/default.nix +++ b/pkgs/development/python-modules/cirq-ionq/default.nix @@ -31,4 +31,9 @@ buildPythonPackage rec { # No need to test the version number "cirq_ionq/_version_test.py" ]; + + disabledTests = [ + # DeprecationWarning: decompose_to_device was used but is deprecated. + "test_decompose_operation_deprecated" + ]; } From 8f218d6d789c5283eb63d63c8889c5e216b11531 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 28 Apr 2023 00:50:45 +0300 Subject: [PATCH 4/4] python310Packages.cirq-google: disable problematic tests --- pkgs/development/python-modules/cirq-google/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/cirq-google/default.nix b/pkgs/development/python-modules/cirq-google/default.nix index 4eb47507001c..c636897fc6a2 100644 --- a/pkgs/development/python-modules/cirq-google/default.nix +++ b/pkgs/development/python-modules/cirq-google/default.nix @@ -32,6 +32,8 @@ buildPythonPackage rec { disabledTestPaths = [ # No need to test the version number "cirq_google/_version_test.py" + # Trace/BPT trap: 5 + "cirq_google/engine/calibration_test.py" ]; disabledTests = [