# cirq.QubitOrder¶

class cirq.QubitOrder(explicit_func: Callable[Iterable[cirq.ops.raw_types.Qid], Tuple[cirq.ops.raw_types.Qid, …]])[source]

Defines the kronecker product order of qubits.

__init__(explicit_func: Callable[Iterable[cirq.ops.raw_types.Qid], Tuple[cirq.ops.raw_types.Qid, …]]) → None[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

 Converts a value into a basis. explicit(fixed_qubits[, fallback]) A basis that contains exactly the given qubits in the given order. map(internalize, externalize) Transforms the Basis so that it applies to wrapped qubits. order_for(qubits) Returns a qubit tuple ordered corresponding to the basis. sorted_by(key) A basis that orders qubits ascending based on a key function.

Attributes

 DEFAULT A basis that orders qubits in the same way that calling sorted does.