-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
pythonPackages.qiskit-terra: init at 0.12.0 #80464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jonringer
merged 1 commit into
NixOS:master
from
drewrisinger:dr-pr-python-qiskit-terra
Feb 25, 2020
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
119 changes: 119 additions & 0 deletions
119
pkgs/development/python-modules/qiskit-terra/default.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| { lib | ||
| , pythonOlder | ||
| , buildPythonPackage | ||
| , fetchFromGitHub | ||
| , cython | ||
| , dill | ||
| , jsonschema | ||
| , numpy | ||
| , marshmallow | ||
| , marshmallow-polyfield | ||
| , matplotlib | ||
| , networkx | ||
| , ply | ||
| , psutil | ||
| , scipy | ||
| , sympy | ||
| # test requirements | ||
| , ddt | ||
| , hypothesis | ||
| , ipywidgets | ||
| , nbformat | ||
| , nbconvert | ||
| , pillow | ||
| , pydot | ||
| , python | ||
| , pygraphviz | ||
| , pylatexenc | ||
| , pytestCheckHook | ||
| }: | ||
|
|
||
| buildPythonPackage rec { | ||
| pname = "qiskit-terra"; | ||
| version = "0.12.0"; | ||
|
|
||
| disabled = pythonOlder "3.5"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "Qiskit"; | ||
| repo = pname; | ||
| rev = version; | ||
| sha256 = "1yarfziy2w8n1d7zyyxykfs68608j8md4kwfyhbyc6wy483fk9sy"; | ||
| }; | ||
|
|
||
| nativeBuildInputs = [ cython ]; | ||
|
|
||
| propagatedBuildInputs = [ | ||
| dill | ||
| jsonschema | ||
| numpy | ||
| marshmallow | ||
| marshmallow-polyfield | ||
| matplotlib | ||
| networkx | ||
| ply | ||
| psutil | ||
| scipy | ||
| sympy | ||
| ]; | ||
|
|
||
|
|
||
| # *** Tests *** | ||
| checkInputs = [ | ||
| ddt | ||
| hypothesis | ||
| ipywidgets | ||
| nbformat | ||
| nbconvert | ||
| pillow | ||
| pydot | ||
| pygraphviz | ||
| pylatexenc | ||
| pytestCheckHook | ||
| ]; | ||
|
|
||
| pythonImportsCheck = [ | ||
| "qiskit" | ||
| "qiskit.transpiler.passes.routing.cython.stochastic_swap.swap_trial" | ||
| ]; | ||
|
|
||
| dontUseSetuptoolsCheck = true; # can't find setup.py, so fails. tested by pytest | ||
|
|
||
| disabledTests = [ | ||
| "test_long_name" # generated circuit images differ for some reason | ||
| "test_jupyter_jobs_pbars" # needs IBMQ provider package (qiskit-ibmq-provider), circular dependency | ||
| ]; | ||
|
|
||
| pytestFlagsArray = [ | ||
| "--ignore=test/randomized/test_transpiler_equivalence.py" # collection requires qiskit-aer, which would cause circular dependency | ||
| ]; | ||
|
|
||
| # Moves tests to $PACKAGEDIR/test. They can't be run from /build because of finding | ||
| # cythonized modules and expecting to find some resource files in the test directory. | ||
| preCheck = '' | ||
| export PACKAGEDIR=$out/${python.sitePackages} | ||
| echo "Moving Qiskit test files to package directory" | ||
| cp -r $TMP/source/test $PACKAGEDIR | ||
| cp -r $TMP/source/examples $PACKAGEDIR | ||
| cp -r $TMP/source/qiskit/schemas/examples $PACKAGEDIR/qiskit/schemas/ | ||
|
|
||
| # run pytest from Nix's $out path | ||
| pushd $PACKAGEDIR | ||
| ''; | ||
| postCheck = '' | ||
| rm -rf test | ||
| rm -rf examples | ||
| popd | ||
| ''; | ||
|
|
||
|
|
||
| meta = with lib; { | ||
| description = "Provides the foundations for Qiskit."; | ||
| longDescription = '' | ||
| Allows the user to write quantum circuits easily, and takes care of the constraints of real hardware. | ||
| ''; | ||
| homepage = "https://github.com/QISKit/qiskit-terra"; | ||
| license = licenses.asl20; | ||
| maintainers = with maintainers; [ drewrisinger ]; | ||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.