diff options
author | Drew Risinger <drewrisinger@users.noreply.github.com> | 2021-11-11 20:08:09 -0500 |
---|---|---|
committer | Drew Risinger <drewrisinger@users.noreply.github.com> | 2021-11-11 21:45:29 -0500 |
commit | b91e3c0d996b27cf1615f235b3ef867799b0a65d (patch) | |
tree | 9dcf0d1acf6abd0194ae41e0453161721da7c94e /pkgs/development/python-modules/qiskit-nature | |
parent | 11670aa1654aba068b7e49d9e62edbd26fcff891 (diff) | |
download | nixpkgs-b91e3c0d996b27cf1615f235b3ef867799b0a65d.tar nixpkgs-b91e3c0d996b27cf1615f235b3ef867799b0a65d.tar.gz nixpkgs-b91e3c0d996b27cf1615f235b3ef867799b0a65d.tar.bz2 nixpkgs-b91e3c0d996b27cf1615f235b3ef867799b0a65d.tar.lz nixpkgs-b91e3c0d996b27cf1615f235b3ef867799b0a65d.tar.xz nixpkgs-b91e3c0d996b27cf1615f235b3ef867799b0a65d.tar.zst nixpkgs-b91e3c0d996b27cf1615f235b3ef867799b0a65d.zip |
python3Packages.qiskit-nature: init at 0.2.2
Diffstat (limited to 'pkgs/development/python-modules/qiskit-nature')
-rw-r--r-- | pkgs/development/python-modules/qiskit-nature/default.nix | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/qiskit-nature/default.nix b/pkgs/development/python-modules/qiskit-nature/default.nix new file mode 100644 index 00000000000..09941fcdd44 --- /dev/null +++ b/pkgs/development/python-modules/qiskit-nature/default.nix @@ -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 ]; + }; +} |