




"""simple docstring"""




import qiskit



def 					a__				(       snake_case__ ,				snake_case__       )		->      qiskit.result.counts.Counts:
			lowerCamelCase       =      qiskit.Aer.get_backend("""aer_simulator"""       )

			lowerCamelCase       =      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
			lowerCamelCase       =      qiskit.execute(snake_case__ ,				snake_case__ ,				shots=10_00       )

			# 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"""




from functools import lru_cache



def 					a__				(       snake_case__       )		->      set:
			lowerCamelCase       =      2
			lowerCamelCase       =      set()
			while i * i <= n:
						if n % i:
									i += 1
						else:
									n //= i
									factors.add(snake_case__       )
			if n > 1:
						factors.add(snake_case__       )
			return factors



@lru_cache
def 					a__				(       snake_case__       )		->      int:
			return len(unique_prime_factors(snake_case__       )       )



def 					a__				(       snake_case__       )		->      bool:
			return len(set(snake_case__       )       ) in (0, 1)



def 					a__				(       snake_case__       )		->      list:
			lowerCamelCase       =      2

			while True:
						# Increment each value of a generated range
						lowerCamelCase       =      [base + i for i in range(snake_case__       )]

						# Run elements through out unique_prime_factors function
						# Append our target number to the end.
						lowerCamelCase       =      [upf_len(snake_case__       ) for x in group]
						checker.append(snake_case__       )

						# If all numbers in the list are equal, return the group variable.
						if equality(snake_case__       ):
									return group

						# Increment our base variable by 1
						base += 1



def 					a__				(       snake_case__ = 4       )		->      int:
			lowerCamelCase       =      run(snake_case__       )
			return results[0] if len(snake_case__       ) else None


if __name__ == "__main__":
					print(solution())



