Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial pipeline, error correction blurb, and a couple of tutorials #24

Merged
merged 39 commits into from
May 17, 2022

Conversation

thisac
Copy link
Contributor

@thisac thisac commented May 5, 2022

Context for changes

Set the infrastructure to have a gallery containing demos in FlamingPy

  • Documentation changes:
    • Demo gallery/tutorials section on flamingpy docs

Example usage and tests

To add a tutorial, use the gallery-item directive from the xanadu-sphinx-theme. For the new document to be compiled its filename should start with run_. Thumbnails will be created out of the first figure generated and stored in tutorials/_out/images/thumb/ with the same name of the tutorial prepended with sphx_glr_.

Example

A new tutorial named run_intro_tutorial.py is created in flamingpy/doc/tutorials/run_intro_tutorial.py. To add the tutorial to the gallery use

.. gallery-item::
    :tooltip: This tutorial is directed at people who are new to FlamingPy.
    :figure: tutorials/_out/images/thumb/sphx_glr_run_intro_tutorial.png
    :description: :doc:`../tutorials/_out/run_intro_tutorial`

on the flamingpy/doc/usage/tutorials.rst file.

Every new tutorial should be a python executable script with ReST formatting.

Performance results justifying changes

  • Not Applicable

Workflow actions and tests

This should be tested and built by the Create Documentation / sphinx (pull_request) action.

Expected benefits and drawbacks

Expected benefits:

  • Extended documentation with tutorials and examples

Possible drawbacks:

  • None

Related Github issues

  • Not Applicable

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, checked my code (including for codefactor compliance), and corrected misspellings to the best of my capacity. I have synced this branch with others 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, ensuring codecoverage 95% or better, and these pass locally for me.
  • I have updated 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.

@codecov
Copy link

codecov bot commented May 5, 2022

Codecov Report

Merging #24 (2fb6c5a) into main (875b0f1) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
+ Coverage   96.27%   96.32%   +0.04%     
==========================================
  Files          35       35              
  Lines        2123     2123              
==========================================
+ Hits         2044     2045       +1     
+ Misses         79       78       -1     
Impacted Files Coverage Δ
flamingpy/_version.py 100.00% <100.00%> (ø)
flamingpy/utils/viz.py 90.67% <0.00%> (+0.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 875b0f1...2fb6c5a. Read the comment docs.

@sduquemesa sduquemesa self-assigned this May 10, 2022
@sduquemesa sduquemesa marked this pull request as ready for review May 16, 2022 19:49
doc/tutorials/README.txt Outdated Show resolved Hide resolved
@sduquemesa sduquemesa changed the title [WIP] Demo gallery Demo gallery May 16, 2022
sduquemesa and others added 10 commits May 16, 2022 18:43
* Update quantum_error_correction.rst

Add the QEC blurb

Co-Authored-By: Pavithran S Iyer <33754449+paviudes@users.noreply.github.com>

* Update quantum_error_correction.rst

Co-Authored-By: Pavithran S Iyer <33754449+paviudes@users.noreply.github.com>

* Update graph state tutorial, test image inclusion

* Update run_graph_states.py

* Add error correction tutorial

* Add images to graph state tutorial

* fix thumb link

* fix image hyperlink

* add space to image instruction

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

* add thumbnail to ec tutorial

* remove `align` from math statements

* Apply suggestions from code review

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

* add label/cross-ref and minor fixes

* fix ref

* add ref to quantum-error-correction

* Apply suggestions from code review @thisac

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

* Update run_graph_states.py

* improve tooltips text

* center and resize images

* Modify circuit diagrams slightly

* Apply suggestions from code review

* Update doc/tutorials/run_error_correction.py

* Update run_graph_states.py

* Update run_error_correction.py

Co-authored-by: ilan-tz <57886357+ilan-tz@users.noreply.github.com>
Co-authored-by: Pavithran S Iyer <33754449+paviudes@users.noreply.github.com>
Co-authored-by: Theodor <theodor.isacsson@gmail.com>
@ilan-tz ilan-tz changed the title Demo gallery Tutorial pipeline, error correction blurb, and a couple of tutorials May 17, 2022
Copy link
Collaborator

@ilan-tz ilan-tz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! A simple and effective pipeline for adding tutorials. Thank you also to @paviudes for the QEC blurb!

@ilan-tz ilan-tz self-requested a review May 17, 2022 17:53
doc/quantum_error_correction.rst Show resolved Hide resolved
doc/quantum_error_correction.rst Show resolved Hide resolved
doc/quantum_error_correction.rst Outdated Show resolved Hide resolved
doc/quantum_error_correction.rst Outdated Show resolved Hide resolved
@ilan-tz ilan-tz merged commit d9c3c00 into main May 17, 2022
@ilan-tz ilan-tz deleted the demo-gallery branch May 17, 2022 18:49
@soosub soosub mentioned this pull request Jun 9, 2022
1 task
soosub pushed a commit that referenced this pull request Jul 29, 2022
Implement matching graph abstraction so that user can readily switch between backends.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants