-
Notifications
You must be signed in to change notification settings - Fork 184
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
[docs] Add C++ docs for get_state(), sample() and observe() #2140
base: main
Are you sure you want to change the base?
Conversation
CLA Assistant Lite bot All Contributors have signed the CLA. |
I have read the Contributor License Agreement and I hereby accept the Terms. |
Command Bot: Processing... |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Command Bot: Processing... |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Hi @schweitzpgi and @bmhowe23 ! Thanks for your reviews. All CI checks are currently passing, so I won't be touching this PR anymore. Feel free to have a look whenever you have time, this is very low priority. Bettina mentioned to me that a lot of the C++ API isn't documented on purpose, as future breaking changes aren't excluded -- feel free to ignore and close this PR in this case. Of course also happy to modify and address any comments you may have. |
closes #2139
Description
Added entries for the three functions to
docs/sphinx/api/languages/cpp_api.rst
, along with very minor modifications of two of the relevant header files. Sphinx now generates entries for these functions in the C++ API reference.For
observe
andsample
, I was unsure about how many overloads should be exposed, both to avoid unnecessary clutter in the docs and also to avoid clashes in Sphinx's name resolution. ATM all overloads (3) ofsample()
are exposed (this requiressample_options
to be exposed, too), whereas forobserve()
the overloads that either:DistributionType
template (afaik Doxygen cannot distinguish overloads that only differ in their return type), orArgumentSet
parameter (would require exposing this type synonym)are excluded.
Let me know if you want me to adjust the list of exposed overloads, the ordering of the declarations or any other changes. Happy to modify it as you prefer.
Note: There are further related functions that are not exposed (e.g. their
_async
counterparts). Let me know if I should raise a further issue about those.