Skip to content

Commit ccab126

Browse files
authored
Remove AnyTypeOf in YieldOp since it only uses a single type (#1696)
**Context:** `AnyTypeOf` is used to describe a set of types. `YieldOp` uses `AnyTypeOf` but the set has size of 1. **Description of the Change:** Remove the use of `AnyTypeOf`. **Benefits:** Easier xDSL generation. **Possible Drawbacks:** None **Related GitHub Issues:** None This has no impact on the user or the API. Not sure if a changelog is needed, but added one. Happy to discuss about it.
1 parent e89b83d commit ccab126

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

doc/releases/changelog-dev.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@
7171
* The utility function `EnsureFunctionDeclaration` is refactored into the `Utils` of the `Catalyst` dialect, instead of being duplicated in each individual dialect.
7272
[(#1683)](https://github.com/PennyLaneAI/catalyst/pull/1683)
7373

74+
* Improved the definition of `YieldOp` in the quantum dialect by removing `AnyTypeOf`
75+
[(#1696)](https://github.com/PennyLaneAI/catalyst/pull/1696)
76+
7477
<h3>Documentation 📝</h3>
7578

7679
<h3>Contributors ✍️</h3>

mlir/include/Quantum/IR/QuantumOps.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ def YieldOp : Quantum_Op<"yield", [Pure, ReturnLike, Terminator, ParentOneOf<["A
619619
let summary = "Return results from quantum program regions";
620620

621621
let arguments = (ins
622-
Variadic<AnyTypeOf<[QuregType]>>:$results
622+
Variadic<QuregType>:$results
623623
);
624624

625625
let assemblyFormat = [{

0 commit comments

Comments
 (0)