|View source on GitHub|
Greedily group settings which can be simultaneously measured.
cirq.work.group_settings_greedy( settings: Iterable[
cirq.work.InitObsSetting] ) -> Dict[InitObsSetting, List[InitObsSetting]]
We construct a dictionary keyed by
max_setting (see docstrings
_max_weight_observable) where the value
is a list of settings compatible with
max_setting. For each new setting,
we try to find an existing group to add it and update
that group if necessary. Otherwise, we make a new group.
In practice, this greedy algorithm performs comparably to something more complicated by solving the clique cover problem on a graph of simultaneously-measurable settings.
||The settings to group.|
A dictionary keyed by