def __init__(self, qubit_noise_gate: cirq.Gate, prepend: bool = False):
        """Noise model which applies a specific gate as noise to all gates.

        Args:
            qubit_noise_gate: The "noise" gate to use.
            prepend: If True, put noise before affected gates. Default: False.

        Raises:
            ValueError: if qubit_noise_gate is not a single-qubit gate.
        """
        if qubit_noise_gate.num_qubits() != 1:
            raise ValueError('noise.num_qubits() != 1')
        self.qubit_noise_gate = qubit_noise_gate
        self._prepend = prepend
Noise model which applies a specific gate as noise to all gates.

        Args:
            qubit_noise_gate: The "noise" gate to use.
            prepend: If True, put noise before affected gates. Default: False.

        Raises:
            ValueError: if qubit_noise_gate is not a single-qubit gate.
        
cirq-core/cirq/devices/noise_model.py