cirq.op_gate_of_type

cirq.op_gate_of_type(op: Any, gate_type: Type[TV]) → Optional[TV][source]

THIS FUNCTION IS DEPRECATED.

IT WILL BE REMOVED IN cirq v0.7.0.

use: op.gate if isinstance(op.gate, gate_type) else None

Returns gate of given type, if op has that gate otherwise None.