rigetti / reference-qvm

A reference implementation for a quantum virtual machine in Python
Apache License 2.0
46 stars 20 forks source link

Make ReferenceQvm compatible with pyQuil v1.4.0 #9

Closed jotterbach closed 6 years ago

jotterbach commented 6 years ago

The tox stacktrace for completeness

GLOB sdist-make: /Users/johannes/code/reference-qvm/setup.py
py27 recreate: /Users/johannes/code/reference-qvm/.tox/py27
py27 installdeps: -rrequirements.txt
py27 inst: /Users/johannes/code/reference-qvm/.tox/dist/referenceqvm-0.1.2.zip
py27 installed: antlr4-python2-runtime==4.7,backports.functools-lru-cache==1.4,certifi==2017.11.5,chardet==3.0.4,codeclimate-test-reporter==0.2.3,coverage==4.4.2,cycler==0.10.0,funcsigs==1.0.2,idna==2.6,matplotlib==2.1.0,numpy==1.13.3,pluggy==0.5.2,py==1.5.2,pyparsing==2.2.0,pyquil==1.4.0,pytest==3.2.5,pytest-cov==2.5.1,python-dateutil==2.6.1,pytz==2017.3,referenceqvm==0.1.2,requests==2.18.4,scipy==1.0.0,six==1.11.0,sphinx-rtd-theme==0.2.4,subprocess32==3.2.7,tox==2.9.1,urllib3==1.22,virtualenv==15.1.0
py27 runtests: PYTHONHASHSEED='4114467311'
py27 runtests: commands[0] | py.test --cov=referenceqvm
====================================================================================================================================================================== test session starts ======================================================================================================================================================================
platform darwin -- Python 2.7.13, pytest-3.2.5, py-1.5.2, pluggy-0.4.0
rootdir: /Users/johannes/code/reference-qvm, inifile:
plugins: cov-2.5.1
collected 1 item / 8 errors                                                                                                                                                                                                                                                                                                                                      

---------- coverage: platform darwin, python 2.7.13-final-0 ----------
Name                                Stmts   Miss  Cover
-------------------------------------------------------
referenceqvm/__init__.py                1      0   100%
referenceqvm/api.py                    10     10     0%
referenceqvm/gates.py                  40     11    73%
referenceqvm/qam.py                    79     79     0%
referenceqvm/qvm_unitary.py            23     23     0%
referenceqvm/qvm_wavefunction.py      140    140     0%
referenceqvm/unitary_generator.py     129    122     5%
-------------------------------------------------------
TOTAL                                 422    385     9%

============================================================================================================================================================================ ERRORS =============================================================================================================================================================================
_______________________________________________________________________________________________________________________________________________ ERROR collecting referenceqvm/tests/test_arbitrary_state_prep.py ________________________________________________________________________________________________________________________________________________
ImportError while importing test module '/Users/johannes/code/reference-qvm/referenceqvm/tests/test_arbitrary_state_prep.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
referenceqvm/tests/test_arbitrary_state_prep.py:3: in <module>
    from pyquil.quil import Program
.tox/py27/lib/python2.7/site-packages/pyquil/quil.py:25: in <module>
    from pyquil._parser.PyQuilListener import run_parser
.tox/py27/lib/python2.7/site-packages/pyquil/_parser/PyQuilListener.py:18: in <module>
    from typing import Any, List
E   ImportError: No module named typing
____________________________________________________________________________________________________________________________________________________ ERROR collecting referenceqvm/tests/test_controlflow.py ____________________________________________________________________________________________________________________________________________________
ImportError while importing test module '/Users/johannes/code/reference-qvm/referenceqvm/tests/test_controlflow.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
referenceqvm/tests/test_controlflow.py:2: in <module>
    from pyquil.quil import Program
.tox/py27/lib/python2.7/site-packages/pyquil/quil.py:25: in <module>
    from pyquil._parser.PyQuilListener import run_parser
.tox/py27/lib/python2.7/site-packages/pyquil/_parser/PyQuilListener.py:18: in <module>
    from typing import Any, List
