Skip to content

Make quantum values a linear type - #1612

Merged
schweitzpgi merged 2 commits into
NVIDIA:mainfrom
schweitzpgi:ch-if.update
May 8, 2024
Merged

Make quantum values a linear type#1612
schweitzpgi merged 2 commits into
NVIDIA:mainfrom
schweitzpgi:ch-if.update

Conversation

@schweitzpgi

@schweitzpgi schweitzpgi commented May 6, 2024

Copy link
Copy Markdown
Collaborator

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

github-actions Bot commented May 6, 2024

Copy link
Copy Markdown

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

github-actions Bot commented May 6, 2024

Copy link
Copy Markdown

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
Comment thread include/cudaq/Optimizer/Dialect/CC/CCOps.td
Comment thread lib/Optimizer/Dialect/CC/CCOps.cpp
github-actions Bot pushed a commit that referenced this pull request May 7, 2024
@github-actions

github-actions Bot commented May 7, 2024

Copy link
Copy Markdown

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

github-actions Bot commented May 7, 2024

Copy link
Copy Markdown

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

@schweitzpgi

schweitzpgi commented May 7, 2024

Copy link
Copy Markdown
Collaborator Author

/ok to test

Command Bot: Processing...

@github-actions

github-actions Bot commented May 8, 2024

Copy link
Copy Markdown

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 closed this May 8, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators May 8, 2024
@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