2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, pythonOlder
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
# Python Inputs
|
|
|
|
, qiskit-aer
|
|
|
|
, qiskit-ibmq-provider
|
|
|
|
, qiskit-ignis
|
|
|
|
, qiskit-terra
|
2021-12-06 16:07:01 +00:00
|
|
|
# Optional inputs
|
|
|
|
, withOptionalPackages ? true
|
|
|
|
, qiskit-finance
|
|
|
|
, qiskit-machine-learning
|
|
|
|
, qiskit-nature
|
|
|
|
, qiskit-optimization
|
2020-04-24 23:36:52 +00:00
|
|
|
# Check Inputs
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
let
|
|
|
|
optionalQiskitPackages = [
|
|
|
|
qiskit-finance
|
|
|
|
qiskit-machine-learning
|
|
|
|
qiskit-nature
|
|
|
|
qiskit-optimization
|
|
|
|
];
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "qiskit";
|
|
|
|
# NOTE: This version denotes a specific set of subpackages. See https://qiskit.org/documentation/release_notes.html#version-history
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.41.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-03 08:41:04 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-04-27 09:35:20 +00:00
|
|
|
owner = "Qiskit";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "qiskit";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-ICJJvbekvpaBMnSf+NHbTiarb+Ye3NtktcRYAq8KaCs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
qiskit-aer
|
|
|
|
qiskit-ibmq-provider
|
|
|
|
qiskit-ignis
|
|
|
|
qiskit-terra
|
2021-12-06 16:07:01 +00:00
|
|
|
] ++ lib.optionals withOptionalPackages optionalQiskitPackages;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"qiskit"
|
|
|
|
"qiskit.circuit"
|
|
|
|
"qiskit.ignis"
|
|
|
|
"qiskit.providers.aer"
|
2020-12-03 08:41:04 +00:00
|
|
|
"qiskit.providers.ibmq"
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Software for developing quantum computing programs";
|
|
|
|
homepage = "https://qiskit.org";
|
|
|
|
downloadPage = "https://github.com/QISKit/qiskit/releases";
|
2020-09-25 04:45:31 +00:00
|
|
|
changelog = "https://qiskit.org/documentation/release_notes.html";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ drewrisinger pandaman ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|