From 18da1d207b3df98433743abcb2be818942ecdf8f Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Wed, 22 Nov 2023 14:45:24 +0100 Subject: [PATCH 1/5] python310Packages.qiskit-terra: fix cargo deps hash Was not properly updated by c265663f819c1736ff9e7169c72192a7a7d66e61 which last bumped the version of this package. Probably not noticed since the package is marked as broken anyway. --- pkgs/development/python-modules/qiskit-terra/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/qiskit-terra/default.nix b/pkgs/development/python-modules/qiskit-terra/default.nix index 2c290493b063..c4e4223277ba 100644 --- a/pkgs/development/python-modules/qiskit-terra/default.nix +++ b/pkgs/development/python-modules/qiskit-terra/default.nix @@ -74,7 +74,7 @@ buildPythonPackage rec { cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-SXC0UqWjWqLlZvKCRBylSX73r4Vale130KzS0zM8gjQ="; + hash = "sha256-f5VLNxv9DKwfRy5zacydfz4Zrkbiee7JecOAbVelSto="; }; propagatedBuildInputs = [ From ad2a9ebbbef2b35b71d3ab9eeafce69f2a42d587 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Wed, 22 Nov 2023 15:02:39 +0100 Subject: [PATCH 2/5] python310Packages.qiskit-terra: re-enable on Python <= 3.10 --- pkgs/development/python-modules/qiskit-terra/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-terra/default.nix b/pkgs/development/python-modules/qiskit-terra/default.nix index c4e4223277ba..13ff3594b79d 100644 --- a/pkgs/development/python-modules/qiskit-terra/default.nix +++ b/pkgs/development/python-modules/qiskit-terra/default.nix @@ -1,5 +1,6 @@ { stdenv , lib +, pythonAtLeast , pythonOlder , buildPythonPackage , fetchFromGitHub @@ -60,7 +61,7 @@ buildPythonPackage rec { pname = "qiskit-terra"; version = "0.25.1"; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.7" || pythonAtLeast "3.11"; src = fetchFromGitHub { owner = "qiskit"; @@ -195,7 +196,6 @@ buildPythonPackage rec { meta = with lib; { - broken = true; # tests segfault python description = "Provides the foundations for Qiskit."; longDescription = '' Allows the user to write quantum circuits easily, and takes care of the constraints of real hardware. From 5d0d872de162c381b121ba80dbc4486757904baa Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:31:03 +0100 Subject: [PATCH 3/5] python310Packages.qiskit-terra: disable more tests --- pkgs/development/python-modules/qiskit-terra/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/qiskit-terra/default.nix b/pkgs/development/python-modules/qiskit-terra/default.nix index 13ff3594b79d..a41d043e0efa 100644 --- a/pkgs/development/python-modules/qiskit-terra/default.nix +++ b/pkgs/development/python-modules/qiskit-terra/default.nix @@ -117,6 +117,8 @@ buildPythonPackage rec { "test/randomized/" # These tests consistently fail on GitHub Actions build "test/python/quantum_info/operators/test_random.py" + # Too many floating point arithmetic errors + "test/visual/mpl/circuit/test_circuit_matplotlib_drawer.py" ]; pytestFlagsArray = [ "--durations=10" ]; disabledTests = [ @@ -126,6 +128,11 @@ buildPythonPackage rec { "TestGraphMatplotlibDrawer" "test_copy" # assertNotIn doesn't seem to work as expected w/ pytest vs unittest + "test_bound_pass_manager" # AssertionError: 0 != 2 + "test_complex_parameter_bound_to_real" # qiskit.circuit.exceptions.CircuitError: "Invalid param type for gate rx." + "test_expressions_of_parameter_with_constant" # Floating point arithmetic error + "test_handle_measurement" # AssertionError: The two circuits are not equal + # Flaky tests "test_pulse_limits" # Fails on GitHub Actions, probably due to minor floating point arithmetic error. "test_cx_equivalence" # Fails due to flaky test From 8689be5c57962747d8456b59a239dfd7c53f4fbe Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 8 Dec 2023 01:44:48 +0100 Subject: [PATCH 4/5] python310Packages.qiskit-terra: fix build on aarch64-darwin --- pkgs/development/python-modules/qiskit-terra/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/qiskit-terra/default.nix b/pkgs/development/python-modules/qiskit-terra/default.nix index a41d043e0efa..fb114d351ac8 100644 --- a/pkgs/development/python-modules/qiskit-terra/default.nix +++ b/pkgs/development/python-modules/qiskit-terra/default.nix @@ -7,6 +7,7 @@ , cargo , rustPlatform , rustc +, libiconv # Python requirements , dill , numpy @@ -72,6 +73,8 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools-rust rustc cargo rustPlatform.cargoSetupHook ]; + buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; From 58db7e56d78f1edec162652bf35053083927d974 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 8 Dec 2023 04:19:32 +0100 Subject: [PATCH 5/5] python310Packages.qiskit-aer: mark as broken --- pkgs/development/python-modules/qiskit-aer/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/qiskit-aer/default.nix b/pkgs/development/python-modules/qiskit-aer/default.nix index e774990fb999..ecd8905583e2 100644 --- a/pkgs/development/python-modules/qiskit-aer/default.nix +++ b/pkgs/development/python-modules/qiskit-aer/default.nix @@ -147,7 +147,7 @@ buildPythonPackage rec { postCheck = "popd"; meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); + broken = true; description = "High performance simulators for Qiskit"; homepage = "https://qiskit.org/aer"; downloadPage = "https://github.com/QISKit/qiskit-aer/releases";