Skip to content

Conversation

@paul0403
Copy link
Member

@paul0403 paul0403 commented Dec 21, 2025

Context:
There will be 3 PRs on reference semantics quantum dialect.

  1. This one. It adds the dialect and ops themselves.
  2. A conversion from reference semantics quantum dialect to value semantics quantum dialect (aka the "regular" quantum dialect)
  3. Lowering rules from plxpr primitives to reference semantics quantum dialect.

Ideally there will be a fourth PR:
4. A conversion from value dialect to reference dialect.

But depending on time/complexity/workload/priority, we might need to drop some of them this quarter.

Description of the Change:
Here's the list of all operations in the regular quantum dialect that uses QubitType or QuregType values as inputs/outputs:

  • AllocOp
  • DeallocOp
  • AllocQubitOp
  • DeallocQubitOp
  • ExtractOp (not meaningful in reference semantics)
  • InsertOp (not meaningful in reference semantics)
  • SetStateOp
  • SetBasisStateOp
  • CustomOp
  • PauliRotOp
  • GlobalPhaseOp
  • MultiRZOp
  • PCPhaseOp
  • QubitUnitaryOp
  • ComputationalBasisOp
  • NamedObsOp
  • HermitianOp
  • MeasureOp
  • AdjointOp
  • YieldOp

Benefits:

Possible Drawbacks:

Related GitHub Issues:

[sc-105532]

@paul0403 paul0403 added the wip PRs that are a Work-In-Progress label Dec 21, 2025
@dime10
Copy link
Contributor

dime10 commented Dec 22, 2025

Nice!

A conversion from reference semantics quantum dialect to value semantics quantum dialect (aka the "regular" quantum dialect)

I'd say we would want conversions in both directions ideally, that way the ref dialect can be used more flexibly. Although the ref->value at least allows us to simplify the frontend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge wip PRs that are a Work-In-Progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants