def _map_to_processors(self, f, objective):
        """Map a function to a list of processors, and return the output that
        best satisfies a transitive objective function.  The list of
        processors will differ according to the number of evil qubits and
        :func:`_proc_limit`, see details in :func:`self._random_subprocessors`.

        INPUT:
            f (callable): the function to call on each processor

            objective (callable): a function where objective(x,y) is True if x is
                better than y, and False otherwise.  Assumes transitivity!

        OUTPUT:
            best: the object returned by f that maximizes the objective.
        """

        P = self._random_subprocessors()
        best = f(next(P))
        for p in P:
            x = f(p)
            if objective(best, x):
                best = x
        return best[1]
Map a function to a list of processors, and return the output that
        best satisfies a transitive objective function.  The list of
        processors will differ according to the number of evil qubits and
        :func:`_proc_limit`, see details in :func:`self._random_subprocessors`.

        INPUT:
            f (callable): the function to call on each processor

            objective (callable): a function where objective(x,y) is True if x is
                better than y, and False otherwise.  Assumes transitivity!

        OUTPUT:
            best: the object returned by f that maximizes the objective.