Skip to content

[MLIR] Add postselect to assembly format for measure op #1699

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

erick-xanadu
Copy link
Contributor

Context:

Description of the Change: add postselect to assembly format

Benefits: easier xDSL generation from table gen

Possible Drawbacks: None

Related GitHub Issues: Fixes #1690

@joeycarter
Copy link
Contributor

I suppose if we add the postselect attribute to the assembly format here we should also add it to the new measure_in_basis op for MBQC:

let assemblyFormat = [{
`[` $plane `,` $angle `]` $in_qubit attr-dict `:` type(results)
}];

e.g.

`[` $plane `,` $angle `]` $in_qubit (`postselect` $postselect^)? attr-dict `:` type(results)

…1699 (#1732)

**Context:** 

**Description of the Change:** add postselect to assembly format to
MeasureOp in QuantumOps and MeasureInBasisOp in MBQCOps

**Benefits:** easier xDSL generation from table gen

**Possible Drawbacks:** None

**Related GitHub Issues:** Fixes #1690, #1699
Copy link
Member

@paul0403 paul0403 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@paul0403
Copy link
Member

paul0403 commented May 9, 2025

I suppose if we add the postselect attribute to the assembly format here we should also add it to the new measure_in_basis op for MBQC:

let assemblyFormat = [{
`[` $plane `,` $angle `]` $in_qubit attr-dict `:` type(results)
}];

e.g.

`[` $plane `,` $angle `]` $in_qubit (`postselect` $postselect^)? attr-dict `:` type(results)

44844b4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postselect missing from assemblyFormat in MeasureOp
4 participants