E   ImportError: No module named typing
____________________________________________________________________________________________________________________________________________________ ERROR collecting referenceqvm/tests/test_measurement.py ____________________________________________________________________________________________________________________________________________________
ImportError while importing test module '/Users/johannes/code/reference-qvm/referenceqvm/tests/test_measurement.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
referenceqvm/tests/test_measurement.py:2: in <module>
    from pyquil.quil import Program
.tox/py27/lib/python2.7/site-packages/pyquil/quil.py:25: in <module>
    from pyquil._parser.PyQuilListener import run_parser
.tox/py27/lib/python2.7/site-packages/pyquil/_parser/PyQuilListener.py:18: in <module>
    from typing import Any, List
E   ImportError: No module named typing
_____________________________________________________________________________________________________________________________________________________ ERROR collecting referenceqvm/tests/test_qvm_funcs.py _____________________________________________________________________________________________________________________________________________________
ImportError while importing test module '/Users/johannes/code/reference-qvm/referenceqvm/tests/test_qvm_funcs.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
referenceqvm/tests/test_qvm_funcs.py:1: in <module>
    from pyquil.quil import Program
.tox/py27/lib/python2.7/site-packages/pyquil/quil.py:25: in <module>
    from pyquil._parser.PyQuilListener import run_parser
.tox/py27/lib/python2.7/site-packages/pyquil/_parser/PyQuilListener.py:18: in <module>
    from typing import Any, List
E   ImportError: No module named typing
______________________________________________________________________________________________________________________________________________________ ERROR collecting referenceqvm/tests/test_system.py _______________________________________________________________________________________________________________________________________________________
ImportError while importing test module '/Users/johannes/code/reference-qvm/referenceqvm/tests/test_system.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
referenceqvm/tests/test_system.py:1: in <module>
    from pyquil.quil import Program
.tox/py27/lib/python2.7/site-packages/pyquil/quil.py:25: in <module>
    from pyquil._parser.PyQuilListener import run_parser
.tox/py27/lib/python2.7/site-packages/pyquil/_parser/PyQuilListener.py:18: in <module>
    from typing import Any, List
E   ImportError: No module named typing
______________________________________________________________________________________________________________________________________________________ ERROR collecting referenceqvm/tests/test_unitary.py ______________________________________________________________________________________________________________________________________________________
ImportError while importing test module '/Users/johannes/code/reference-qvm/referenceqvm/tests/test_unitary.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
referenceqvm/tests/test_unitary.py:1: in <module>
    from pyquil.quil import Program
.tox/py27/lib/python2.7/site-packages/pyquil/quil.py:25: in <module>
    from pyquil._parser.PyQuilListener import run_parser
.tox/py27/lib/python2.7/site-packages/pyquil/_parser/PyQuilListener.py:18: in <module>
    from typing import Any, List
