def __init__(
        self,
        *gates: type[raw_types.Gate] | raw_types.Gate | GateFamily,
        name: str | None = None,
        unroll_circuit_op: bool = True,
    ) -> None:
        """Init Gateset.

        Accepts a list of gates, each of which should be either

        - `cirq.Gate` subclass
        - `cirq.Gate` instance
        - `cirq.GateFamily` instance

        `cirq.Gate` subclasses and instances are converted to the default
        `cirq.GateFamily(gate=g)` instance and thus a default name and
        description is populated.

        Args:
            *gates: A list of `cirq.Gate` subclasses / `cirq.Gate` instances /
                `cirq.GateFamily` instances to initialize the Gateset.
            name: (Optional) Name for the Gateset. Useful for description.
            unroll_circuit_op: If True, `cirq.CircuitOperation` is recursively
                validated by validating the underlying `cirq.Circuit`.
        """
        self._name = name
        self._unroll_circuit_op = unroll_circuit_op
        self._instance_gate_families: dict[raw_types.Gate, GateFamily] = {}
        self._type_gate_families: dict[type[raw_types.Gate], GateFamily] = {}
        self._gates_repr_str = ", ".join([_gate_str(g, repr) for g in gates])
        unique_gate_list: list[GateFamily] = list(
            dict.fromkeys(g if isinstance(g, GateFamily) else GateFamily(gate=g) for g in gates)
        )

        for g in unique_gate_list:
            if type(g) is GateFamily and not (g.tags_to_ignore or g.tags_to_accept):
                if isinstance(g.gate, raw_types.Gate):
                    self._instance_gate_families[g.gate] = g
                else:
                    self._type_gate_families[g.gate] = g
        self._unique_gate_list = unique_gate_list
        self._gates = frozenset(unique_gate_list)
Init Gateset.

        Accepts a list of gates, each of which should be either

        - `cirq.Gate` subclass
        - `cirq.Gate` instance
        - `cirq.GateFamily` instance

        `cirq.Gate` subclasses and instances are converted to the default
        `cirq.GateFamily(gate=g)` instance and thus a default name and
        description is populated.

        Args:
            *gates: A list of `cirq.Gate` subclasses / `cirq.Gate` instances /
                `cirq.GateFamily` instances to initialize the Gateset.
            name: (Optional) Name for the Gateset. Useful for description.
            unroll_circuit_op: If True, `cirq.CircuitOperation` is recursively
                validated by validating the underlying `cirq.Circuit`.
        
cirq-core/cirq/ops/gateset.py