python3Packages.qiskit-terra: disable optional packages by default
Removes visualization packages from default install. They can still be added to environment manually or by overriding the argument.
This commit is contained in:
parent
562978e048
commit
3f2a308c28
@ -16,7 +16,8 @@
|
|||||||
, retworkx
|
, retworkx
|
||||||
, scipy
|
, scipy
|
||||||
, sympy
|
, sympy
|
||||||
# Python visualization requirements, semi-optional
|
, withVisualization ? false
|
||||||
|
# Python visualization requirements, optional
|
||||||
, ipywidgets
|
, ipywidgets
|
||||||
, matplotlib
|
, matplotlib
|
||||||
, pillow
|
, pillow
|
||||||
@ -24,6 +25,12 @@
|
|||||||
, pygments
|
, pygments
|
||||||
, pylatexenc
|
, pylatexenc
|
||||||
, seaborn
|
, seaborn
|
||||||
|
# Crosstalk-adaptive layout pass
|
||||||
|
, withCrosstalkPass ? false
|
||||||
|
, z3
|
||||||
|
# Classical function -> Quantum Circuit compiler
|
||||||
|
, withClassicalFunctionCompiler ? false
|
||||||
|
, tweedledum ? null
|
||||||
# test requirements
|
# test requirements
|
||||||
, ddt
|
, ddt
|
||||||
, hypothesis
|
, hypothesis
|
||||||
@ -33,6 +40,20 @@
|
|||||||
, python
|
, python
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
visualizationPackages = [
|
||||||
|
ipywidgets
|
||||||
|
matplotlib
|
||||||
|
pillow
|
||||||
|
pydot
|
||||||
|
pygments
|
||||||
|
pylatexenc
|
||||||
|
seaborn
|
||||||
|
];
|
||||||
|
crosstalkPackages = [ z3 ];
|
||||||
|
classicalCompilerPackages = [ tweedledum ];
|
||||||
|
in
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "qiskit-terra";
|
pname = "qiskit-terra";
|
||||||
version = "0.16.1";
|
version = "0.16.1";
|
||||||
@ -53,7 +74,6 @@ buildPythonPackage rec {
|
|||||||
fastjsonschema
|
fastjsonschema
|
||||||
jsonschema
|
jsonschema
|
||||||
numpy
|
numpy
|
||||||
matplotlib
|
|
||||||
networkx
|
networkx
|
||||||
ply
|
ply
|
||||||
psutil
|
psutil
|
||||||
@ -62,25 +82,18 @@ buildPythonPackage rec {
|
|||||||
retworkx
|
retworkx
|
||||||
scipy
|
scipy
|
||||||
sympy
|
sympy
|
||||||
# Optional/visualization inputs
|
] ++ lib.optionals withVisualization visualizationPackages
|
||||||
ipywidgets
|
++ lib.optionals withCrosstalkPass crosstalkPackages
|
||||||
matplotlib
|
++ lib.optionals withClassicalFunctionCompiler classicalCompilerPackages;
|
||||||
pillow
|
|
||||||
pydot
|
|
||||||
pygments
|
|
||||||
pylatexenc
|
|
||||||
seaborn
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
# *** Tests ***
|
# *** Tests ***
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
|
pytestCheckHook
|
||||||
ddt
|
ddt
|
||||||
hypothesis
|
hypothesis
|
||||||
nbformat
|
nbformat
|
||||||
nbconvert
|
nbconvert
|
||||||
pytestCheckHook
|
] ++ lib.optionals (!withVisualization) visualizationPackages;
|
||||||
];
|
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
"qiskit"
|
"qiskit"
|
||||||
@ -89,6 +102,7 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
pytestFlagsArray = [
|
pytestFlagsArray = [
|
||||||
"--ignore=test/randomized/test_transpiler_equivalence.py" # collection requires qiskit-aer, which would cause circular dependency
|
"--ignore=test/randomized/test_transpiler_equivalence.py" # collection requires qiskit-aer, which would cause circular dependency
|
||||||
|
] ++ lib.optionals (!withClassicalFunctionCompiler ) [
|
||||||
"--ignore=test/python/classical_function_compiler/"
|
"--ignore=test/python/classical_function_compiler/"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user