NVIDIA / NVIDIA/cuda-quantum

r1 and rz descriptions in API lack clarity of their differentiation

Open
#2,160 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation stale-notified
Dominant language
C++
Stars
1.1k
Forks
456
Avg merge
1d 22h
Merged PRs (30d)
165

Description

Required prerequisites
  • Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
  • Make sure you've read the documentation. Your issue may be addressed there.
  • Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
  • If possible, make a PR with a failing test to give us a starting point to work on!
Describe the bug

the r1 and rz have descriptions in the API as rotations about the |1> state and the z-axis, respectively. These are identical rotations, yet the gates are not identical. A sentence mentioning how the phase differs would be useful.

I'll submit a PR with a suggestion for clarity.

Steps to reproduce the bug

compare the descriptions of r1 and rz
https://nvidia.github.io/cuda-quantum/latest/api/default_ops.html

Expected behavior

Reader should recognize the different behavior of the 2 gates through the verbal descriptions (without having to dive into the matrix multiplication)

Is this a regression? If it is, put the last known working version (or commit) here.

Not a regression

Environment
  • CUDA Quantum version:
  • Python version:
  • C++ compiler:
  • Operating system:
Suggestions

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the linked default_ops API page and compare the descriptions for r1 and rz. Update the wording so readers can distinguish their phase behavior without deriving the matrices, then verify both entries clearly describe the difference.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.