2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pythonOlder,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
setuptools,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Python Inputs
|
2024-06-05 15:53:02 +00:00
|
|
|
qiskit-aer,
|
|
|
|
qiskit-ibmq-provider,
|
|
|
|
qiskit-ignis,
|
|
|
|
qiskit-terra,
|
2021-12-06 16:07:01 +00:00
|
|
|
# Optional inputs
|
2024-06-05 15:53:02 +00:00
|
|
|
withOptionalPackages ? true,
|
|
|
|
qiskit-finance,
|
|
|
|
qiskit-machine-learning,
|
|
|
|
qiskit-nature,
|
|
|
|
qiskit-optimization,
|
2020-04-24 23:36:52 +00:00
|
|
|
# Check Inputs
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
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
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.0.1";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
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}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Cjfn+9h8W08FcAlVC7b7O8Z+VGx5UeHosSgYJin/evE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
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;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
drewrisinger
|
|
|
|
pandaman
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|