KEMBAR78
Make quantum values a linear type by schweitzpgi · Pull Request #1612 · NVIDIA/cuda-quantum · GitHub
Skip to content

Conversation

@schweitzpgi
Copy link
Collaborator

@schweitzpgi schweitzpgi commented May 6, 2024

A quantum type (!quake.wire) is a linear type. While this constraint was widely enforced previously, it was exempted when the linear value reached a control-flow conditional. This patch closes that loophole.

  • Add a new Linear type trait to be used with high-level conditionals that are conceptually conditional control-flow. (cc.if)
  • Modify cc.if to use the linear type trait. Implement parser and pretty printer, to support the sigma arguments on the blocks.
  • Add roundtrip test.
  • Fix check lines in existing tests.

@github-actions
Copy link

github-actions bot commented May 6, 2024

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

github-actions bot pushed a commit that referenced this pull request May 6, 2024
@github-actions
Copy link

github-actions bot commented May 6, 2024

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

github-actions bot pushed a commit that referenced this pull request May 6, 2024
@schweitzpgi schweitzpgi enabled auto-merge (squash) May 6, 2024 18:41
@schweitzpgi schweitzpgi force-pushed the ch-if.update branch 3 times, most recently from f785909 to e7e6c50 Compare May 7, 2024 19:34
github-actions bot pushed a commit that referenced this pull request May 7, 2024
@github-actions
Copy link

github-actions bot commented May 7, 2024

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

github-actions bot pushed a commit that referenced this pull request May 7, 2024
@github-actions
Copy link

github-actions bot commented May 7, 2024

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

@schweitzpgi
Copy link
Collaborator Author

schweitzpgi commented May 7, 2024

/ok to test

Command Bot: Processing...

@schweitzpgi schweitzpgi force-pushed the ch-if.update branch 2 times, most recently from 33e5812 to 1f3b277 Compare May 8, 2024 15:01
@github-actions
Copy link

github-actions bot commented May 8, 2024

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

github-actions bot pushed a commit that referenced this pull request May 8, 2024
A quantum type (!quake.wire) is a linear type. While this constraint was
widely enforced previously, it was exempted when the linear value
reached a control-flow conditional. This patch closes that loophole.

- Add a new Linear type trait to be used with high-level conditionals
  that are conceptually conditional control-flow. (cc.if)
- Modify cc.if to use the linear type trait. Implement parser and pretty
  printer, to support the sigma arguments on the blocks.
- Add roundtrip test.
- Fix check lines in existing tests.
@schweitzpgi schweitzpgi merged commit b94ee5a into NVIDIA:main May 8, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2024
@schweitzpgi schweitzpgi deleted the ch-if.update branch May 8, 2024 17:51
@bettinaheim bettinaheim added this to the release 0.8.0 milestone May 10, 2024
@bettinaheim bettinaheim changed the title [Core] Completes making quantum values a linear type. Completes making quantum values a linear type Jul 29, 2024
@bettinaheim bettinaheim changed the title Completes making quantum values a linear type Make quantum values a linear type Jul 29, 2024
@bettinaheim bettinaheim added the release notes Changes need to be captured in the release notes label Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release notes Changes need to be captured in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants