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

Describe optimization parameters in docs #615

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

ibrahim-shehzad
Copy link
Collaborator

Add explanation for the fields in OptimizationParameters, in particular max_gamma and max_backjumps.

@ibrahim-shehzad ibrahim-shehzad requested a review from garrison May 31, 2024 17:22
@ibrahim-shehzad ibrahim-shehzad self-assigned this May 31, 2024
@ibrahim-shehzad
Copy link
Collaborator Author

@garrison I went ahead and added some details but they are all in the docstring. I wonder if that is where we want to put it.

@ibrahim-shehzad ibrahim-shehzad linked an issue May 31, 2024 that may be closed by this pull request
@ibrahim-shehzad ibrahim-shehzad added documentation Improvements or additions to documentation cut finder Related to the automatic cut finder labels May 31, 2024
@coveralls
Copy link

coveralls commented May 31, 2024

Pull Request Test Coverage Report for Build 9356235036

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 9306464756: 0.0%
Covered Lines: 2411
Relevant Lines: 2411

💛 - Coveralls

@garrison garrison added the stable backport potential Suitable to be backported to most recent stable branch by Mergify label Jun 1, 2024
@garrison
Copy link
Member

garrison commented Jun 3, 2024

I wonder if that is where we want to put it.

It'd be nice to get the descriptions in the "Attributes" table on the page of the sphinx build.

If you format the descriptions as comments that start with #: like on the following lines, does that work?

https://github.com/Qiskit-Extensions/circuit-knitting-toolbox/blob/7029c106d7e807e6b27aaca70f54152463e5d47c/circuit_knitting/cutting/qpd/weights.py#L38-L45

@ibrahim-shehzad
Copy link
Collaborator Author

If you format the descriptions as comments that start with #: like on the following lines, does that work?

It does (f4a64b0). I did not get it to work with multiple sentences and/or multiple lines wasn't straightforward though so I kept everything in one sentence.

Co-authored-by: Jim Garrison <[email protected]>
@ibrahim-shehzad ibrahim-shehzad marked this pull request as ready for review June 3, 2024 23:29
nevertheless returns the result of a greedy best first search, which gives an *upper-bound* on gamma.
"""

#: The seed to use when initializing Numpy random number generators in the best first search priority queue.
Copy link
Member

Choose a reason for hiding this comment

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

Optional suggestion

Suggested change
#: The seed to use when initializing Numpy random number generators in the best first search priority queue.
#: The seed to use when initializing Numpy random number generators in the best-first-search priority queue.

Copy link
Member

@garrison garrison left a comment

Choose a reason for hiding this comment

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

Thank you - looks good to me! 🚀

@ibrahim-shehzad ibrahim-shehzad merged commit d6a8654 into main Jun 12, 2024
11 checks passed
@ibrahim-shehzad ibrahim-shehzad deleted the cut-finder-parameter-docs branch June 12, 2024 09:04
mergify bot pushed a commit that referenced this pull request Jun 12, 2024
* Describe optimization parameters in docs

* update docstring

* Fix typo in docstring

Co-authored-by: Jim Garrison <[email protected]>

---------

Co-authored-by: Jim Garrison <[email protected]>
(cherry picked from commit d6a8654)

# Conflicts:
#	circuit_knitting/cutting/automated_cut_finding.py
garrison added a commit that referenced this pull request Jun 13, 2024
* Describe optimization parameters in docs (#615)

* Describe optimization parameters in docs

* update docstring

* Fix typo in docstring

Co-authored-by: Jim Garrison <[email protected]>

---------

Co-authored-by: Jim Garrison <[email protected]>
(cherry picked from commit d6a8654)

# Conflicts:
#	circuit_knitting/cutting/automated_cut_finding.py

* Resolve conflict

---------

Co-authored-by: Ibrahim Shehzad <[email protected]>
Co-authored-by: Jim Garrison <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cut finder Related to the automatic cut finder documentation Improvements or additions to documentation stable backport potential Suitable to be backported to most recent stable branch by Mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better API docs for OptimizationParameters
3 participants