We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
dagger
1 parent 19dd7b3 commit be20002Copy full SHA for be20002
src/bloqade/stim/rewrite/qubit_to_stim.py
@@ -80,7 +80,13 @@ def rewrite_SingleQubitGate(
80
stim_stmt_cls = getattr(stim_gate.stmts, stmt_name, None)
81
if stim_stmt_cls is None:
82
return RewriteResult()
83
- stim_stmt = stim_stmt_cls(targets=tuple(qubit_idx_ssas))
+
84
+ if isinstance(stmt, gate.stmts.SingleQubitNonHermitianGate):
85
+ stim_stmt = stim_stmt_cls(
86
+ targets=tuple(qubit_idx_ssas), dagger=stmt.adjoint
87
+ )
88
+ else:
89
+ stim_stmt = stim_stmt_cls(targets=tuple(qubit_idx_ssas))
90
stmt.replace_by(stim_stmt)
91
92
return RewriteResult(has_done_something=True)
0 commit comments