
import qiskit



def        UpperCamelCase    (							lowerCAmelCase__ ,			lowerCAmelCase__		):
					'''simple docstring'''
					lowercase							=						qiskit.Aer.get_backend('''aer_simulator'''		)

					# Create a Quantum Circuit acting on the q register
					lowercase							=						qiskit.QuantumCircuit(lowerCAmelCase__ ,			lowerCAmelCase__		)

					# Apply X (NOT) Gate to Qubits 0 & 1
					circuit.x(0		)
					circuit.x(1		)

					# Map the quantum measurement to the classical bits
					circuit.measure([0, 1] ,			[0, 1]		)

					# Execute the circuit on the qasm simulator
					lowercase							=						qiskit.execute(lowerCAmelCase__ ,			lowerCAmelCase__ ,			shots=1000		)

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


if __name__ == "__main__":
							lowercase__		:str   =    single_qubit_measure(2, 2)
							print(F'Total count for various states are: {counts}')






from functools import lru_cache



@lru_cache
def        UpperCamelCase    (							lowerCAmelCase__		):
					'''simple docstring'''
					if num < 0:
										raise ValueError('''Number should not be negative.'''		)

					return 1 if num in (0, 1) else num * factorial(num - 1		)


if __name__ == "__main__":
							import doctest

							doctest.testmod()




