depot/third_party/nixpkgs/pkgs/development/python-modules/qiskit/default.nix
Default email 22017988c6 Project import generated by Copybara.
GitOrigin-RevId: c777cdf5c564015d5f63b09cc93bef4178b19b01
2022-04-27 11:35:20 +02:00

67 lines
1.5 KiB
Nix

{ lib
, pythonOlder
, buildPythonPackage
, fetchFromGitHub
# Python Inputs
, qiskit-aer
, 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.36.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "Qiskit";
repo = "qiskit";
rev = version;
sha256 = "sha256-cprFWWvYgfoJXvK0Xoi67BwOXQfz7XeHT/JbfErqblk=";
};
propagatedBuildInputs = [
qiskit-aer
qiskit-ibmq-provider
qiskit-ignis
qiskit-terra
] ++ lib.optionals withOptionalPackages optionalQiskitPackages;
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [
"qiskit"
"qiskit.circuit"
"qiskit.ignis"
"qiskit.providers.aer"
"qiskit.providers.ibmq"
];
meta = with lib; {
description = "Software for developing quantum computing programs";
homepage = "https://qiskit.org";
downloadPage = "https://github.com/QISKit/qiskit/releases";
changelog = "https://qiskit.org/documentation/release_notes.html";
license = licenses.asl20;
maintainers = with maintainers; [ drewrisinger pandaman ];
};
}