def _select_best_remaining_qubit(self, prog_qubit):
reliab_store = {}<EOL>for hw_qubit in self.available_hw_qubits:<EOL><INDENT>reliab = <NUM_LIT:1><EOL>for n in self.prog_graph.neighbors(prog_qubit):<EOL><INDENT>if n in self.prog2hw:<EOL><INDENT>reliab *= self.swap_costs[self.prog2hw[n]][hw_qubit]<EOL><DEDENT><DEDENT>reliab *= self.readout_errors[hw_qubit]<EOL>reliab_store[hw_qubit] = reliab<EOL><DEDENT>max_reliab = <NUM_LIT:0><EOL>best_hw_qubit = None<EOL>for hw_qubit in reliab_store:<EOL><INDENT>if reliab_store[hw_qubit] > max_reliab:<EOL><INDENT>max_reliab = reliab_store[hw_qubit]<EOL>best_hw_qubit = hw_qubit<EOL><DEDENT><DEDENT>return best_hw_qubit<EOL>
Select the best remaining hardware qubit for the next program qubit.