From 1b1204bc49114b80d4573c421bc4bfd677275ea4 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Thu, 14 Apr 2022 16:02:00 -0400 Subject: [PATCH 1/6] python3Packages.qiskit-terra: 0.19.2 -> 0.20.0 --- .../python-modules/qiskit-terra/default.nix | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-terra/default.nix b/pkgs/development/python-modules/qiskit-terra/default.nix index 1a5aa516c52d..8289e3e24ec2 100644 --- a/pkgs/development/python-modules/qiskit-terra/default.nix +++ b/pkgs/development/python-modules/qiskit-terra/default.nix @@ -2,8 +2,8 @@ , pythonOlder , buildPythonPackage , fetchFromGitHub +, rustPlatform # Python requirements -, cython , dill , numpy , networkx @@ -14,6 +14,7 @@ , retworkx , scipy , scikit-quant ? null +, setuptools-rust , stevedore , symengine , sympy @@ -54,18 +55,24 @@ in buildPythonPackage rec { pname = "qiskit-terra"; - version = "0.19.2"; + version = "0.20.0"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "qiskit"; repo = pname; rev = version; - sha256 = "sha256-P2QTdt1H9I5T/ONNoo7XEVnoHweOdq3p2NH3l3/yAn4="; + sha256 = "sha256-/t87IgazpJlfd8NT2Pkn5b6/Ut104DcJEFCubQ/bBiw="; }; - nativeBuildInputs = [ cython ]; + nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ rust.rustc rust.cargo cargoSetupHook ]); + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + sha256 = "sha256-tNiBXn32g1PTuTmKNXSac+4PLSc1Ao9n+oAMfvVYR30="; + }; propagatedBuildInputs = [ dill @@ -96,7 +103,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "qiskit" - "qiskit.transpiler.passes.routing.cython.stochastic_swap.swap_trial" + "qiskit.pulse" ]; disabledTestPaths = [ @@ -109,7 +116,10 @@ buildPythonPackage rec { ]; pytestFlagsArray = [ "--durations=10" ]; disabledTests = [ - "TestUnitarySynthesisPlugin" # uses unittest mocks for transpiler.run(), seems incompatible somehow w/ pytest infrastructure + "TestUnitarySynthesisPlugin" # use unittest mocks for transpiler.run(), seems incompatible somehow w/ pytest infrastructure + # matplotlib tests seems to fail non-deterministically + "TestMatplotlibDrawer" + "TestGraphMatplotlibDrawer" "test_copy" # assertNotIn doesn't seem to work as expected w/ pytest vs unittest # Flaky tests @@ -153,18 +163,14 @@ buildPythonPackage rec { "test_two_qubit_weyl_decomposition_ab0" "test_sample_counts_memory_superposition" "test_piecewise_polynomial_function" - "test_vqe_qasm" "test_piecewise_chebyshev_mutability" "test_bit_conditional_no_cregbundle" "test_gradient_wrapper2" "test_two_qubit_weyl_decomposition_abmb" "test_two_qubit_weyl_decomposition_abb" - "test_two_qubit_weyl_decomposition_aac" - "test_aqc" - "test_gradient" - "test_piecewise_polynomial_rotations_mutability" - "test_confidence_intervals_1" - "test_trotter_from_bound" + "test_vqe_qasm" + "test_dag_from_networkx" + "test_defaults_to_dict_46" ]; # Moves tests to $PACKAGEDIR/test. They can't be run from /build because of finding From c519bc33e89fad4b97685725760dfd26f7f8f96b Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Thu, 14 Apr 2022 16:05:31 -0400 Subject: [PATCH 2/6] python3Packages.qiskit-aer: 0.10.3 -> 0.10.4 --- .../python-modules/qiskit-aer/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-aer/default.nix b/pkgs/development/python-modules/qiskit-aer/default.nix index d7b195f1debf..7fb67c5449bd 100644 --- a/pkgs/development/python-modules/qiskit-aer/default.nix +++ b/pkgs/development/python-modules/qiskit-aer/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { pname = "qiskit-aer"; - version = "0.10.3"; + version = "0.10.4"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -39,7 +39,7 @@ buildPythonPackage rec { owner = "Qiskit"; repo = "qiskit-aer"; rev = version; - sha256 = "sha256-COvJCj18qRNQJUXKrtlYJQGLjna44IgtNZeNVJJaIHg="; + sha256 = "sha256-mf+Pgw/daFkt1bvqSeYzlO/Sd2F2MtwZcLr+h1u+eb0="; }; postPatch = '' @@ -55,15 +55,14 @@ buildPythonPackage rec { cmake ninja scikit-build - pybind11 ]; buildInputs = [ blas catch2 + nlohmann_json fmt muparserx - nlohmann_json spdlog ]; @@ -71,6 +70,7 @@ buildPythonPackage rec { cvxpy cython # generates some cython files at runtime that need to be cython-ized numpy + pybind11 ]; preBuild = '' @@ -80,19 +80,18 @@ buildPythonPackage rec { dontUseCmakeConfigure = true; # *** Testing *** - pythonImportsCheck = [ "qiskit.providers.aer" "qiskit.providers.aer.backends.qasm_simulator" "qiskit.providers.aer.backends.controller_wrappers" # Checks C++ files built correctly. Only exists if built & moved to output ]; - # Slow tests disabledTests = [ - "test_snapshot" # TODO: these ~30 tests fail on setup due to pytest fixture issues? - "test_initialize_2" # TODO: simulations appear incorrect, off by >10%. - # These tests fail on cvxpy >= 1.1.15 + # these tests don't work with cvxpy >= 1.1.15 "test_clifford" "test_approx_random" + "test_snapshot" # TODO: these ~30 tests fail on setup due to pytest fixture issues? + "test_initialize_2" # TODO: simulations appear incorrect, off by >10%. + "test_pauli_error_2q_gate_from_string_1qonly" # these fail for some builds. Haven't been able to reproduce error locally. "test_kraus_gate_noise" From e95a63295b2e0eff8eb57fee6ef71d60553f7246 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Thu, 14 Apr 2022 16:03:28 -0400 Subject: [PATCH 3/6] python3Packages.qiskit-ibmq-provider: 0.18.3 -> 0.19.0 --- .../python-modules/qiskit-ibmq-provider/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-ibmq-provider/default.nix b/pkgs/development/python-modules/qiskit-ibmq-provider/default.nix index 0c8f74cf66dd..8f8d510712c9 100644 --- a/pkgs/development/python-modules/qiskit-ibmq-provider/default.nix +++ b/pkgs/development/python-modules/qiskit-ibmq-provider/default.nix @@ -40,7 +40,7 @@ let in buildPythonPackage rec { pname = "qiskit-ibmq-provider"; - version = "0.18.3"; + version = "0.19.0"; disabled = pythonOlder "3.6"; @@ -48,7 +48,7 @@ buildPythonPackage rec { owner = "Qiskit"; repo = pname; rev = version; - sha256 = "1n1w1lnq2xw94hhhn6kdvw8dqlxk5fxwpm8ng31gxbp1s3qgni17"; + sha256 = "sha256-ODu8OgGpzlMjRX7ebMu4DXKj6jUyohCq4Hb8aV5eWIU="; }; propagatedBuildInputs = [ @@ -58,6 +58,7 @@ buildPythonPackage rec { requests requests_ntlm websocket-client + websockets ] ++ lib.optionals withVisualization visualizationPackages; postPatch = '' @@ -72,12 +73,12 @@ buildPythonPackage rec { pproxy qiskit-aer vcrpy - websockets ] ++ lib.optionals (!withVisualization) visualizationPackages; pythonImportsCheck = [ "qiskit.providers.ibmq" ]; - # These disabled tests require internet connection, aren't skipped elsewhere disabledTests = [ + "test_coder_operators" # fails for some reason on nixos-21.05+ + # These disabled tests require internet connection, aren't skipped elsewhere "test_old_api_url" "test_non_auth_url" "test_non_auth_url_with_hub" From 42a14c6b27cbe25fcfa423d11ce23f68a8496b99 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Thu, 14 Apr 2022 18:39:53 -0400 Subject: [PATCH 4/6] python3Packages.qiskit-nature: 0.3.1 -> 0.3.2 --- pkgs/development/python-modules/qiskit-nature/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-nature/default.nix b/pkgs/development/python-modules/qiskit-nature/default.nix index 2693daa6ead0..7b652c507223 100644 --- a/pkgs/development/python-modules/qiskit-nature/default.nix +++ b/pkgs/development/python-modules/qiskit-nature/default.nix @@ -21,15 +21,15 @@ buildPythonPackage rec { pname = "qiskit-nature"; - version = "0.3.1"; + version = "0.3.2"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { - owner = "qiskit"; + owner = "Qiskit"; repo = pname; rev = version; - sha256 = "sha256-EkYppEOQGmRIxKC4ArXZb0b+p1gPGnP6AU8LbEbOpPo="; + sha256 = "sha256-BXUVRZ8X3OJiRexNXZsnvp+Yh8ARNYohYH49/IYFYM0="; }; propagatedBuildInputs = [ @@ -56,7 +56,7 @@ buildPythonPackage rec { ]; disabledTests = [ - "test_two_qubit_reduction" # unsure of failure reason. Might be related to recent cvxpy update? + "test_two_qubit_reduction" # failure cause unclear ]; meta = with lib; { From 85b365078ae553ccc8ef9dbd36de85445d74e29e Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Thu, 14 Apr 2022 16:06:03 -0400 Subject: [PATCH 5/6] python3Packages.qiskit: 0.34.2 -> 0.36.0 --- pkgs/development/python-modules/qiskit/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/qiskit/default.nix b/pkgs/development/python-modules/qiskit/default.nix index aa81ba00a8ca..74d227e22e90 100644 --- a/pkgs/development/python-modules/qiskit/default.nix +++ b/pkgs/development/python-modules/qiskit/default.nix @@ -28,15 +28,15 @@ in buildPythonPackage rec { pname = "qiskit"; # NOTE: This version denotes a specific set of subpackages. See https://qiskit.org/documentation/release_notes.html#version-history - version = "0.34.2"; + version = "0.36.0"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { - owner = "qiskit"; + owner = "Qiskit"; repo = "qiskit"; rev = version; - sha256 = "sha256-weL65IQs6vbjJiPJdaizU0ST6u9qDYb0LhTwC6yAdhY="; + sha256 = "sha256-zTdvROru56/HNpoHKSVe3pQZeDSMFmaTCUAr1FOaE5A="; }; propagatedBuildInputs = [ From d2b696f5d47cbc80bb043ab877505c27ef2dfe97 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Thu, 14 Apr 2022 18:52:28 -0400 Subject: [PATCH 6/6] python3Packages.qiskit-finance: fix build --- pkgs/development/python-modules/qiskit-finance/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/qiskit-finance/default.nix b/pkgs/development/python-modules/qiskit-finance/default.nix index 1fc98361ad09..2c544d5a92ed 100644 --- a/pkgs/development/python-modules/qiskit-finance/default.nix +++ b/pkgs/development/python-modules/qiskit-finance/default.nix @@ -33,6 +33,10 @@ buildPythonPackage rec { sha256 = "sha256-wnto3IqrJFAqIv6QAXe3BB9fvXQXe2fw/iUZe3+198M="; }; + postPatch = '' + substituteInPlace requirements.txt --replace "pandas<1.4.0" "pandas" + ''; + propagatedBuildInputs = [ fastdtw numpy