E   ImportError: No module named typing
_________________________________________________________________________________________________________________________________________________ ERROR collecting referenceqvm/tests/test_unitary_generator.py _________________________________________________________________________________________________________________________________________________
ImportError while importing test module '/Users/johannes/code/reference-qvm/referenceqvm/tests/test_unitary_generator.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
referenceqvm/tests/test_unitary_generator.py:4: in <module>
    from referenceqvm.unitary_generator import (lifted_gate, apply_gate,
referenceqvm/unitary_generator.py:30: in <module>
    from pyquil.paulis import PauliSum
.tox/py27/lib/python2.7/site-packages/pyquil/paulis.py:24: in <module>
    from .quil import Program
.tox/py27/lib/python2.7/site-packages/pyquil/quil.py:25: in <module>
    from pyquil._parser.PyQuilListener import run_parser
.tox/py27/lib/python2.7/site-packages/pyquil/_parser/PyQuilListener.py:18: in <module>
    from typing import Any, List
E   ImportError: No module named typing
___________________________________________________________________________________________________________________________________________________ ERROR collecting referenceqvm/tests/test_wavefunction.py ____________________________________________________________________________________________________________________________________________________
ImportError while importing test module '/Users/johannes/code/reference-qvm/referenceqvm/tests/test_wavefunction.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
referenceqvm/tests/test_wavefunction.py:4: in <module>
    from pyquil.quil import Program
.tox/py27/lib/python2.7/site-packages/pyquil/quil.py:25: in <module>
    from pyquil._parser.PyQuilListener import run_parser
.tox/py27/lib/python2.7/site-packages/pyquil/_parser/PyQuilListener.py:18: in <module>
    from typing import Any, List
E   ImportError: No module named typing
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 8 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================================================================================================================================== 8 error in 0.86 seconds ====================================================================================================================================================================
ERROR: InvocationError: '/Users/johannes/code/reference-qvm/.tox/py27/bin/py.test --cov=referenceqvm'
py36 recreate: /Users/johannes/code/reference-qvm/.tox/py36
py36 installdeps: -rrequirements.txt
py36 inst: /Users/johannes/code/reference-qvm/.tox/dist/referenceqvm-0.1.2.zip
py36 installed: antlr4-python3-runtime==4.7,certifi==2017.11.5,chardet==3.0.4,codeclimate-test-reporter==0.2.3,coverage==4.4.2,cycler==0.10.0,funcsigs==1.0.2,idna==2.6,matplotlib==2.1.0,numpy==1.13.3,pluggy==0.5.2,py==1.5.2,pyparsing==2.2.0,pyquil==1.4.0,pytest==3.2.5,pytest-cov==2.5.1,python-dateutil==2.6.1,pytz==2017.3,referenceqvm==0.1.2,requests==2.18.4,scipy==1.0.0,six==1.11.0,sphinx-rtd-theme==0.2.4,tox==2.9.1,urllib3==1.22,virtualenv==15.1.0
py36 runtests: PYTHONHASHSEED='4114467311'
py36 runtests: commands[0] | py.test --cov=referenceqvm
====================================================================================================================================================================== test session starts ======================================================================================================================================================================
platform darwin -- Python 3.6.1, pytest-3.2.5, py-1.5.2, pluggy-0.4.0
rootdir: /Users/johannes/code/reference-qvm, inifile:
plugins: cov-2.5.1
collected 22 items / 1 errors                                                                                                                                                                                                                                                                                                                                    

---------- coverage: platform darwin, python 3.6.1-final-0 -----------
Name                                Stmts   Miss  Cover
-------------------------------------------------------
referenceqvm/__init__.py                1      0   100%
referenceqvm/api.py                    10     10     0%
referenceqvm/gates.py                  40     11    72%
referenceqvm/qam.py                    79     79     0%
referenceqvm/qvm_unitary.py            23     23     0%
referenceqvm/qvm_wavefunction.py      140    135     4%
referenceqvm/unitary_generator.py     129    111    14%
-------------------------------------------------------
TOTAL                                 422    369    13%

============================================================================================================================================================================ ERRORS =============================================================================================================================================================================
___________________________________________________________________________________________________________________________________________________ ERROR collecting referenceqvm/tests/test_wavefunction.py ____________________________________________________________________________________________________________________________________________________
ImportError while importing test module '/Users/johannes/code/reference-qvm/referenceqvm/tests/test_wavefunction.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
referenceqvm/tests/test_wavefunction.py:15: in <module>
    from referenceqvm.qvm_wavefunction import QVM_Wavefunction
referenceqvm/qvm_wavefunction.py:45: in <module>
    from pyquil.quilbase import (Instr,
E   ImportError: cannot import name 'Instr'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================================================================================================================================== 1 error in 0.58 seconds ====================================================================================================================================================================
ERROR: InvocationError: '/Users/johannes/code/reference-qvm/.tox/py36/bin/py.test --cov=referenceqvm'
____________________________________________________________________________________________________________________________________________________________________________ summary ____________________________________________________________________________________________________________________________________________________________________________
ERROR:   py27: commands failed
ERROR:   py36: commands failed
jotterbach commented 6 years ago

@ncrubin @stevenheidel @pkaralekas let's crank on this! If someone installs the pypi version of currently released reference-qvm they will be unhappy!