NVIDIA / NVIDIA/cuda-quantum

formatting issue with in an error message

Open
#2,131 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

There seems to be a typo somewhere in the code that generates the error message below because all the formatting commands are displayed instead of executed.
Screenshot 2024-08-22 at 12 36 13 PM

Steps to reproduce the bug
def error_message():
    qubits =qvector(2)
    ctrl.x(qubits[0], qubits[1])

results = cudaq.sample(error_message)


### Expected behavior

shouldn't see the `+ Color.RED` text

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

Not a regression

### Environment

- **CUDA Quantum version**:  0.8.0
- **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

Start with the Python reproduction in the issue and inspect the code that generates the displayed error message. Confirm where the formatting commands are rendered literally rather than interpreted, then add coverage for the reported message and verify that the + Color.RED text no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
quantum-computing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.