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

When debugging code with no qubits, quantum state in Variables view is reported as |0> #1922

Closed
tcNickolas opened this issue Sep 18, 2024 · 0 comments · Fixed by #1953
Closed
Assignees
Labels
bug Something isn't working

Comments

@tcNickolas
Copy link
Member

Describe the bug

When I debug code that doesn't have qubits allocated, the "Q# Circuit" panel correctly says "No qubits have been allocated", but the Quantum State is shown as |0> which corresponds to one qubit.

To Reproduce

Debug any operation that doesn't allocate qubits (for example, calculates classical values before anything quantum).

Expected behavior

No state shown - either no fields under "Quantum State", or a message saying "No qubits have been allocated"

System information

  • QDK 1.8.0
@tcNickolas tcNickolas added bug Something isn't working needs triage labels Sep 18, 2024
@swernli swernli self-assigned this Oct 8, 2024
swernli added a commit that referenced this issue Oct 8, 2024
Instead of showing a single bit zero state, this change makes the debugger quantum state view show a message when no qubits are allocated on the system:

Fixes #1922
github-merge-queue bot pushed a commit that referenced this issue Oct 16, 2024
Instead of showing a single bit zero state, this change makes the
debugger quantum state view show a message when no qubits are allocated
on the system:

![image](https://github.com/user-attachments/assets/25612e0f-a886-4396-b729-db5b90a7c160)

Fixes #1922
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants