KEMBAR78
Fix runtime bug for span qview access where the span is of length 1 by annagrin · Pull Request #2149 · NVIDIA/cuda-quantum · GitHub
Skip to content

Conversation

@annagrin
Copy link
Collaborator

Description

Fix runtime bug for span qview access where the span is of length 1.

The following example generated a runtime call to @__quantum__rt__array_slice with a range of element from 0 to 0 with step 1. The runtime function had incorrect optimization for a start_idx == end_idx case where it returned the end_idx instead of an index of the qubit at end_idx.

...
q = cudaq.qvector(N + N)
qv = q[N:]
 x(qv[0:1])

Closes: #2132

@annagrin annagrin requested a review from schweitzpgi August 26, 2024 19:10
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Aug 26, 2024
@annagrin annagrin enabled auto-merge (squash) August 26, 2024 20:58
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Aug 26, 2024
@annagrin annagrin merged commit a1ee370 into NVIDIA:main Aug 27, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2024
@bettinaheim bettinaheim added the bug fix To be listed under Bug Fixes in the release notes label Nov 19, 2024
@bettinaheim bettinaheim added this to the release 0.9.0 milestone Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug fix To be listed under Bug Fixes in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessing qview gives incorrect results

3 participants