🧹 fix docstrings for gates and return_partial#112
Conversation
…rtial - Update `num_to_tensor` docstring in `tensorcircuit/gates.py` to correctly reflect return type and removed outdated TODO. - Fix `return_partial` docstring in `tensorcircuit/utils.py` by renaming the incorrect `:param return_partial:` to `:param return_argnums:`. Co-authored-by: refraction-ray <35157286+refraction-ray@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
There was a problem hiding this comment.
Code Review
This pull request updates the documentation in tensorcircuit/gates.py and tensorcircuit/utils.py. Specifically, it refines the return type description for the num_to_tensor function to include single Tensors and corrects a parameter name in the docstring for return_partial. I have no feedback to provide as there were no review comments to evaluate.
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|



This PR improves the maintainability and readability of the codebase by fixing docstring inaccuracies and removing obsolete TODO comments.
Key changes:
tensorcircuit/gates.py, updated thenum_to_tensorfunction's docstring to specify that it can return either aList[Tensor]or a singleTensor, and removed a TODO that was tracking this improvement.tensorcircuit/utils.py, corrected thereturn_partialfunction's docstring where the parameter was mistakenly named after the function itself instead of its actual name,return_argnums.These changes ensure the documentation accurately reflects the implementation and helps developers better understand the utility functions.
PR created automatically by Jules for task 17599355194071053958 started by @refraction-ray