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

Support AllowAtMostNQubits operation to limit the number of qubits allocated in the code #1155

Closed
tcNickolas opened this issue Feb 13, 2024 · 0 comments · Fixed by #1800
Closed
Assignees
Labels
enhancement New feature or request

Comments

@tcNickolas
Copy link
Member

Is your feature request related to a problem? Please describe.
Classic QDK supported AllowAtMostNQubits operation that restricted the number of qubits that could be allocated in the code.

This functionality was broadly used in the Quantum Katas, for example, to make sure the phase oracle is implemented without the phase kickback trick, or to limit the number of auxiliary qubits allocated by a reversible computing task. This is especially important in automatically graded programming assignments in which I really want to check whether the solution violates the requirements imposed by the task.

Describe the solution you'd like
A similar functionality in the modern QDK.

Describe alternatives you've considered
I don't have an alternative implementation for this functionality. In the classic QDK, there used to be a way to write a custom simulator that could do that that predated AllowAtMostNQubits, but this is not supported in the modern QDK.

@tcNickolas tcNickolas added enhancement New feature or request needs triage labels Feb 13, 2024
@sezna sezna removed the needs triage label Mar 4, 2024
@swernli swernli self-assigned this Jul 23, 2024
swernli added a commit that referenced this issue Jul 29, 2024
This introduces qubit count tracking APIs to the Diagnostics namespace that allow Q# code to get counts for how many unique qubits are used during a section of execution. This is useful in katas and auto-grading scenarios to verify that exercise restrictions are being appropriately followed.

Fixes #1155
swernli added a commit that referenced this issue Aug 5, 2024
This introduces qubit count tracking APIs to the Diagnostics namespace that allow Q# code to get counts for how many unique qubits are used during a section of execution. This is useful in katas and auto-grading scenarios to verify that exercise restrictions are being appropriately followed.

Fixes #1155
swernli added a commit that referenced this issue Aug 5, 2024
This introduces qubit count tracking APIs to the Diagnostics namespace that allow Q# code to get counts for how many unique qubits are used during a section of execution. This is useful in katas and auto-grading scenarios to verify that exercise restrictions are being appropriately followed.

Fixes #1155
swernli added a commit that referenced this issue Aug 15, 2024
This introduces qubit count tracking APIs to the Diagnostics namespace that allow Q# code to get counts for how many unique qubits are used during a section of execution. This is useful in katas and auto-grading scenarios to verify that exercise restrictions are being appropriately followed.

Fixes #1155
swernli added a commit that referenced this issue Aug 15, 2024
This introduces qubit count tracking APIs to the Diagnostics namespace that allow Q# code to get counts for how many unique qubits are used during a section of execution. This is useful in katas and auto-grading scenarios to verify that exercise restrictions are being appropriately followed.

Fixes #1155
github-merge-queue bot pushed a commit that referenced this issue Aug 15, 2024
This introduces qubit count tracking APIs to the Diagnostics namespace
that allow Q# code to get counts for how many unique qubits are used
during a section of execution. This is useful in katas and auto-grading
scenarios to verify that exercise restrictions are being appropriately
followed.

Fixes #1155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants