def _mutated(self, *, preserve_placement_cache=False) -> None:
        """Clear cached properties in response to this circuit being mutated."""
        self._all_qubits = None
        self._frozen = None
        self._is_measurement = None
        self._is_parameterized = None
        self._parameter_names = None
        if not preserve_placement_cache:
            self._placement_cache = None
Clear cached properties in response to this circuit being mutated.
cirq-core/cirq/circuits/circuit.py