def _simulate_unitary(self, op: ops.Operation, data: _StateAndBuffer,
            indices: List[int]) -> None:
        """Simulate an op that has a unitary."""
        result = protocols.apply_unitary(
                op,
                args=protocols.ApplyUnitaryArgs(
                        data.state,
                        data.buffer,
                        indices))
        if result is data.buffer:
            data.buffer = data.state
        data.state = result
def _simulate_unitary ( self , op : ops . Operation , data : _StateAndBuffer , indices : List [ int ] ) -> None : result = protocols . apply_unitary ( op , args = protocols . ApplyUnitaryArgs ( data . state , data . buffer , indices ) ) if result is data . buffer : data . buffer = data . state data . state = result
Simulate an op that has a unitary.