def __init__(
        self, num_qubits: int, permutation: dict[int, int], swap_gate: cirq.Gate = ops.SWAP
    ) -> None:
        """Initializes a linear permutation gate.

        Args:
            num_qubits: The number of qubits to permute.
            permutation: The permutation effected by the gate.
            swap_gate: The swap gate used in decompositions.
        """
        super().__init__(num_qubits, swap_gate)
        PermutationGate.validate_permutation(permutation, num_qubits)
        self._permutation = permutation
Initializes a linear permutation gate.

        Args:
            num_qubits: The number of qubits to permute.
            permutation: The permutation effected by the gate.
            swap_gate: The swap gate used in decompositions.
        
cirq-core/cirq/contrib/acquaintance/permutation.py