-
Notifications
You must be signed in to change notification settings - Fork 9
dialects: (qft) initialise dialect #67
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
base: main
Are you sure you want to change the base?
Conversation
| class QFTAttr(GateAttr): | ||
| name = "qft.n" | ||
|
|
||
| num_qubits_param: ParameterDef[IntAttr] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| num_qubits_param: ParameterDef[IntAttr] | |
| qubits: ParameterDef[IntAttr] |
Would this be simpler?
|
|
||
| @irdl_attr_definition | ||
| class QFTAttr(GateAttr): | ||
| name = "qft.n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alternative to this would be to have an algorithm or algo dialect and put qft inside. Do you see anything else being in this dialect?
|
|
||
| "test.op"() {gate = #qft.n<5>} : () -> () | ||
|
|
||
| // CHECK: "test.op"() {gate = #qft.n<5>} : () -> () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could have a test with a use of the gate to check that number of qubits is working correctly
|
@kimxworrall what's the plan with this? |
Add a QFT dialect with the same motivation as the QEC dialect.
Adds the QFT GateAttr which has an integer parameter - this indicates the number of qubits the gate this attr is attached to acts on.