Merge pull request #145580 from drewrisinger/dr-pr-qiskit-bump
python3Packages.qiskit: 0.26.2 -> 0.32.0
This commit is contained in:
commit
2aeb84a3aa
11 changed files with 422 additions and 57 deletions
|
@ -8,6 +8,7 @@
|
|||
, catch2
|
||||
, cmake
|
||||
, cython
|
||||
, fmt
|
||||
, muparserx
|
||||
, ninja
|
||||
, nlohmann_json
|
||||
|
@ -23,11 +24,13 @@
|
|||
, fixtures
|
||||
, pytest-timeout
|
||||
, qiskit-terra
|
||||
, setuptools
|
||||
, testtools
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "qiskit-aer";
|
||||
version = "0.8.2";
|
||||
version = "0.9.1";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
@ -36,23 +39,16 @@ buildPythonPackage rec {
|
|||
owner = "Qiskit";
|
||||
repo = "qiskit-aer";
|
||||
rev = version;
|
||||
hash = "sha256-7NWM7qpMQ3vA6p0dhEPnkBjsPMdhceYTYcAD4tsClf0=";
|
||||
sha256 = "sha256-SAJjU2zYz6UabOPV1KI2JB7CbJfUJcjbPKbo6iiCk/g=";
|
||||
};
|
||||
|
||||
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'" ""
|
||||
--replace "'pybind11', min_version='2.6'" "'pybind11'" \
|
||||
--replace "pybind11>=2.6" "pybind11" \
|
||||
--replace "scikit-build>=0.11.0" "scikit-build" \
|
||||
--replace "min_version='0.11.0'" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -65,6 +61,7 @@ buildPythonPackage rec {
|
|||
buildInputs = [
|
||||
blas
|
||||
catch2
|
||||
fmt
|
||||
muparserx
|
||||
nlohmann_json
|
||||
spdlog
|
||||
|
@ -76,7 +73,6 @@ buildPythonPackage rec {
|
|||
numpy
|
||||
];
|
||||
|
||||
# Disable using conan for build
|
||||
preBuild = ''
|
||||
export DISABLE_CONAN=1
|
||||
'';
|
||||
|
@ -92,6 +88,16 @@ buildPythonPackage rec {
|
|||
];
|
||||
# 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 fail for some builds. Haven't been able to reproduce error locally.
|
||||
"test_kraus_gate_noise"
|
||||
"test_backend_method_clifford_circuits_and_kraus_noise"
|
||||
"test_backend_method_nonclifford_circuit_and_kraus_noise"
|
||||
"test_kraus_noise_fusion"
|
||||
|
||||
# Slow tests
|
||||
"test_paulis_1_and_2_qubits"
|
||||
"test_3d_oscillator"
|
||||
"_057"
|
||||
|
@ -105,6 +111,7 @@ buildPythonPackage rec {
|
|||
"_144"
|
||||
"test_sparse_output_probabilities"
|
||||
"test_reset_2_qubit"
|
||||
# "test_clifford"
|
||||
];
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
|
@ -112,6 +119,8 @@ buildPythonPackage rec {
|
|||
fixtures
|
||||
pytest-timeout
|
||||
qiskit-terra
|
||||
setuptools # temporary workaround for pbr missing setuptools, see https://github.com/NixOS/nixpkgs/pull/132614
|
||||
testtools
|
||||
];
|
||||
pytestFlagsArray = [
|
||||
"--timeout=30"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
, withTorch ? false
|
||||
, pytorch
|
||||
, withPyscf ? false
|
||||
, pyscf ? null
|
||||
, pyscf
|
||||
, withScikitQuant ? false
|
||||
, scikit-quant ? null
|
||||
, withCplex ? false
|
||||
|
@ -33,7 +33,7 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "qiskit-aqua";
|
||||
version = "0.9.1";
|
||||
version = "0.9.5";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
|
@ -42,7 +42,7 @@ buildPythonPackage rec {
|
|||
owner = "Qiskit";
|
||||
repo = "qiskit-aqua";
|
||||
rev = version;
|
||||
hash = "sha256-fptyqPrkUgl3UjtlEmDYORdX/SsONxWozQGEs/EahmU=";
|
||||
sha256 = "sha256-7QmRwlbAVAR5KfM7tuObkb6+UgiuIm82iGWBuqfve08=";
|
||||
};
|
||||
|
||||
# Optional packages: pyscf (see below NOTE) & pytorch. Can install via pip/nix if needed.
|
||||
|
@ -113,13 +113,25 @@ buildPythonPackage rec {
|
|||
pytestFlagsArray = [
|
||||
"--timeout=30"
|
||||
"--durations=10"
|
||||
] ++ lib.optionals (!withPyscf) [
|
||||
"--ignore=test/chemistry/test_qeom_ee.py"
|
||||
"--ignore=test/chemistry/test_qeom_vqe.py"
|
||||
"--ignore=test/chemistry/test_vqe_uccsd_adapt.py"
|
||||
"--ignore=test/chemistry/test_bopes_sampler.py"
|
||||
];
|
||||
disabledTestPaths = lib.optionals (!withPyscf) [
|
||||
"test/chemistry/test_qeom_ee.py"
|
||||
"test/chemistry/test_qeom_vqe.py"
|
||||
"test/chemistry/test_vqe_uccsd_adapt.py"
|
||||
"test/chemistry/test_bopes_sampler.py"
|
||||
];
|
||||
disabledTests = [
|
||||
# TODO: figure out why failing, only fail with upgrade to qiskit-terra > 0.16.1 & qiskit-aer > 0.7.2
|
||||
# In test.aqua.test_amplitude_estimation.TestSineIntegral
|
||||
"test_confidence_intervals_1"
|
||||
"test_statevector_1"
|
||||
|
||||
# fails due to approximation error with latest qiskit-aer?
|
||||
"test_application"
|
||||
|
||||
# Fail on CI for some reason, not locally
|
||||
"test_binary"
|
||||
|
||||
# Online tests
|
||||
"test_exchangedata"
|
||||
"test_yahoo"
|
||||
|
|
78
pkgs/development/python-modules/qiskit-finance/default.nix
Normal file
78
pkgs/development/python-modules/qiskit-finance/default.nix
Normal file
|
@ -0,0 +1,78 @@
|
|||
{ lib
|
||||
, pythonOlder
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
# Python Inputs
|
||||
, fastdtw
|
||||
, numpy
|
||||
, pandas
|
||||
, psutil
|
||||
, qiskit-terra
|
||||
, qiskit-optimization
|
||||
, scikit-learn
|
||||
, scipy
|
||||
, quandl
|
||||
, yfinance
|
||||
# Check Inputs
|
||||
, pytestCheckHook
|
||||
, ddt
|
||||
, pytest-timeout
|
||||
, qiskit-aer
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "qiskit-finance";
|
||||
version = "0.2.1";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "qiskit";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-fEhc/01j6iYYwS6mLle+TpX9j0DVn12oPUFamEecoAY=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
fastdtw
|
||||
numpy
|
||||
pandas
|
||||
psutil
|
||||
qiskit-terra
|
||||
qiskit-optimization
|
||||
quandl
|
||||
scikit-learn
|
||||
scipy
|
||||
yfinance
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
pytest-timeout
|
||||
ddt
|
||||
qiskit-aer
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "qiskit_finance" ];
|
||||
disabledTests = [
|
||||
# Fail due to approximation error, ~1-2%
|
||||
"test_application"
|
||||
|
||||
# Tests fail b/c require internet connection. Stalls tests if enabled.
|
||||
"test_exchangedata"
|
||||
"test_yahoo"
|
||||
"test_wikipedia"
|
||||
];
|
||||
pytestFlagsArray = [
|
||||
"--durations=10"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Software for developing quantum computing programs";
|
||||
homepage = "https://qiskit.org";
|
||||
downloadPage = "https://github.com/QISKit/qiskit-optimization/releases";
|
||||
changelog = "https://qiskit.org/documentation/release_notes.html";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ drewrisinger ];
|
||||
};
|
||||
}
|
|
@ -7,9 +7,9 @@
|
|||
, qiskit-terra
|
||||
, requests
|
||||
, requests_ntlm
|
||||
, websockets
|
||||
, websocket-client
|
||||
# Visualization inputs
|
||||
, withVisualization ? false
|
||||
, withVisualization ? true
|
||||
, ipython
|
||||
, ipyvuetify
|
||||
, ipywidgets
|
||||
|
@ -23,6 +23,7 @@
|
|||
, nbformat
|
||||
, pproxy
|
||||
, qiskit-aer
|
||||
, websockets
|
||||
, vcrpy
|
||||
}:
|
||||
|
||||
|
@ -39,7 +40,7 @@ let
|
|||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "qiskit-ibmq-provider";
|
||||
version = "0.13.1";
|
||||
version = "0.18.0";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
|
@ -47,7 +48,7 @@ buildPythonPackage rec {
|
|||
owner = "Qiskit";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-DlHlXncttzGo4uVoh2aQ7urW6krN3ej2sJ/EwuxeF2I=";
|
||||
sha256 = "sha256-mVgR9vq9UpM/3VED4hpEev8YAoZY1URAxu7pVv+cjU8=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -56,9 +57,13 @@ buildPythonPackage rec {
|
|||
qiskit-terra
|
||||
requests
|
||||
requests_ntlm
|
||||
websockets
|
||||
websocket-client
|
||||
] ++ lib.optionals withVisualization visualizationPackages;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py --replace "websocket-client>=1.0.1" "websocket-client"
|
||||
'';
|
||||
|
||||
# Most tests require credentials to run on IBMQ
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
|
@ -67,6 +72,7 @@ buildPythonPackage rec {
|
|||
pproxy
|
||||
qiskit-aer
|
||||
vcrpy
|
||||
websockets
|
||||
] ++ lib.optionals (!withVisualization) visualizationPackages;
|
||||
|
||||
pythonImportsCheck = [ "qiskit.providers.ibmq" ];
|
||||
|
@ -75,6 +81,7 @@ buildPythonPackage rec {
|
|||
"test_old_api_url"
|
||||
"test_non_auth_url"
|
||||
"test_non_auth_url_with_hub"
|
||||
"test_coder_optimizers" # TODO: reenable when package scikit-quant is packaged, either in NUR or nixpkgs
|
||||
|
||||
# slow tests
|
||||
"test_websocket_retry_failure"
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
{ lib
|
||||
, pythonOlder
|
||||
, pythonAtLeast
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
# Python Inputs
|
||||
, fastdtw
|
||||
, numpy
|
||||
, psutil
|
||||
, qiskit-terra
|
||||
, scikit-learn
|
||||
, sparse
|
||||
# Optional inputs
|
||||
, withTorch ? true
|
||||
, pytorch
|
||||
# Check Inputs
|
||||
, pytestCheckHook
|
||||
, ddt
|
||||
, pytest-timeout
|
||||
, qiskit-aer
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "qiskit-machine-learning";
|
||||
version = "0.2.1";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "qiskit";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-2dfrkNZYSaXwiOCaRrPckq4BllANgc6BogyBcP0vosY=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
fastdtw
|
||||
numpy
|
||||
psutil
|
||||
qiskit-terra
|
||||
scikit-learn
|
||||
sparse
|
||||
] ++ lib.optional withTorch pytorch;
|
||||
|
||||
doCheck = false; # TODO: enable. Tests fail on unstable due to some multithreading issue?
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
pytest-timeout
|
||||
ddt
|
||||
qiskit-aer
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "qiskit_machine_learning" ];
|
||||
|
||||
pytestFlagsArray = [
|
||||
"--durations=10"
|
||||
"--showlocals"
|
||||
"-vv"
|
||||
"--ignore=test/connectors/test_torch_connector.py" # TODO: fix, get multithreading errors with python3.9, segfaults
|
||||
];
|
||||
disabledTests = [
|
||||
# Slow tests >10 s
|
||||
"test_readme_sample"
|
||||
"test_vqr_8"
|
||||
"test_vqr_7"
|
||||
"test_qgan_training_cg"
|
||||
"test_vqc_4"
|
||||
"test_classifier_with_circuit_qnn_and_cross_entropy_4"
|
||||
"test_vqr_4"
|
||||
"test_regressor_with_opflow_qnn_4"
|
||||
"test_qgan_save_model"
|
||||
"test_qgan_training_analytic_gradients"
|
||||
"test_qgan_training_run_algo_numpy"
|
||||
"test_ad_hoc_data"
|
||||
"test_qgan_training"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Software for developing quantum computing programs";
|
||||
homepage = "https://qiskit.org";
|
||||
downloadPage = "https://github.com/QISKit/qiskit-optimization/releases";
|
||||
changelog = "https://qiskit.org/documentation/release_notes.html";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ drewrisinger ];
|
||||
};
|
||||
}
|
80
pkgs/development/python-modules/qiskit-nature/default.nix
Normal file
80
pkgs/development/python-modules/qiskit-nature/default.nix
Normal file
|
@ -0,0 +1,80 @@
|
|||
{ lib
|
||||
, pythonOlder
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
# Python Inputs
|
||||
, h5py
|
||||
, numpy
|
||||
, psutil
|
||||
, qiskit-terra
|
||||
, retworkx
|
||||
, scikit-learn
|
||||
, scipy
|
||||
, withPyscf ? false
|
||||
, pyscf
|
||||
# Check Inputs
|
||||
, pytestCheckHook
|
||||
, ddt
|
||||
, pylatexenc
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "qiskit-nature";
|
||||
version = "0.2.2";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "qiskit";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-nQbvH911Gt4KddG23qwmiXfRJTWwVEsrzPvuTQfy4FY=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt --replace "h5py<3.3" "h5py"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
h5py
|
||||
numpy
|
||||
psutil
|
||||
qiskit-terra
|
||||
retworkx
|
||||
scikit-learn
|
||||
scipy
|
||||
] ++ lib.optional withPyscf pyscf;
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
ddt
|
||||
pylatexenc
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "qiskit_nature" ];
|
||||
|
||||
pytestFlagsArray = [
|
||||
"--durations=10"
|
||||
] ++ lib.optionals (!withPyscf) [
|
||||
"--ignore=test/algorithms/excited_state_solvers/test_excited_states_eigensolver.py"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# small math error < 0.05 (< 9e-6 %)
|
||||
"test_vqe_uvccsd_factory"
|
||||
# unsure of failure reason. Might be related to recent cvxpy update?
|
||||
"test_two_qubit_reduction"
|
||||
] ++ lib.optionals (!withPyscf) [
|
||||
"test_h2_bopes_sampler"
|
||||
"test_potential_interface"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Software for developing quantum computing programs";
|
||||
homepage = "https://qiskit.org";
|
||||
downloadPage = "https://github.com/QISKit/qiskit-optimization/releases";
|
||||
changelog = "https://qiskit.org/documentation/release_notes.html";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ drewrisinger ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
{ lib
|
||||
, pythonOlder
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
# Python Inputs
|
||||
, decorator
|
||||
, docplex
|
||||
, networkx
|
||||
, numpy
|
||||
, qiskit-terra
|
||||
, scipy
|
||||
# Check Inputs
|
||||
, pytestCheckHook
|
||||
, ddt
|
||||
, pylatexenc
|
||||
, qiskit-aer
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "qiskit-optimization";
|
||||
version = "0.2.3";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "qiskit";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-y/j/cerzMAKVjehh1LUqYe1Juoa4lIxH2qS165S9img=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt --replace "networkx>=2.2,<2.6" "networkx"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
docplex
|
||||
decorator
|
||||
networkx
|
||||
numpy
|
||||
qiskit-terra
|
||||
scipy
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
ddt
|
||||
pylatexenc
|
||||
qiskit-aer
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "qiskit_optimization" ];
|
||||
pytestFlagsArray = [ "--durations=10" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Software for developing quantum computing programs";
|
||||
homepage = "https://qiskit.org";
|
||||
downloadPage = "https://github.com/QISKit/qiskit-optimization/releases";
|
||||
changelog = "https://qiskit.org/documentation/release_notes.html";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ drewrisinger ];
|
||||
};
|
||||
}
|
|
@ -16,7 +16,10 @@
|
|||
, python-dateutil
|
||||
, retworkx
|
||||
, scipy
|
||||
, scikit-quant ? null
|
||||
, symengine
|
||||
, sympy
|
||||
, tweedledum
|
||||
, withVisualization ? false
|
||||
# Python visualization requirements, optional
|
||||
, ipywidgets
|
||||
|
@ -29,9 +32,6 @@
|
|||
# Crosstalk-adaptive layout pass
|
||||
, withCrosstalkPass ? false
|
||||
, z3
|
||||
# Classical function -> Quantum Circuit compiler
|
||||
, withClassicalFunctionCompiler ? true
|
||||
, tweedledum
|
||||
# test requirements
|
||||
, ddt
|
||||
, hypothesis
|
||||
|
@ -52,12 +52,11 @@ let
|
|||
seaborn
|
||||
];
|
||||
crosstalkPackages = [ z3 ];
|
||||
classicalCompilerPackages = [ tweedledum ];
|
||||
in
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "qiskit-terra";
|
||||
version = "0.17.4";
|
||||
version = "0.18.3";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
|
@ -65,7 +64,7 @@ buildPythonPackage rec {
|
|||
owner = "Qiskit";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-JyNuke+XPqjLVZbvPud9Y7k0+EmvETVKcOYcDldBiVo=";
|
||||
sha256 = "sha256-w/EnkdlC1hvmLqm4I8ajEYADxqMYGdHKrySLcb/yWGs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cython ];
|
||||
|
@ -82,10 +81,12 @@ buildPythonPackage rec {
|
|||
python-dateutil
|
||||
retworkx
|
||||
scipy
|
||||
scikit-quant
|
||||
symengine
|
||||
sympy
|
||||
tweedledum
|
||||
] ++ lib.optionals withVisualization visualizationPackages
|
||||
++ lib.optionals withCrosstalkPass crosstalkPackages
|
||||
++ lib.optionals withClassicalFunctionCompiler classicalCompilerPackages;
|
||||
++ lib.optionals withCrosstalkPass crosstalkPackages;
|
||||
|
||||
# *** Tests ***
|
||||
checkInputs = [
|
||||
|
@ -103,21 +104,21 @@ buildPythonPackage rec {
|
|||
|
||||
disabledTestPaths = [
|
||||
"test/randomized/test_transpiler_equivalence.py" # collection requires qiskit-aer, which would cause circular dependency
|
||||
] ++ lib.optionals (!withClassicalFunctionCompiler) [
|
||||
"test/python/classical_function_compiler/"
|
||||
# These tests are nondeterministic and can randomly fail.
|
||||
# We ignore them here for deterministic building.
|
||||
"test/randomized/"
|
||||
# These tests consistently fail on GitHub Actions build
|
||||
"test/python/quantum_info/operators/test_random.py"
|
||||
];
|
||||
pytestFlagsArray = [ "--durations=10" ];
|
||||
disabledTests = [
|
||||
# Not working on matplotlib >= 3.4.0, checks images match.
|
||||
"test_plot_circuit_layout"
|
||||
|
||||
# Flaky tests
|
||||
"test_cx_equivalence"
|
||||
"test_pulse_limits"
|
||||
"test_1q_random"
|
||||
] ++ lib.optionals (!withClassicalFunctionCompiler) [
|
||||
"TestPhaseOracle"
|
||||
] ++ lib.optionals stdenv.isAarch64 [
|
||||
"test_circuit_init" # failed on aarch64, https://gist.github.com/r-rmcgibbo/c2e173d43ced4f6954811004f6b5b842
|
||||
"test_pulse_limits" # Fails on GitHub Actions, probably due to minor floating point arithmetic error.
|
||||
"test_cx_equivalence" # Fails due to flaky test
|
||||
"test_two_qubit_synthesis_not_pulse_optimal" # test of random circuit, seems to randomly fail depending on seed
|
||||
"test_qv_natural" # fails due to sign error. Not sure why
|
||||
] ++ lib.optionals (lib.versionAtLeast matplotlib.version "3.4.0") [
|
||||
"test_plot_circuit_layout"
|
||||
]
|
||||
# Disabling slow tests for build constraints
|
||||
++ [
|
||||
|
@ -147,6 +148,12 @@ buildPythonPackage rec {
|
|||
"test_qaoa_qc_mixer_4"
|
||||
"test_abelian_grouper_random_2"
|
||||
"test_pauli_two_design"
|
||||
"test_shor_factoring"
|
||||
"test_sample_counts_memory_ghz"
|
||||
"test_two_qubit_weyl_decomposition_ab0"
|
||||
"test_sample_counts_memory_superposition"
|
||||
"test_piecewise_polynomial_function"
|
||||
"test_vqe_qasm"
|
||||
];
|
||||
|
||||
# Moves tests to $PACKAGEDIR/test. They can't be run from /build because of finding
|
||||
|
|
|
@ -8,14 +8,28 @@
|
|||
, qiskit-ibmq-provider
|
||||
, qiskit-ignis
|
||||
, qiskit-terra
|
||||
# Optional inputs
|
||||
, withOptionalPackages ? true
|
||||
, qiskit-finance
|
||||
, qiskit-machine-learning
|
||||
, qiskit-nature
|
||||
, qiskit-optimization
|
||||
# Check Inputs
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
let
|
||||
optionalQiskitPackages = [
|
||||
qiskit-finance
|
||||
qiskit-machine-learning
|
||||
qiskit-nature
|
||||
qiskit-optimization
|
||||
];
|
||||
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.26.2";
|
||||
version = "0.32.0";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
|
@ -23,7 +37,7 @@ buildPythonPackage rec {
|
|||
owner = "qiskit";
|
||||
repo = "qiskit";
|
||||
rev = version;
|
||||
hash = "sha256-QYWKKS7e/uCt5puWV4jA9Emp7M4Cyv2RUCxilbChWhw=";
|
||||
sha256 = "sha256-fKR072hOD0a9TtWulqyKUT3Riwq+NHTtciR+NN5JC1Y=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -32,7 +46,7 @@ buildPythonPackage rec {
|
|||
qiskit-ibmq-provider
|
||||
qiskit-ignis
|
||||
qiskit-terra
|
||||
];
|
||||
] ++ lib.optionals withOptionalPackages optionalQiskitPackages;
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
|
||||
|
|
|
@ -4,18 +4,20 @@
|
|||
, cmake
|
||||
, ninja
|
||||
, scikit-build
|
||||
# Check Inputs
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "tweedledum";
|
||||
version = "1.0.0";
|
||||
version = "1.1.1";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub{
|
||||
owner = "boschmitt";
|
||||
repo = "tweedledum";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-59lJzdw9HLJ9ADxp/a3KW4v5aU/dYm27NSYoz9D49i4=";
|
||||
sha256 = "sha256-wgrY5ajaMYxznyNvlD0ul1PFr3W8oV9I/OVsStlZEBM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ninja scikit-build ];
|
||||
|
@ -23,10 +25,8 @@ buildPythonPackage rec {
|
|||
|
||||
pythonImportsCheck = [ "tweedledum" ];
|
||||
|
||||
# TODO: use pytest, but had issues with finding the correct directories
|
||||
checkPhase = ''
|
||||
python -m unittest discover -s ./python/test -t .
|
||||
'';
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
pytestFlagsArray = [ "python/test" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A library for synthesizing and manipulating quantum circuits";
|
||||
|
|
|
@ -7915,16 +7915,24 @@ in {
|
|||
|
||||
qimage2ndarray = callPackage ../development/python-modules/qimage2ndarray { };
|
||||
|
||||
qiskit = callPackage ../development/python-modules/qiskit { };
|
||||
|
||||
qiskit-aer = callPackage ../development/python-modules/qiskit-aer { };
|
||||
|
||||
qiskit-aqua = callPackage ../development/python-modules/qiskit-aqua { };
|
||||
|
||||
qiskit = callPackage ../development/python-modules/qiskit { };
|
||||
qiskit-finance = callPackage ../development/python-modules/qiskit-finance { };
|
||||
|
||||
qiskit-ibmq-provider = callPackage ../development/python-modules/qiskit-ibmq-provider { };
|
||||
|
||||
qiskit-ignis = callPackage ../development/python-modules/qiskit-ignis { };
|
||||
|
||||
qiskit-machine-learning = callPackage ../development/python-modules/qiskit-machine-learning { };
|
||||
|
||||
qiskit-nature = callPackage ../development/python-modules/qiskit-nature { };
|
||||
|
||||
qiskit-optimization = callPackage ../development/python-modules/qiskit-optimization { };
|
||||
|
||||
qiskit-terra = callPackage ../development/python-modules/qiskit-terra { };
|
||||
|
||||
qrcode = callPackage ../development/python-modules/qrcode { };
|
||||
|
|
Loading…
Reference in a new issue