def __init__(
        self, linear_dict: value.LinearDict[frozenset[tuple[raw_types.Qid, int]]] | None = None
    ):
        """Constructor for ProjectorSum

        Args:
            linear_dict: A linear dictionary from a set of tuples of (Qubit, integer) to a complex
                number. The tuple is a projector onto the qubit and the complex number is the
                weight of these projections.
        """
        self._linear_dict: value.LinearDict[frozenset[tuple[raw_types.Qid, int]]] = (
            linear_dict if linear_dict is not None else value.LinearDict({})
        )
Constructor for ProjectorSum

        Args:
            linear_dict: A linear dictionary from a set of tuples of (Qubit, integer) to a complex
                number. The tuple is a projector onto the qubit and the complex number is the
                weight of these projections.
        
cirq-core/cirq/ops/linear_combinations.py