Skip to content

FlamingPy Release 0.9.0b0

Pre-release
Pre-release
Compare
Choose a tag to compare
@nariman87 nariman87 released this 01 Jul 03:08
· 28 commits to special-release since this release

New features since the last release

  • A new noise model class, CVMacroLayer, is introduced as a replacement to reduce_macro_and_simulate in macro_reduce.py. #57 (backward incompatible)
    • The process for running macronode-related simulations is considerably improved: the user needs only instantiate CVMacroLayer with the noise parameters of CVLayer.
    • The state labeling functions have been rewritten to be faster and more compact.
  • Added option for rectangular cuboid surface codes, i.e. lattices with different aspect ratios. #61 (backward compatible)
  • A new boundary option has been introduced for the SurfaceCode: the choice "periodic" refers to a code with boundaries periodic in all (x, y, and z) directions, whereas codes with "toric" have periodic boundaries in the x and y axis but not the z axis. #62 (backward compatible)
  • Add functions to create different graph states (star and complete graphs, ring graphs, linear clusters, and Bell pairs) in the new module utils.graph_states. #68 (backward compatible)

Bug fixes

  • Tutorial files are appropriately ignored in the pylint configuration file. #65
  • Small fix in viz.draw_EGraph that raised an error whenever a graph state with non-integer coordinates was plotted. #68
  • Remove p_err as an argument of the simulations.py script as none of the existing objects/classes currently use the phase error probability. #99

Improvements

  • CVLayer has been rewritten and refactored. #57
    • Lengthy functions have been broken up into more specialized methods.
    • The class is initialized with all the noise model parameters, simplifying the signatures of the methods.
    • An apply_noise method has been added to combine the procedures for noise sampling.
    • Docstrings were modified, and the public/private status of certain attributes was changed.
    • The final sampling order has been removed, as it is equivalent to initial but slower.
  • The simulations.py module has been made simpler and more general. #57
    • Functions within this module accept code, noise, decoder objects, as well as arguments (code_args, noise_args, decoder_args) separately.
  • Examples, benchmarks, and tests have been modified to take advantage of the simpler approach to noise application and the new CVMacroLayer. #57
  • Added fig, ax returns for the draw methods in utils/viz.py and some additional tests. #55
  • Added tests for EGraph plots. #60
  • Tests that required cpp libraries are skipped if they are not installed, hence avoiding failing tests from unmet dependencies. #65
  • Unit tests have been re-grouped in individual sub-dirs inside tests/ based on error correction and software layers. This helps manage and target each test unit. #65, #70
  • build_tests.yaml workflow now supports executing unit tests in parallel using pytest-xdist package. GitHub runners have at least 2 processors, which helps speed up the pytest blocks by ~1.5 times in practice. #70
  • Pylint is pinned to stable version pylint==2.14.0 and added to dev_requirements.txt. #76
    • pylint no-self-use tags are removed as this check has been removed from pylint (see here).
  • Added .gitattributes to the repository, so git automatically handles consistent eol's for all commits and contributors across different operating systems. #78
  • Increased the scope of docformatter to all .py files in the repository. Also, increased the scope of black formatter to include documentation files. #79
  • Added automatically generated .svg files to gitignore. #84
  • In simulations.py: #93
    • Directory argument -d was removed as it was unused. A working version can be added in the future.
    • We have removed reporting "decoding_total_time" as a more sophisticated time profiler, featuring systematic timing of all the script subroutines, is in work and will be added soon (follow its progress here).
  • Added the error_probability argument to the simulations.py script in order to be able to execute the simulations with iid noise. An error is raised when iid noise is selected but err_prob is not passed as an argument. #99

Documentation changes

  • A couple of .rst files have been changed in light of removing macro_reduce.py, shifting CVLayer to cv.ops, and adding CVMacroLayer. #57
  • Mention the new graph state functions from flamingpy.utils.graph_states in the run_graph_states.py tutorial. #68
  • A typo fix and minor changes for the README file. #80
  • Non-Xanadu links now open in a new tab, while HTML references are listed scientific-style at the end of a file. #82
  • Changed the math rendering Sphinx to MathJax (before equations were rendered as .png). #84
  • A typo in the installation section has been fixed. #94
  • Added our new forum links to README.md and documentation site. #96

Contributors

This release contains contributions from (in alphabetical order):

Joost Bus, Sebastián Duque Mesa, Luis Mantilla, Nariman Saadatmand, Ilan Tzitrin, WingCode

See full commit details here.