






'''simple docstring'''

import math

import numpy as np
import qiskit
from qiskit import Aer, ClassicalRegister, QuantumCircuit, QuantumRegister, execute






def 	_UpperCAmelCase    (  a		:	int = 3							)			->			qiskit.result.counts.Counts:





						"""simple docstring"""
						if isinstance(a						,			a							):
												raise TypeError('number of qubits must be a integer.'							)
						if number_of_qubits <= 0:
												raise ValueError('number of qubits must be > 0.'							)
						if math.floor(a							) != number_of_qubits:
												raise ValueError('number of qubits must be exact integer.'							)
						if number_of_qubits > 1_0:
												raise ValueError('number of qubits too large to simulate(>10).'							)

						lowercase_      :   str        =			QuantumRegister(a						,			'qr'							)
						lowercase_      :   int        =			ClassicalRegister(a						,			'cr'							)

						lowercase_      :   Tuple        =			QuantumCircuit(a						,			a							)

						lowercase_      :   Union[str, Any]        =			number_of_qubits

						for i in range(a							):
												quantum_circuit.h(number_of_qubits - i - 1							)
												counter -= 1
												for j in range(a							):
																		quantum_circuit.cp(np.pi / 2 ** (counter - j)						,			a						,			a							)

						for k in range(number_of_qubits // 2							):
												quantum_circuit.swap(a						,			number_of_qubits - k - 1							)

						# measure all the qubits
						quantum_circuit.measure(a						,			a							)
						# simulate with 10000 shots
						lowercase_      :   int        =			Aer.get_backend('qasm_simulator'							)
						lowercase_      :   Tuple        =			execute(a						,			a						,			shots=1_0_0_0_0							)

						return job.result().get_counts(a							)


if __name__ == "__main__":
						print(
						    f"""Total count for quantum fourier transform state is: \
    {quantum_fourier_transform(3)}"""
						)








'''simple docstring'''

def 	_UpperCAmelCase    (  a		:	int						,			a		:	int							)			->			int:





						"""simple docstring"""
						while second != 0:
												lowercase_      :   Any        =			first & second
												first ^= second
												lowercase_      :   List[str]        =			c << 1
						return first


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						A:      Union[str, Any]  				=				int(input("Enter the first number: ").strip())
						A:      Union[str, Any]  				=				int(input("Enter the second number: ").strip())
						print(f"""{add(first, second) = }""")
