Merge pull request #121606 from drewrisinger/dr-pr-qiskit-bump
This commit is contained in:
commit
5bba6dba6d
8 changed files with 70 additions and 45 deletions
|
@ -2,6 +2,7 @@
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
# C Inputs
|
# C Inputs
|
||||||
, blas
|
, blas
|
||||||
, catch2
|
, catch2
|
||||||
|
@ -27,7 +28,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "qiskit-aer";
|
pname = "qiskit-aer";
|
||||||
version = "0.8.0";
|
version = "0.8.2";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
@ -36,13 +37,30 @@ buildPythonPackage rec {
|
||||||
owner = "Qiskit";
|
owner = "Qiskit";
|
||||||
repo = "qiskit-aer";
|
repo = "qiskit-aer";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-CWF3ehLs0HBXnYH11r+2CQwIcxddAfQm3ulAf1agl/o=";
|
hash = "sha256-7NWM7qpMQ3vA6p0dhEPnkBjsPMdhceYTYcAD4tsClf0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
# https://github.com/Qiskit/qiskit-aer/pull/1250
|
||||||
|
name = "qiskit-aer-pr-1250-native-cmake_dl_libs.patch";
|
||||||
|
url = "https://github.com/Qiskit/qiskit-aer/commit/2bf04ade3e5411776817706cf82cc67a3b3866f6.patch";
|
||||||
|
sha256 = "0ldwzxxfgaad7ifpci03zfdaj0kqj0p3h94qgshrd2953mf27p6z";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
# Remove need for cmake python package
|
||||||
|
# pybind11 shouldn't be an install requirement, just build requirement.
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace "'cmake!=3.17,!=3.17.0'," "" \
|
||||||
|
--replace "'pybind11>=2.6'" ""
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
ninja
|
ninja
|
||||||
scikit-build
|
scikit-build
|
||||||
|
pybind11
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -58,14 +76,8 @@ buildPythonPackage rec {
|
||||||
cvxpy
|
cvxpy
|
||||||
cython # generates some cython files at runtime that need to be cython-ized
|
cython # generates some cython files at runtime that need to be cython-ized
|
||||||
numpy
|
numpy
|
||||||
pybind11
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# tries to install pypi cmake package, not needed
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace setup.py --replace "'cmake!=3.17,!=3.17.0'," ""
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Disable using conan for build
|
# Disable using conan for build
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
export DISABLE_CONAN=1
|
export DISABLE_CONAN=1
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
, networkx
|
, networkx
|
||||||
, numpy
|
, numpy
|
||||||
, psutil
|
, psutil
|
||||||
, python
|
|
||||||
, qiskit-ignis
|
, qiskit-ignis
|
||||||
, qiskit-terra
|
, qiskit-terra
|
||||||
, quandl
|
, quandl
|
||||||
|
@ -34,7 +33,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "qiskit-aqua";
|
pname = "qiskit-aqua";
|
||||||
version = "0.9.0";
|
version = "0.9.1";
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
@ -43,7 +42,7 @@ buildPythonPackage rec {
|
||||||
owner = "Qiskit";
|
owner = "Qiskit";
|
||||||
repo = "qiskit-aqua";
|
repo = "qiskit-aqua";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-knue9uJih72UQHsvfXZ9AA94mol4ERa9Lo/GMcp+2hA=";
|
hash = "sha256-fptyqPrkUgl3UjtlEmDYORdX/SsONxWozQGEs/EahmU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Optional packages: pyscf (see below NOTE) & pytorch. Can install via pip/nix if needed.
|
# Optional packages: pyscf (see below NOTE) & pytorch. Can install via pip/nix if needed.
|
||||||
|
@ -97,8 +96,6 @@ buildPythonPackage rec {
|
||||||
>> qiskit/optimization/__init__.py
|
>> qiskit/optimization/__init__.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = "rm -rf $out/${python.sitePackages}/docs"; # Remove docs dir b/c it can cause conflicts.
|
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
ddt
|
ddt
|
||||||
|
@ -123,9 +120,6 @@ buildPythonPackage rec {
|
||||||
"--ignore=test/chemistry/test_bopes_sampler.py"
|
"--ignore=test/chemistry/test_bopes_sampler.py"
|
||||||
];
|
];
|
||||||
disabledTests = [
|
disabledTests = [
|
||||||
# Disabled due to missing pyscf
|
|
||||||
"test_validate" # test/chemistry/test_inputparser.py
|
|
||||||
|
|
||||||
# Online tests
|
# Online tests
|
||||||
"test_exchangedata"
|
"test_exchangedata"
|
||||||
"test_yahoo"
|
"test_yahoo"
|
||||||
|
@ -163,6 +157,8 @@ buildPythonPackage rec {
|
||||||
"test_eoh"
|
"test_eoh"
|
||||||
"test_qasm_5"
|
"test_qasm_5"
|
||||||
"test_uccsd_hf"
|
"test_uccsd_hf"
|
||||||
|
] ++ lib.optionals (!withPyscf) [
|
||||||
|
"test_validate" # test/chemistry/test_inputparser.py
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -39,7 +39,7 @@ let
|
||||||
in
|
in
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "qiskit-ibmq-provider";
|
pname = "qiskit-ibmq-provider";
|
||||||
version = "0.12.2";
|
version = "0.13.1";
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ buildPythonPackage rec {
|
||||||
owner = "Qiskit";
|
owner = "Qiskit";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0yil363mqssq0453nrwxgkjivzk3a4jgbnaf21bp7lwfcl2jdhqm";
|
hash = "sha256-DlHlXncttzGo4uVoh2aQ7urW6krN3ej2sJ/EwuxeF2I=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -83,7 +83,9 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
# Skip tests that rely on internet access (mostly to IBM Quantum Experience cloud).
|
# Skip tests that rely on internet access (mostly to IBM Quantum Experience cloud).
|
||||||
# Options defined in qiskit.terra.test.testing_options.py::get_test_options
|
# Options defined in qiskit.terra.test.testing_options.py::get_test_options
|
||||||
QISKIT_TESTS = "skip_online";
|
preCheck = ''
|
||||||
|
export QISKIT_TESTS=skip_online
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Qiskit provider for accessing the quantum devices and simulators at IBMQ";
|
description = "Qiskit provider for accessing the quantum devices and simulators at IBMQ";
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ lib
|
{ lib
|
||||||
|
, stdenv
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, python
|
|
||||||
, numpy
|
, numpy
|
||||||
, qiskit-terra
|
, qiskit-terra
|
||||||
, scikit-learn
|
, scikit-learn
|
||||||
|
@ -35,12 +35,6 @@ buildPythonPackage rec {
|
||||||
hash = "sha256-L5fwCMsN03ojiDvKIyqsGfUnwej1P7bpyHlL6mu7nh0=";
|
hash = "sha256-L5fwCMsN03ojiDvKIyqsGfUnwej1P7bpyHlL6mu7nh0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# hacky, fix https://github.com/Qiskit/qiskit-ignis/issues/532.
|
|
||||||
# TODO: remove on qiskit-ignis v0.5.2
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace qiskit/ignis/mitigation/expval/base_meas_mitigator.py --replace "plt.axes" "'plt.axes'"
|
|
||||||
'';
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
numpy
|
numpy
|
||||||
qiskit-terra
|
qiskit-terra
|
||||||
|
@ -49,12 +43,13 @@ buildPythonPackage rec {
|
||||||
] ++ lib.optionals (withCvx) [ cvxpy ]
|
] ++ lib.optionals (withCvx) [ cvxpy ]
|
||||||
++ lib.optionals (withVisualization) [ matplotlib ]
|
++ lib.optionals (withVisualization) [ matplotlib ]
|
||||||
++ lib.optionals (withJit) [ numba ];
|
++ lib.optionals (withJit) [ numba ];
|
||||||
postInstall = "rm -rf $out/${python.sitePackages}/docs"; # this dir can create conflicts
|
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
pythonImportsCheck = [ "qiskit.ignis" ];
|
pythonImportsCheck = [ "qiskit.ignis" ];
|
||||||
dontUseSetuptoolsCheck = true;
|
dontUseSetuptoolsCheck = true;
|
||||||
preCheck = "export HOME=$TMPDIR";
|
preCheck = ''
|
||||||
|
export HOME=$TMPDIR
|
||||||
|
'';
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
ddt
|
ddt
|
||||||
|
@ -63,7 +58,8 @@ buildPythonPackage rec {
|
||||||
];
|
];
|
||||||
disabledTests = [
|
disabledTests = [
|
||||||
"test_tensored_meas_cal_on_circuit" # Flaky test, occasionally returns result outside bounds
|
"test_tensored_meas_cal_on_circuit" # Flaky test, occasionally returns result outside bounds
|
||||||
"test_qv_fitter" # execution hangs, ran for several minutes
|
] ++ lib.optionals stdenv.isAarch64 [
|
||||||
|
"test_fitters" # Fails check that arrays are close. Might be due to aarch64 math issues.
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ lib
|
{ lib
|
||||||
|
, stdenv
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
@ -56,7 +57,7 @@ in
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "qiskit-terra";
|
pname = "qiskit-terra";
|
||||||
version = "0.17.0";
|
version = "0.17.4";
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
@ -64,7 +65,7 @@ buildPythonPackage rec {
|
||||||
owner = "Qiskit";
|
owner = "Qiskit";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-LbNbaHAWAVG5YLc9juuwcOlrREBW6OjEl7VPtACfl3I=";
|
hash = "sha256-JyNuke+XPqjLVZbvPud9Y7k0+EmvETVKcOYcDldBiVo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cython ];
|
nativeBuildInputs = [ cython ];
|
||||||
|
@ -106,11 +107,17 @@ buildPythonPackage rec {
|
||||||
"test/python/classical_function_compiler/"
|
"test/python/classical_function_compiler/"
|
||||||
];
|
];
|
||||||
disabledTests = [
|
disabledTests = [
|
||||||
|
# Not working on matplotlib >= 3.4.0, checks images match.
|
||||||
|
"test_plot_circuit_layout"
|
||||||
|
|
||||||
# Flaky tests
|
# Flaky tests
|
||||||
"test_cx_equivalence"
|
"test_cx_equivalence"
|
||||||
"test_pulse_limits"
|
"test_pulse_limits"
|
||||||
|
"test_1q_random"
|
||||||
] ++ lib.optionals (!withClassicalFunctionCompiler) [
|
] ++ lib.optionals (!withClassicalFunctionCompiler) [
|
||||||
"TestPhaseOracle"
|
"TestPhaseOracle"
|
||||||
|
] ++ lib.optionals stdenv.isAarch64 [
|
||||||
|
"test_circuit_init" # failed on aarch64, https://gist.github.com/r-rmcgibbo/c2e173d43ced4f6954811004f6b5b842
|
||||||
]
|
]
|
||||||
# Disabling slow tests for build constraints
|
# Disabling slow tests for build constraints
|
||||||
++ [
|
++ [
|
||||||
|
@ -155,8 +162,8 @@ buildPythonPackage rec {
|
||||||
pushd $PACKAGEDIR
|
pushd $PACKAGEDIR
|
||||||
'';
|
'';
|
||||||
postCheck = ''
|
postCheck = ''
|
||||||
rm -rf test
|
rm -r test
|
||||||
rm -rf examples
|
rm -r examples
|
||||||
popd
|
popd
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "qiskit";
|
pname = "qiskit";
|
||||||
# NOTE: This version denotes a specific set of subpackages. See https://qiskit.org/documentation/release_notes.html#version-history
|
# NOTE: This version denotes a specific set of subpackages. See https://qiskit.org/documentation/release_notes.html#version-history
|
||||||
version = "0.25.0";
|
version = "0.26.2";
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ buildPythonPackage rec {
|
||||||
owner = "qiskit";
|
owner = "qiskit";
|
||||||
repo = "qiskit";
|
repo = "qiskit";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-pJM6d3AyFs9AexvQXG+8QQ4zwpFisJC16iBFR9gNSk0=";
|
hash = "sha256-QYWKKS7e/uCt5puWV4jA9Emp7M4Cyv2RUCxilbChWhw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
|
|
@ -1,18 +1,23 @@
|
||||||
{ lib
|
{ lib
|
||||||
|
, stdenv
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, libiconv
|
||||||
# Check inputs
|
# Check inputs
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
|
, fixtures
|
||||||
|
, graphviz
|
||||||
|
, matplotlib
|
||||||
, networkx
|
, networkx
|
||||||
, numpy
|
, numpy
|
||||||
|
, pydot
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "retworkx";
|
pname = "retworkx";
|
||||||
version = "0.8.0";
|
version = "0.9.0";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
@ -20,22 +25,29 @@ buildPythonPackage rec {
|
||||||
owner = "Qiskit";
|
owner = "Qiskit";
|
||||||
repo = "retworkx";
|
repo = "retworkx";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0plpri6a3d6f1000kmcah9066vq2i37d14bdf8sm96493fhpqhrd";
|
hash = "sha256-1W7DexS+ECAPsxyZAF36xcEguFkjUMX9lDBylNVPqyk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||||
inherit src;
|
inherit src;
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
hash = "sha256-+k779gmge8wDdoZrWn9ND47kUqt7pqe75Zuj2Byfefo=";
|
hash = "sha256-y5l7jqrlk3ONHefZPS31IvcaO9ttXWLM7fIUmNVwbco=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ];
|
nativeBuildInputs = with rustPlatform; [ cargoSetupHook maturinBuildHook ];
|
||||||
|
|
||||||
# Needed b/c need to check AFTER python wheel is installed (using Rust Build, not buildPythonPackage)
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||||
doCheck = false;
|
|
||||||
doInstallCheck = true;
|
|
||||||
|
|
||||||
installCheckInputs = [ pytestCheckHook networkx numpy ];
|
pythonImportsCheck = [ "retworkx" ];
|
||||||
|
checkInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
fixtures
|
||||||
|
graphviz
|
||||||
|
matplotlib
|
||||||
|
networkx
|
||||||
|
numpy
|
||||||
|
pydot
|
||||||
|
];
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
export TESTDIR=$(mktemp -d)
|
export TESTDIR=$(mktemp -d)
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "yfinance";
|
pname = "yfinance";
|
||||||
version = "0.1.56";
|
version = "0.1.59";
|
||||||
|
|
||||||
# GitHub source releases aren't tagged
|
# GitHub source releases aren't tagged
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "a6d4c7b939fdd48d983556501f5b387e20aaef86afc8e6ba6f91a49a7e22d2dd";
|
sha256 = "fe4dc46807eceadc6604bf51ece7297b752dc5402a38a87385094fbfc7565fa0";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
|
Loading…
Reference in a new issue