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

[Unitary hack] Improve docstrings in "Task/braket.py" #975

Closed
wants to merge 3 commits into from

Conversation

shubhusion
Copy link
Contributor

Fixes #957

Improve docstring, remove markdown errors

Copy link

codecov bot commented May 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.90%. Comparing base (e0779e8) to head (371984d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #975   +/-   ##
=======================================
  Coverage   89.90%   89.90%           
=======================================
  Files         110      110           
  Lines        8131     8131           
=======================================
  Hits         7310     7310           
  Misses        821      821           

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

ValueError: If the task is already submitted and force is False.

Example:
>>> backend = BraketBackend(...) # Create a backend instance
Copy link
Member

Choose a reason for hiding this comment

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

This won't be rendered correctly by mkdocs markdown. You need to wrap them with markdown code blocks.


Example:
>>> backend = BraketBackend(...) # Create a backend instance
>>> task_ir = QuEraTaskSpecification(...) # Create a task specification
Copy link
Member

Choose a reason for hiding this comment

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

like my comment from the other PR, this is too vague on how you construct a specification, the task will be constructed from a submission, so you should first create a submission (a batch object) then return the task from the batch.

Copy link
Member

Choose a reason for hiding this comment

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

ref: https://github.com/QuEraComputing/bloqade-python/blob/main/src/bloqade/task/batch.py

and you can also check the corresponding tests to understand how this works

@Roger-luo
Copy link
Member

I think quite a few PRs are written in a similar fashion like this one, I'm a bit worried if you actually run any of the code to write the docstring. I'll wait til you finish one of them after actually play with the test to proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve docstrings
3 participants