diff --git a/.coveragerc b/.coveragerc index eb34d111..0c93da79 100644 --- a/.coveragerc +++ b/.coveragerc @@ -5,6 +5,6 @@ source = flamingpy [report] # Regexes for lines to exclude from consideration - exclude_lines = if __name__ == .__main__.: + except ImportError: diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 4abe4e8a..4203447d 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,4 +1,4 @@ -## Release 0.6.0a3 (development release) +## Release 0.6.1a3 (development release) ### New features since the last release @@ -6,6 +6,29 @@ ### Improvements +### Documentation changes + +### Contributors + +This release contains contributions from (in alphabetical order): + +See full commit details ... + +--- + + +## Release 0.6.1a3 (current release) + +### New features since the last release + +* Fixed drawing of stabilizer graph for zero syndrome: [(#9)](https://github.com/XanaduAI/flamingpy/pull/9)(backward incompatible) + * Previously, the drawing function for a stabilizer graph relied on a non-documented feature. That is, it was assumed that when building the matching graph, all edges of a Networkx-based stabilizer graph were assigned a weight. This, however, was not a fair assumption for many reasons. + * As a solution, we have added a new method to the `SurfaceCode` class to draw the primal or dual stabilizer graph, which makes sure that each edge has a weight. Now, using that method, the user does not have to rely on unfair assumptions. + * Furthermore, we added a quick check to not add any edges to the matching graph when the syndrome is trivial. In this case, the cost of decoding should be almost zero. +* Pauli noise: have added a new noise model sampling i.i.d Z error for each qubit. [(#8)](https://github.com/XanaduAI/flamingpy/pull/8)(backward incompatible) + +### Improvements + * A large number of linting corrections were made to improve the overall pylint report. These were mostly minor but essential modifications including restructuring, re-coding, optimization, updating `.pylintrc`, adding `.coveragerc`. The code quality score is improved to `A` for the released version. Check ["Files changed"](https://github.com/XanaduAI/flamingpy/pull/11/files) for details. [(#11)](https://github.com/XanaduAI/flamingpy/pull/11) * `TODO` comments have been removed exclusively from files with low code quality grades. The Dev team has created tickets to be actioned for all removed TODO comments on separate (private) FlamingPy boards. [(#11)](https://github.com/XanaduAI/flamingpy/pull/11) @@ -19,21 +42,22 @@ * Updated doc/requirements.txt and doc/conf.py to reference and use the (centralized) Xanadu Sphinx Theme. * Replaced the Quantum Error Correction, Install, and FAQ static HTML files with reST ones. +* Updated old FT-Stack links in docs header to correct FlamingPy pages. [(#7)](https://github.com/XanaduAI/flamingpy/pull/7) + ### Contributors This release contains contributions from (in alphabetical order): -[Mikhail Andrenkov](https://github.com/Mandrenkov), [Sebastián Duque Mesa](https://github.com/sduquemesa), Nariman Saadatmand, [Ilan Tzitrin](https://github.com/ilan-tz) +[Mikhail Andrenkov](https://github.com/Mandrenkov), [Sebastián Duque Mesa](https://github.com/sduquemesa), Nariman Saadatmand, [Maxime Tremblay](https://github.com/maxtremblay), [Ilan Tzitrin](https://github.com/ilan-tz) -See full commit details ... +See full commit details [here](https://github.com/XanaduAI/flamingpy/compare/v0.4.9a1...v0.6.1a3). ---- -## Release 0.4.9a1 (current release) +## Release 0.4.9a1 ### Improvements since the last release -* Relative paths cannot be used in README.md logos and were replaced with Github-hosted links. [(#5)](https://github.com/XanaduAI/flamingpy/pull/5) +* Relative paths cannot be used in README.md logos and were replaced with GitHub-hosted links. [(#5)](https://github.com/XanaduAI/flamingpy/pull/5) * C++ imports are now placed within `try` blocks to avoid interrupting non-compiled installations, such as the ones currently used by readthedocs. [(#5)](https://github.com/XanaduAI/flamingpy/pull/5) @@ -41,7 +65,7 @@ See full commit details ... ### Bug fixes -* Fixed a bug in [pull_request_template.md](https://github.com/XanaduAI/flamingpy/pull/2/commits/e30f2cb65daffece08b193ffc4b8fe7a8d90b90e). The template was not loading properly due to a whitespace problem. [(#2)](https://github.com/XanaduAI/flamingpy/pull/2) +* Fixed a bug in [`pull_request_template.md`](https://github.com/XanaduAI/flamingpy/pull/2/commits/e30f2cb65daffece08b193ffc4b8fe7a8d90b90e). The template was not loading properly due to a whitespace problem. [(#2)](https://github.com/XanaduAI/flamingpy/pull/2) * Fixed a bug in [`simulations.py`](flamingpy/simulations.py) and related examples. See [here](https://github.com/XanaduAI/flamingpy/commit/771b0e66e5471c3696ac2e779a2df1cc49e5e684) for commit details. [(#6)](https://github.com/XanaduAI/flamingpy/pull/6) @@ -60,13 +84,15 @@ This release contains contributions from (in alphabetical order): Nariman Saadatmand, [Ilan Tzitrin](https://github.com/ilan-tz) -See full commit details https://github.com/XanaduAI/flamingpy/compare/v0.4.6a1...v0.4.9a1 +See full commit details [here](https://github.com/XanaduAI/flamingpy/compare/v0.4.6a1...v0.4.9a1). + ## Release 0.4.6a1 ### New features since the last private release -* The first Cython function for Monte Carlo sampling, mostly to provide cythonization samples and testbeds, has been added. See [`cpp_mc_loop.pyx`](flamingpy/cpp/cpp_mc_loop.pyx) and [`simulations.py`](flamingpy/benchmarks/simulations.py) for detailes. +* This is the initial public release started from the private template and our sister project [FT-Stack](https://github.com/XanaduAI/ft-stack). +* The first Cython function for Monte Carlo sampling, mostly to provide cythonization samples and testbeds, has been added. See [`cpp_mc_loop.pyx`](flamingpy/cpp/cpp_mc_loop.pyx) and [`simulations.py`](flamingpy/benchmarks/simulations.py) for details. (backward incompatible) ### Improvements diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e28fc6b6..f5a3bc42 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,6 +1,6 @@ ## Context for changes -< Describe your changes. Make sure to include a summarized description of the changes and fixed issues in the format below. You cannot place N/A here. > +< Describe your changes. Make sure to include a summarized description of the changes and fixed issues in the format below consistent with `CHANGELOG.md`. You cannot place N/A here. > - **New features**: * < text goes here > @@ -51,8 +51,7 @@ ## Checklist and integration statements - [ ] My Python and C++ codes follow the coding and commenting styles of this project as indicated by existing files. Specifically, the changes conform to given `black`, `docformatter` and `pylint` configurations. -- [ ] I have performed a self-review of these changes. I have checked my code and corrected misspellings to the best of my capacity. I have checked the [codefactor score](https://www.codefactor.io/repository/github/xanaduai/flamingpy/branches) in the active branch and ensured it is `A-` or better. I also confirm that I have already merged other branches into this branch as required. -- [ ] I have added context for corresponding changes in documentation and README.md as needed. -- [ ] I have added new workflow CI tests for corresponding changes and these pass locally for me. -- [ ] I have updated [`CHANGELOG.md`](.github/CHANGELOG.md) following the template. I recognize that the developers may revisit `CHANGELOG.md` and the versioning, and create a Special Release including my changes. - +- [ ] I have performed a self-review of these changes, checked my code, and corrected misspellings to the best of my capacity. I have checked the [codefactor score](https://www.codefactor.io/repository/github/xanaduai/flamingpy/branches) in the active branch and ensured it remains at `A` level. I also confirm that I have already merged other branches into this branch as required. +- [ ] I have added context for corresponding changes in documentation and [`README.md`](README.md) as needed. +- [ ] I have added new workflow CI tests for corresponding changes, ensuring codecoverage 90% or better, and these pass locally for me. +- [ ] I have updated [`CHANGELOG.md`](.github/CHANGELOG.md) following the template. I recognize that the developers may revisit [`CHANGELOG.md`](.github/CHANGELOG.md) and the versioning, and create a Special Release including my changes. diff --git a/README.md b/README.md index 2ae1560b..013c8ffd 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ See our [documentation](https://flamingpy.readthedocs.io/en/latest/usage/tutoria ## Contribution -See our contributions policy and list of contributors to FlamingPy [here](.github/CONTRIBUTING.rst). +See our contributions policy and list of contributors to FlamingPy [here](https://github.com/XanaduAI/flamingpy/blob/main/.github/CONTRIBUTING.rst). ## Support diff --git a/doc/dev_requirements.txt b/doc/dev_requirements.txt index 4cb0ac02..0bf7c9ca 100644 --- a/doc/dev_requirements.txt +++ b/doc/dev_requirements.txt @@ -13,5 +13,4 @@ sphinx-automodapi>=0.13 sphinx-copybutton>=0.4 sphinxcontrib-bibtex>=0.4.2 toml>=0.10.2 -# TODO: Use the Xanadu-Sphinx-Theme package on PyPI once it has been released. -git+https://github.com/XanaduAI/xanadu-sphinx-theme@phoenix#egg=xanadu_sphinx_theme +xanadu-sphinx-theme>=0.1.0 diff --git a/doc/development/guide_for_devs.rst b/doc/development/guide_for_devs.rst index e3b130df..cab9a3bc 100644 --- a/doc/development/guide_for_devs.rst +++ b/doc/development/guide_for_devs.rst @@ -95,7 +95,7 @@ Test coverage can be checked by running .. code-block:: bash - python3 -m pytest tests --cov=ft_stack --cov-report=xml --cov-report=term-missing -p no:warnings + python -m pytest tests --cov=ft_stack --cov-report=xml --cov-report=term-missing -p no:warnings The output of the above command will show the coverage percentage of each file, as well as the line numbers of any lines missing test coverage. diff --git a/flamingpy/_version.py b/flamingpy/_version.py index 84ecef8a..8da13498 100644 --- a/flamingpy/_version.py +++ b/flamingpy/_version.py @@ -15,4 +15,4 @@ """Version number (major.minor.patch[label])""" -__version__ = "0.6.0a3.dev2" +__version__ = "0.6.1a3"