ffsim.SupportsTrace¶ class ffsim.SupportsTrace(*args, **kwargs)[source]¶ Bases: Protocol A linear operator whose trace can be computed. Methods _trace_(norb, nelec) Return the trace of the linear operator. _trace_(norb, nelec)[source]¶ Return the trace of the linear operator. Parameters: norb (int) – The number of spatial orbitals. nelec (int | tuple[int, int]) – The number of alpha and beta electrons. Return type: float Returns: The trace of the linear operator.