def apply_unitary(self, action: Any, axes: Sequence[int]) -> bool:
        """Apply unitary to state.

        Args:
            action: The value with a unitary to apply.
            axes: The axes on which to apply the unitary.
        Returns:
            True if the operation succeeded.
        """
        new_target_tensor = protocols.apply_unitary(
            action,
            protocols.ApplyUnitaryArgs(
                target_tensor=self._state_vector, available_buffer=self._buffer, axes=axes
            ),
            allow_decompose=False,
            default=NotImplemented,
        )
        if new_target_tensor is NotImplemented:
            return False
        self._swap_target_tensor_for(new_target_tensor)
        return True
Apply unitary to state.

        Args:
            action: The value with a unitary to apply.
            axes: The axes on which to apply the unitary.
        Returns:
            True if the operation succeeded.
        
cirq-core/cirq/sim/state_vector_simulation_state.py