def explicit(
        fixed_qubits: Iterable[cirq.Qid], fallback: QubitOrder | None = None
    ) -> QubitOrder:
        """A basis that contains exactly the given qubits in the given order.

        Args:
            fixed_qubits: The qubits in basis order.
            fallback: A fallback order to use for extra qubits not in the
                fixed_qubits list. Extra qubits will always come after the
                fixed_qubits, but will be ordered based on the fallback. If no
                fallback is specified, a ValueError is raised when extra qubits
                are specified.

        Returns:
            A Basis instance that forces the given qubits in the given order.

        Raises:
            ValueError: If a qubit appears twice in `fixed_qubits`, or there were is no fallback
                specified but there are extra qubits.
        """
        result = tuple(fixed_qubits)
        if len(set(result)) < len(result):
            raise ValueError(f'Qubits appear in fixed_order twice: {result}.')

        def func(qubits):
            remaining = set(qubits) - set(result)
            if not remaining:
                return result
            if not fallback:
                raise ValueError(f'Unexpected extra qubits: {remaining}.')
            return result + fallback.order_for(remaining)

        return QubitOrder(func)
A basis that contains exactly the given qubits in the given order.

        Args:
            fixed_qubits: The qubits in basis order.
            fallback: A fallback order to use for extra qubits not in the
                fixed_qubits list. Extra qubits will always come after the
                fixed_qubits, but will be ordered based on the fallback. If no
                fallback is specified, a ValueError is raised when extra qubits
                are specified.

        Returns:
            A Basis instance that forces the given qubits in the given order.

        Raises:
            ValueError: If a qubit appears twice in `fixed_qubits`, or there were is no fallback
                specified but there are extra qubits.
        
cirq-core/cirq/ops/qubit_order.py