Skip to content

Commit 65acb76

Browse files
authored
Change Clifford String to Pauli String (#224)
Per yesterday's meeting Scientific Software meeting agreement, the Clifford string operator should be restricted to just Pauli's. @weinbe58 @Roger-luo I know there were several methods mentioned to translating the string into an actual `OpType` that can be used in other statements, ranging from lowering, canonicalization rewrite, etc. What is the _exact_ approach that should be taken for this? I'd like to open an issue to keep track of the infrastructure required for this. cc: @cduck @kaihsin
1 parent 26f7dde commit 65acb76

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bloqade/squin/op/stmts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ class PauliOp(ConstantUnitary):
147147

148148

149149
@statement(dialect=dialect)
150-
class CliffordString(ConstantUnitary):
150+
class PauliString(ConstantUnitary):
151151
traits = frozenset({ir.Pure(), lowering.FromPythonCall(), Unitary(), HasSites()})
152152
string: str = info.attribute()
153153

154154
def verify(self) -> None:
155-
if not set("XYZHS").issuperset(self.string):
155+
if not set("XYZ").issuperset(self.string):
156156
raise ValueError(
157-
f"Invalid Clifford string: {self.string}. Must be a combination of 'X', 'Y', 'Z', 'H', and 'S'."
157+
f"Invalid Pauli string: {self.string}. Must be a combination of 'X', 'Y', and 'Z'."
158158
)
159159

160160

0 commit comments

Comments
 (0)