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

Fixes #24: Document symbolic single-qubit measurements sMX, Register and projectrand! #330

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

Fe-r-oz
Copy link
Contributor

@Fe-r-oz Fe-r-oz commented Aug 2, 2024

Closes #24

Thanks a lot for your suggestions about fixing Issue 24 in the comments there. Indeed, there is a lot of documentation around this side of things that is currently not covered. This will help fix the gap and help users get accomodated with this functionality.

Thank you for reviewing the PR!

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.74%. Comparing base (e51a142) to head (ab05c50).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #330      +/-   ##
==========================================
+ Coverage   82.44%   82.74%   +0.30%     
==========================================
  Files          62       62              
  Lines        4186     4196      +10     
==========================================
+ Hits         3451     3472      +21     
+ Misses        735      724      -11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Krastanov Krastanov left a comment

Choose a reason for hiding this comment

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

Thanks for starting this!

There are some stylistic points that are not bad, but do not match the current style of the documentation. Especially around repetitive examples.

This is a good reference on making documentaiton https://docs.divio.com/documentation-system/

For random seeds, StableRNGs should be used.

Random seed initialization should be hidden so it does not render in the html documentation (there is a # hide meta comment that can be used)

To properly fix #24, we should have a clear separation between "algebra" and "circuit simulation" manuals. The first one exists. The second one has not been created.

docs/src/stab-algebra-manual.md Outdated Show resolved Hide resolved
docs/src/stab-algebra-manual.md Outdated Show resolved Hide resolved
docs/src/stab-algebra-manual.md Outdated Show resolved Hide resolved
docs/src/stab-algebra-manual.md Outdated Show resolved Hide resolved
docs/src/stab-algebra-manual.md Outdated Show resolved Hide resolved
src/project_trace_reset.jl Outdated Show resolved Hide resolved
src/project_trace_reset.jl Outdated Show resolved Hide resolved
src/project_trace_reset.jl Outdated Show resolved Hide resolved
src/project_trace_reset.jl Outdated Show resolved Hide resolved
src/project_trace_reset.jl Outdated Show resolved Hide resolved
@Krastanov Krastanov marked this pull request as draft August 3, 2024 18:35
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Aug 3, 2024

Thanks for your wonderful comments! Indeed, a clear separation between "algebra" and "circuit simulation" is necessary along with all of your others valuable points to properly fix the issue.

@Fe-r-oz Fe-r-oz changed the title Fixes #24: Document symbolic single-qubit measurements sMX, Register and projectrand! Fixes #24 & #150: Document symbolic single-qubit measurements sMX, Register and projectrand! & use DocStringExtensions much more agressively Aug 6, 2024
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Aug 6, 2024

Indeed, it is necessary to have clear distinction between the "algebra" and "circuit simulation" part of the documentation.

Circuit Simulation Manual is added which introduce Classical Register (from classicalregister.jl), and PauliFrames from pauliframes.jl. Also, added the documentation of random methods (from random.jl) in the stab-algebra manual. StableRNG is used for any random method that is used, whether in algebra or circuit simulation.

Improved documentation of ECC example: http://qc.quantumsavory.org/stable/ecc_example_sim/

Pretty description for Destabilizer (in QuantumClifford.jl) is added which was a #TODO

Covering missing DocstringExtensions: Using $(TYPEDEF) for structs and $(TYPEDSIGNATURES) for functions. It's mostly the earlier files that don't have docstrings extensions covered. The latest files such as paulirame.jl and canonicalization.jl have used them nicely. Hence, hopefully this closes #150.

random.jl really helped providing a nice tutorial of how to use AbstractRNG and GLOBAL_RNG when defining rng methods for sMZ, sMX, sMY, projectXrand!, projectYrand!, projectZrand!. All of these methods have been tested to show stable streams under projection.jl. Proper doctests can be made with rng so they does not represent broken determinism. Rng method for PauliFrame.initZ!. Now we can use initZ!(rng, n) etc.

The initial attempt was bad, thanks a lot for your suggestions, they helped in improving the pr significantly!

@Fe-r-oz Fe-r-oz marked this pull request as ready for review August 6, 2024 14:18
@Fe-r-oz Fe-r-oz requested a review from Krastanov August 6, 2024 14:18
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Aug 7, 2024

My sincere apologies for including the Issue 150 here as well. That's stupid of me. Hopefully, it would not happen again!

@Fe-r-oz Fe-r-oz changed the title Fixes #24 & #150: Document symbolic single-qubit measurements sMX, Register and projectrand! & use DocStringExtensions much more agressively Fixes #24: Document symbolic single-qubit measurements sMX, Register and projectrand! Aug 7, 2024
@Fe-r-oz Fe-r-oz marked this pull request as draft August 7, 2024 13:44
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Aug 7, 2024

Thank you for reviewing the PR. The documentation guides really helped me and provided a new perspective of writing better documentation.

Hopefully, the work is satisfactory and as per your needs and requirements.

I realize how bad it was adding work from another issue here. Now things are back to normal.

@Fe-r-oz Fe-r-oz marked this pull request as ready for review August 7, 2024 15:00
@Krastanov
Copy link
Member

Thanks! I will probably not be able to review in the next 5 days, but if I do not respond by next weekend, do not hesitate to ping me.

@Fe-r-oz Fe-r-oz marked this pull request as draft August 11, 2024 15:14
@Fe-r-oz Fe-r-oz marked this pull request as ready for review August 18, 2024 06:09
@Fe-r-oz Fe-r-oz force-pushed the i24 branch 2 times, most recently from 2e5e442 to 8d70457 Compare August 18, 2024 15:34
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Aug 25, 2024

@Krastanov, pinging as instructed. Apologies, as I have been imprecise when making review requests.

Thanks for your time!

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.

Document symbolic single-qubit measurements sMX and Register and projectrand!
2 participants