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
Simulating the inverse of a gate that uses sympy Symbols as arguments causes a "Simulator doesn't support" Type Error, if the gate inherits its pow magic method from cirq.Gate. Of particular note is the cirq.PhasedFSimGate, which decomposes into the cirq.FSimGate and some cirq.Z gates. The cirq.FSimGate has it's own pow method implemented, and can correctly be inverted and simulated when using sympy arguments. It seems likely that somewhere in the pipeline, the _InverseCompositeGate produced by cirq.Gate's pow is being rejected as an unsupported gate instead of being decomposed, due to it's use of sympy arguments. @tanujkhattar, can you provide more insight on this?
Replication: Create a circuit with an inverse PhasedFSimGate that uses sympy arguments and attempt to simulate it. This issue doesn't occur with FSimGate, which is the primary component of PhasedFSimGate's decomposition.
Simulating the inverse of a gate that uses sympy Symbols as arguments causes a "Simulator doesn't support" Type Error, if the gate inherits its pow magic method from
cirq.Gate
. Of particular note is thecirq.PhasedFSimGate
, which decomposes into thecirq.FSimGate
and somecirq.Z
gates. Thecirq.FSimGate
has it's own pow method implemented, and can correctly be inverted and simulated when using sympy arguments. It seems likely that somewhere in the pipeline, the _InverseCompositeGate produced bycirq.Gate
's pow is being rejected as an unsupported gate instead of being decomposed, due to it's use of sympy arguments. @tanujkhattar, can you provide more insight on this?Replication: Create a circuit with an inverse PhasedFSimGate that uses sympy arguments and attempt to simulate it. This issue doesn't occur with FSimGate, which is the primary component of PhasedFSimGate's decomposition.
Output log
Cirq version
0.14.0.dev20211110190326
The text was updated successfully, but these errors were encountered: