def __init__(self, sub_gate: cirq.Gate, num_copies: int) -> None:
        """Inits ParallelGate.

        Args:
            sub_gate: The gate to apply.
            num_copies: Number of copies of the gate to apply in parallel.

        Raises:
            ValueError: If gate is not a single qubit gate or num_copies <= 0.
        """
        if sub_gate.num_qubits() != 1:
            # TODO: If needed, support for multi-qubit sub_gates can be
            # added by updating the circuit diagram plotting logic.
            raise ValueError("gate must be a single qubit gate")
        if not num_copies > 0:
            raise ValueError("gate must be applied at least once.")
        self._sub_gate = sub_gate
        self._num_copies = num_copies
Inits ParallelGate.

        Args:
            sub_gate: The gate to apply.
            num_copies: Number of copies of the gate to apply in parallel.

        Raises:
            ValueError: If gate is not a single qubit gate or num_copies <= 0.
        
cirq-core/cirq/ops/parallel_gate.py