python3Packages.qiskit-terra: 0.12.0 -> 0.13.0

Also add in optional visualization inputs as default to ensure that
they are in the environment when used at runtime.
Some hacks to avoid packaging retworkx (uses a semi-complicated Rust ->
Python packaging system, will try to get that packaged in future).
For now, just disabling retworkx, will need to package it in future.
This commit is contained in:
Drew Risinger 2020-04-10 09:09:27 -04:00
parent e218af21ab
commit c6ea35d599

View File

@ -2,35 +2,41 @@
, pythonOlder , pythonOlder
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
# Python requirements
, cython , cython
, dill , dill
, fastjsonschema
, jsonschema , jsonschema
, numpy , numpy
, marshmallow , marshmallow
, marshmallow-polyfield , marshmallow-polyfield
, matplotlib
, networkx , networkx
, ply , ply
, psutil , psutil
, python-constraint
, retworkx
, scipy , scipy
, sympy , sympy
# Python visualization requirements, semi-optional
, ipywidgets
, matplotlib
, pillow
, pydot
, pygments
, pylatexenc
, seaborn
# test requirements # test requirements
, ddt , ddt
, hypothesis , hypothesis
, ipywidgets
, nbformat , nbformat
, nbconvert , nbconvert
, pillow
, pydot
, python
, pygraphviz
, pylatexenc
, pytestCheckHook , pytestCheckHook
, python
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "qiskit-terra"; pname = "qiskit-terra";
version = "0.12.0"; version = "0.13.0";
disabled = pythonOlder "3.5"; disabled = pythonOlder "3.5";
@ -38,13 +44,14 @@ buildPythonPackage rec {
owner = "Qiskit"; owner = "Qiskit";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "1yarfziy2w8n1d7zyyxykfs68608j8md4kwfyhbyc6wy483fk9sy"; sha256 = "03fgqmyahgmkf5dbw19n9c1v8p4kmpk50wxhhc8435cclvs26x9j";
}; };
nativeBuildInputs = [ cython ]; nativeBuildInputs = [ cython ];
propagatedBuildInputs = [ propagatedBuildInputs = [
dill dill
fastjsonschema
jsonschema jsonschema
numpy numpy
marshmallow marshmallow
@ -53,34 +60,41 @@ buildPythonPackage rec {
networkx networkx
ply ply
psutil psutil
python-constraint
retworkx
scipy scipy
sympy sympy
# Optional/visualization inputs
ipywidgets
matplotlib
pillow
pydot
pygments
pylatexenc
seaborn
]; ];
postPatch = ''
# Fix relative imports in tests
touch test/python/dagcircuit/__init__.py
'';
# *** Tests *** # *** Tests ***
checkInputs = [ checkInputs = [
ddt ddt
hypothesis hypothesis
ipywidgets
nbformat nbformat
nbconvert nbconvert
pillow
pydot
pygraphviz
pylatexenc
pytestCheckHook pytestCheckHook
]; ];
dontUseSetuptoolsCheck = true; # can't find setup.py, so fails. tested by pytest
pythonImportsCheck = [ pythonImportsCheck = [
"qiskit" "qiskit"
"qiskit.transpiler.passes.routing.cython.stochastic_swap.swap_trial" "qiskit.transpiler.passes.routing.cython.stochastic_swap.swap_trial"
]; ];
dontUseSetuptoolsCheck = true; # can't find setup.py, so fails. tested by pytest
disabledTests = [ disabledTests = [
"test_long_name" # generated circuit images differ for some reason
"test_jupyter_jobs_pbars" # needs IBMQ provider package (qiskit-ibmq-provider), circular dependency "test_jupyter_jobs_pbars" # needs IBMQ provider package (qiskit-ibmq-provider), circular dependency
]; ];
@ -112,7 +126,8 @@ buildPythonPackage rec {
longDescription = '' longDescription = ''
Allows the user to write quantum circuits easily, and takes care of the constraints of real hardware. Allows the user to write quantum circuits easily, and takes care of the constraints of real hardware.
''; '';
homepage = "https://github.com/QISKit/qiskit-terra"; homepage = "https://qiskit.org/terra";
downloadPage = "https://github.com/QISKit/qiskit-terra/releases";
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ drewrisinger ]; maintainers = with maintainers; [ drewrisinger ];
}; };