






"""simple docstring"""



import qiskit


def 	SCREAMING_SNAKE_CASE__       (  snake_case       : int			,					snake_case       : int				)->		qiskit.result.counts.Counts:






     '''simple docstring'''



     UpperCAmelCase__						:    List[Any]							=							qiskit.Aer.get_backend("aer_simulator"				)

     UpperCAmelCase__						:    int							=							qiskit.QuantumCircuit(4			,					2				)
     # encode inputs in qubits 0 and 1
     if bita == 1:
          qc_ha.x(0				)
     if bita == 1:
          qc_ha.x(1				)
     qc_ha.barrier()

     # use cnots to write XOR of the inputs on qubit2
     qc_ha.cx(0			,					2				)
     qc_ha.cx(1			,					2				)

     # use ccx / toffoli gate to write AND of the inputs on qubit3
     qc_ha.ccx(0			,					1			,					3				)
     qc_ha.barrier()

     # extract outputs
     qc_ha.measure(2			,					0				)  # extract XOR value
     qc_ha.measure(3			,					1				)  # extract AND value

     # Execute the circuit on the qasm simulator
     UpperCAmelCase__						:    Union[str, Any]							=							qiskit.execute(snake_case			,					snake_case			,					shots=1000				)

     # Return the histogram data of the results of the experiment
     return job.result().get_counts(snake_case				)


if __name__ == "__main__":
 _lowerCAmelCase	:	Tuple				=      half_adder(1, 1)
 print(F"""Half Adder Output Qubit Counts: {counts}""")










"""simple docstring"""



def 	SCREAMING_SNAKE_CASE__       (  snake_case       : Tuple				)->		str:






     '''simple docstring'''



     UpperCAmelCase__						:    List[str]							=							len(snake_case				)
     for i in range(length - 1				):
          UpperCAmelCase__						:    Any							=							i
          for k in range(i + 1			,					snake_case				):
               if collection[k] < collection[least]:
                    UpperCAmelCase__						:    Union[str, Any]							=							k
          if least != i:
               UpperCAmelCase__							,				UpperCAmelCase__						:    Union[str, Any]							=							(collection[i], collection[least])
     return collection


if __name__ == "__main__":
 _lowerCAmelCase	:	List[str]				=      input("""Enter numbers separated by a comma:\n""").strip()
 _lowerCAmelCase	:	Optional[int]				=      [int(item) for item in user_input.split(""",""")]
 print(selection_sort(unsorted))


