You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems this function is just looking at _BASIS_1Q which doesn't include rz (and shouldn't, IMO).
Presumably this issue extends to other parameterized gates.
A possible fix would be to instead have an option in CollectCliffords which attempts to cast it as a Clifford. Since this would likely come at a performance hit, it should probably be False by default.
E.g.
def_is_clifford_gate(node, try_harder: bool=False):
"""Specifies whether a node holds a clifford gate."""ifgetattr(node.op, "condition", None) isnotNone:
returnFalseifnode.op.nameinclifford_gate_names:
returnTrueifnottry_harder:
returnFalsetry:
Clifford(node.op)
returnTrueexcept:
returnFalse
The text was updated successfully, but these errors were encountered:
Environment
What is happening?
rz
gates are ignored by theCollectCliffords
pass (regardless of angle), when it could potentially collect them.How can we reproduce the issue?
What should happen?
There should be a single instruction in the resulting circuit, however I get
Any suggestions?
It seems this function is just looking at
_BASIS_1Q
which doesn't includerz
(and shouldn't, IMO).Presumably this issue extends to other parameterized gates.
A possible fix would be to instead have an option in
CollectCliffords
which attempts to cast it as aClifford
. Since this would likely come at a performance hit, it should probably beFalse
by default.E.g.
The text was updated successfully, but these errors were encountered: