ProjectQ-Framework / ProjectQ

ProjectQ: An open source software framework for quantum computing
https://projectq.ch
Apache License 2.0
874 stars 271 forks source link

Modernize ProjectQ (isort, PEP 257 docstrings, drop Python 2 code, more flake8 plugins) and fix phase estimation unit tests #408

Closed Takishima closed 3 years ago

Takishima commented 3 years ago

Summary of changes

Reviewing

There are a lot of changes in the code that are only the result of running isort, running a few more flake8 plugins, updating the docstrings to make them PEP257 compliant as well as replacing some Python 2 code like:

Here is a list of files that have some changes in them that are not immediately related to aforementioned issue to make reviewing this PR easier:

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 1026758702


Totals Coverage Status
Change from base Build 990359205: 0.0%
Covered Lines: 7000
Relevant Lines: 7000

💛 - Coveralls
Takishima commented 3 years ago

Looks good overall. I'd like you to address the comments in conf.py.

Everything else are just optional minor improvements for the docstings. I find it a bit funny that a file "does" something, that's why I'd remove all the "Contains" and "Defines" and put in the docstring only a description of its contents (without a verb). For the "Registers", importing the file seems to actually do something, so I'd leave that. But feel free to ignore and just resolve all those comments.

Never thought about this in those terms, but I like your way of thinking. I'll keep that in mind for the future ;-)