Skip to content

Commit

Permalink
Code quality and pylint improvements to A (#11)
Browse files Browse the repository at this point in the history
* Update _version.py

* Update _version.py

* Pauli noise (#8) (#10)

* Update _version.py

* Add IID Pauli noise model

* Remove unused imports

* Fix issue with linting

* Add iid noise example to decoder.py

Allow user to change between cv and dv noise examples.

* Run black

* No need to specify inner decoder for iid case

* Run black on test_iid_noise

* Remove uniform weight assign

* Fix typos and change data function

* Fix test docstring

* Improve test

* Add docstring to apply_noise

* Update flamingpy/decoders/decoder.py

* Update iid.py

* Update flamingpy/noise/iid.py

* Delete pauli.py

* Update _version.py

* Update docs; run black

* Update _version.py

Co-authored-by: Narimanium <25132802+nariman87@users.noreply.github.com>
Co-authored-by: maxtremblay <m@xtremblay.ca>
Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

Co-authored-by: Maxime Tremblay <52462375+maxtremblay@users.noreply.github.com>
Co-authored-by: maxtremblay <m@xtremblay.ca>
Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Testing macro_reduce.py with generators

* Updating macro_reduce.py

* Updating macro_reduce.py

* Updating macro_reduce.py

* Updating .pylintrc

* Update pull_request_template.md

* Updating .pylintrc

* Updating .pylintrc

* Updating test_decoder.py

* Update _version.py

* Updating test_decoder.py

* Running black ...

* Updating test_Decoder.py

* Updating test_decoder.py

* Updating test_decoder.py

* Updating test_decoder.py ...

* Update .gitignore

* Updating .pylintrc

* Updating .pylintrc

* Testing the removal of 'too-many-locals' from .pylintrc

* Testing the removal of "redefined-builtin" in .pylintrc

* Experimenting the removal of 'too-many-lines' from .pylintrc

* Testing the removal of 'invalid-name' from .pylintrc

* Updating .pylintrc

* Updating __init__.py and macro_reduce.py

* Removing trailing spaces in macro_reduce.py

* Running black ...

* Updating test_init.py

* Added .coveragerc

* Running black ...

* Updating macro_reduce.py

* Updating ops.py

* Running black ...

* Removing sparse parameter from SCZ() of ops.py

* Updating ops.py ...

* updating ops.py ...

* Updating surface_code.py

* Removing TODO items and running black ...

* Updating surface_code.py

* Updating decoding.py, gkp.py, and viz.py

* Updating viz.py

* Updating viz.py ...

* Updating test_graphstates.py ...

* Updates to TestCVLayer class of test_graphstates.py

* Update README.md

* Updating test_surface_code.py

* Running black ...

* Update flamingpy/codes/surface_code.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/codes/surface_code.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/codes/surface_code.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/codes/surface_code.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update .coveragerc

* Create CONTRIBUTING.md

* Update README.md

* Update pull_request_template.md

* Improve pylint score (#13)

* refactor [codes] - surface_code

* format - black

* format - docformatter

* format - docformatter

* make the docformatter happy once again 🥲

* fix [github] - YAML: remove trailing spaces

* refactor [ops]

- initialize properties on `__init__`
- add `sparse` kwarg to `SCZ_mat`

* test [ops] - SCZ_mat: sparse kwarg

* refactor [ops] - remove  "dangerous default values"

* refactor [ops] - refactor logic from __init__

* refactor [ops] - CVLayer: remove logic from __init__

* pylint [ops] - disable unneeded pylint messages

* Update _version.py

* Importing a copy of CHANGELOG.md from SF

* Update README.md

* Allowing no-self-use for test files and removing all non-pytest decorators

* Update pull_request_template.md

* Update contribution.rst

* Update CHANGELOG.md

* Update README.md

* Update pull_request_template.md

* Update pull_request_template.md

* Update surface_code.py

* Update ops.py

* Update README.md

* Update contribution.rst

* Update README.md

* Update CONTRIBUTING.md

* Create CODE_OF_CONDUCT.md

* Rename CODE_OF_CONDUCT.md to code_of_conduct.md

* Update pull_request_template.md

* Moving CONTRIBUTING.md ...

* Update pull_request_template.md

* Update CHANGELOG.md

* Update _version.py

* Fix drawing of stabilizer graph for zero syndrome (#15)

* Fix drawing of stabilizer graph for zero syndrome

* Ran black

* Fix docstring

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Fix docstring

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Remove unused 'code' argument

* Update stabilizer_graph.py

* Generalize stab graph edge weights assignement

* Add conversion to nx and default drawing to rx

* Update flamingpy/codes/graphs/stabilizer_graph.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/codes/graphs/stabilizer_graph.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Add check for high low nodes before setting weight

* Ran formatter

* Update flamingpy/codes/graphs/stabilizer_graph.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Fix rx edge weight function

* Update flamingpy/codes/graphs/stabilizer_graph.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Remove code argument for shortest path

* Ran formatter

* Update stabilizer_graph.py

* Run black, docformatter

* Update _version.py

Co-authored-by: maxtremblay <m@xtremblay.ca>
Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

Co-authored-by: Maxime Tremblay <52462375+maxtremblay@users.noreply.github.com>
Co-authored-by: maxtremblay <m@xtremblay.ca>
Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Updating unit tests ...

* Updating test_benchmarks_examples.py and test_graphstates.py

* [Second Try] Syncing with main (#16)

* Fix drawing of stabilizer graph for zero syndrome

* Ran black

* Fix docstring

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Fix docstring

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Remove unused 'code' argument

* Update stabilizer_graph.py

* Generalize stab graph edge weights assignement

* Add conversion to nx and default drawing to rx

* Update flamingpy/codes/graphs/stabilizer_graph.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/codes/graphs/stabilizer_graph.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Add check for high low nodes before setting weight

* Ran formatter

* Update flamingpy/codes/graphs/stabilizer_graph.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Fix rx edge weight function

* Update flamingpy/codes/graphs/stabilizer_graph.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Remove code argument for shortest path

* Ran formatter

* Update stabilizer_graph.py

* Run black, docformatter

* Update _version.py

Co-authored-by: maxtremblay <m@xtremblay.ca>
Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

Co-authored-by: Maxime Tremblay <52462375+maxtremblay@users.noreply.github.com>
Co-authored-by: maxtremblay <m@xtremblay.ca>
Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update CHANGELOG.md

* Update _version.py

* Update .github/CHANGELOG.md

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update .github/CHANGELOG.md

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update .github/CHANGELOG.md

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update flamingpy/codes/surface_code.py

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update flamingpy/codes/surface_code.py

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update .github/CHANGELOG.md

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update flamingpy/cv/ops.py

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update flamingpy/cv/ops.py

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update flamingpy/codes/surface_code.py

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update README.md

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update flamingpy/codes/surface_code.py

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update pull_request_template.md

* Update README.md

* Update README.md

* Updating README.md and surface_code.py

* Update index.rst

* Update index.rst

* Update contribution.rst

* Replacing CONTRIBUTING.md with CONTRIBUTING.rst ...

* Update contribution.rst

* Update CHANGELOG.md

* Update .github/CHANGELOG.md

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update .github/CHANGELOG.md

Co-authored-by: Theodor <theodor.isacsson@gmail.com>

* Update .github/CONTRIBUTING.rst

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update .github/CONTRIBUTING.rst

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update .github/pull_request_template.md

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update README.md

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update tests/unit/test_graphstates.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Update flamingpy/cv/ops.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>

* Running black ...

* Update ops.py

* Update CHANGELOG.md

* Update README.md

* Modify SurfaceCode.generate_stabilizers slightly

Co-authored-by: Maxime Tremblay <52462375+maxtremblay@users.noreply.github.com>
Co-authored-by: maxtremblay <m@xtremblay.ca>
Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>
Co-authored-by: Sebastián Duque Mesa <675763+sduquemesa@users.noreply.github.com>
Co-authored-by: Theodor <theodor.isacsson@gmail.com>
  • Loading branch information
6 people authored Apr 16, 2022
1 parent b905698 commit caf8d47
Show file tree
Hide file tree
Showing 30 changed files with 410 additions and 180 deletions.
10 changes: 10 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# .coveragerc to control coverage files
[run]
source = flamingpy


[report]
# Regexes for lines to exclude from consideration

exclude_lines =
if __name__ == .__main__.:
75 changes: 75 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
## Release 0.6.0a3 (development release)

### New features since the last release

### Bug fixes

### 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)

* `CONTRIBUTING.md`, `code_of_conduct.md`, and `CHANGLELOG.md` were imported and modified from the Strawberry Fields project. Dev team plans to extend these with customized details in future PRs. [(#11)](https://github.com/XanaduAI/flamingpy/pull/11)

### Documentation changes

### Contributors

This release contains contributions from (in alphabetical order):

[Sebastián Duque Mesa](https://github.com/sduquemesa), [Nariman Saadatmand](https://github.com/nariman87), [Ilan Tzitrin](https://github.com/ilan-tz)

See full commit details ...

---

## Release 0.4.9a1 (current release)

### 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)

* 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)

* Code coverage (quality) score was improved to a more acceptable `B-` level. [(#5)](https://github.com/XanaduAI/flamingpy/pull/5)

### 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 [`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)

### Documentation changes

* Making Documentation more usable and consistent with other Xanadu projects [(#5)](https://github.com/XanaduAI/flamingpy/pull/5):
* API details and inheritance diagrams should be now correctly displayed.
* "Edit on Github" links were fixed
* The general style and section structures made more consistent with the company requirements and other packages such as StrawberryFields.
* Fixed the documentation links in `README.md`
* Minor updates to `doc/conf.py`, `doc/dev_requirements.txt`, and `doc/Makefile`.

### Contributors

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

## 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.

### Improvements

* More options for Installation from Source:
`setup.py` was updated to provide a no-compilation option for only installing (purely) Python libraries and separate options to compile `cmake` and `cython`-based codes. See the new [README.md](https://github.com/XanaduAI/ft-stack/blob/mc-cpp/README.md) for details.

### Contributors

This release contains contributions from (in alphabetical order):

Nariman Saadatmand, [Ilan Tzitrin](https://github.com/ilan-tz)
4 changes: 4 additions & 0 deletions .github/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Contribution
============

We welcome new contributions -- simply fork the FlamingPy repository and make a pull request (PR) containing your contribution. All contributors to FlamingPy will be listed as authors on the changelog and releases. Users who contribute significantly to the code (new plugins, functionalities, etc.) may be listed on the arXiv preprints for FlamingPy. See our `changelog <https://github.com/XanaduAI/flamingpy/.github/CHANGELOG.md>`__ and `release notes <https://github.com/XanaduAI/flamingpy/releases>`__ for more details (and you can always reach us on our `discussions page <https://github.com/XanaduAI/flamingpy/discussions>`__).
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ body:
attributes:
label: How to reproduce
description: |
Steps to reproduce the behavior. (Please provide steps such as 'Go to ...', 'Run commands ...', and 'See the warning ...')
Steps to reproduce the behavior. (Please provide steps such as 'Go to ...', 'Run commands ...', and 'See the warning ...')
If you have used a specific CLI and/or IDE, you must include it here.
What percentage of the time does it happen?
validations:
Expand Down
46 changes: 46 additions & 0 deletions .github/code_of_conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Code of Conduct team at codeofconduct@xanadu.ai. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
29 changes: 19 additions & 10 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
## Context for changes

< Include a summarized description of the changes and fixed issues in the format below. You cannot place N/A here. >

- **Title 1**:
text goes here
- **Title 2**:
text goes here
< 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. >

- **New features**:
* < text goes here >
* < text goes here >
- **Bug fixes**:
* < text goes here >
* < text goes here >
- **Improvements**:
* < text goes here >
* < text goes here >
- **Documentation changes**:
* < text goes here >
* < text goes here >

## Example usage and tests

Expand All @@ -30,10 +38,10 @@
< Summarize your justifications for the change and its benefits. Is there any drawback that exists today with the changes or may occur in the future? You cannot place N/A here. >

**Expected benefits:**
- text goes here
- < text goes here >

**Possible drawbacks:**
- text goes here
- < text goes here >

## Related Github issues

Expand All @@ -43,7 +51,8 @@
## 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 `B-` or higher. I also confirm that I have already merged other branches into this branch as required.
- [ ] 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 `_version.py` based on [semantic versioning](https://semver.org/). I recognize that the developers may create a Special Release including my changes.
- [ ] 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.

2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Build sphinx documentation
uses: XanaduAI/sphinx-action@master
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:

- name: Run black
run: python -m black -l 100 tests flamingpy --check

- name: Run docformatter
run: python -m docformatter --check flamingpy/*/*.py
run: python -m docformatter --check flamingpy/*/*.py
2 changes: 1 addition & 1 deletion .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
python setup.py build_cmake --inplace
- name: Run pylint
run: python3 -m pylint --disable=R,W flamingpy flamingpy/benchmarks/*.py flamingpy/examples/*.py tests/unit/*.py
run: python3 -m pylint --disable=R,W flamingpy/*.py flamingpy/benchmarks/*.py flamingpy/examples/*.py tests/unit/*.py
2 changes: 1 addition & 1 deletion .github/workflows/upload_linux_x64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
password: ${{ secrets.PYPI_API_TOKEN }}
#password: ${{ secrets.TEST_PYPI_API_TOKEN }}
#repository_url: https://test.pypi.org/legacy/

- name: Uninstall existing versions and add a delay
run: |
python -m pip uninstall flamingpy -y
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,6 @@ dmypy.json
# Cython stuff:
cython_debug/
flamingpy/cpp/cpp_mc_loop.cpp

# VS Code stuff:
.vscode/
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ ignored-classes=numpy,scipy,networkx
# can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once).
disable=line-too-long,invalid-name,too-many-lines,redefined-builtin,too-many-locals,duplicate-code,unsubscriptable-object,consider-using-f-string
disable=invalid-name,consider-using-f-string
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ python setup.py build_cmake --inplace # [OPTIONAL] compiles CMake-based backends

The purpose of the commands is as follows:
- The first command installs dependencies for building the project and testing purposes, and can be skipped if already satisfied.
- The second command (develop) installs FlamingPy Python libraries without the compiling the optional backends.
- The second command (develop) installs FlamingPy Python libraries without compiling the optional backends.
- The next optional commands compile various FlamingPy backends as required (given you have appropriate compilers pre-installed).

If you encountered a CMake error, you may need to (re-)install it through `conda install cmake` or other means before re-attempting the above. Furthermore, you may wish to try `conda install git`. For more detailed instructions and recommendations, including how to configure your environments, compilers and resolve errors, see our [Frequently Encountered Errors](https://flamingpy.readthedocs.io/en/stable/help/frequently_encountered_errors.html) page in the documentation.
Expand Down Expand Up @@ -130,15 +130,16 @@ message = "Error correction {}".format(outcome)
print(message)
```

See our [Documentation](https://flamingpy.readthedocs.io/en/latest/) for more tutorials.
See our [documentation](https://flamingpy.readthedocs.io/en/latest/usage/tutorials.html) for more tutorials.

<!-- ## Performance Demos
-->


<!-- ## Performance Demos -->


## Contribution

We welcome new contributions -- simply fork the FlamingPy repository and make a pull request (PR) containing your contribution. All contributors to FlamingPy will be listed as authors on the releases. Users who contribute significantly to the code (new plugins, functionalities, etc.) may be listed on the arXiv preprints for FlamingPy. See our [release notes and changelogs](https://github.com/XanaduAI/flamingpy/releases) for more details.
See our contributions policy and list of contributors to FlamingPy [here](.github/CONTRIBUTING.rst). <!-- to be changed from relative paths to links -->


## Support
Expand Down
11 changes: 1 addition & 10 deletions doc/development/contribution.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
Contribution
============

We welcome new contributions -- simply fork the FlamingPy repository and make
a pull request (PR) containing your contribution. All contributors to FlamingPy
will be listed as authors on the releases. Users who contribute significantly
to the code (new plugins, functionalities, etc.) may be listed on the arXiv
preprints for FlamingPy. See our
`release notes and changelogs <https://github.com/XanaduAI/flamingpy/releases>`__
for more details.
.. include:: ../../.github/CONTRIBUTING.rst
3 changes: 2 additions & 1 deletion flamingpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def about():

# a QuTiP-style infobox
print(
"\nFlamingPy is a cross-platform Python library with a variety of backends for efficient simulations of error correction in fault-tolerant quantum computers."
"\nFlamingPy is a cross-platform Python library with a variety of backends",
"for efficient simulations of error correction in fault-tolerant quantum computers.",
)
print("\nCopyright 2022 Xanadu Quantum Technologies Inc.\n")

Expand Down
2 changes: 1 addition & 1 deletion flamingpy/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
"""Version number (major.minor.patch[label])"""


__version__ = "0.6.0a3"
__version__ = "0.6.0a3.dev1"
Loading

0 comments on commit caf8d47

Please sign in to comment.