openfermion.transforms.prune_unused_indices

Remove indices that do not appear in any terms.

Indices will be renumbered such that if an index i does not appear in any terms, then the next largest index that appears in at least one term will be renumbered to i.