cirq.QubitOrder.sorted_by

static QubitOrder.sorted_by(key: Callable[cirq.ops.raw_types.QubitId, Any]) → cirq.ops.qubit_order.QubitOrder[source]

A basis that orders qubits ascending based on a key function.

Parameters:key – A function that takes a qubit and returns a key value. The basis will be ordered ascending according to these key values.
Returns:A basis that orders qubits ascending based on a key function.