




"""simple docstring"""






def 	_snake_case     (							lowercase__				,       lowercase__				,       lowercase__						):

				if exponent == 1:
								return base
				if exponent % 2 == 0:
								_lowerCamelCase	:     Optional[int]       =       _modexpt(lowercase__				,       exponent // 2				,       lowercase__						) % modulo_value
								return (x * x) % modulo_value
				else:
								return (base * _modexpt(lowercase__				,       exponent - 1				,       lowercase__						)) % modulo_value







def 	_snake_case     (							lowercase__ = 1777				,       lowercase__ = 1855				,       lowercase__ = 8						):
				_lowerCamelCase	:     Optional[int]       =       base
				for _ in range(1				,       lowercase__						):
								_lowerCamelCase	:     List[str]       =       _modexpt(lowercase__				,       lowercase__				,       10**digits						)

				return result


if __name__ == "__main__":
			print(F"{solution() = }")





"""simple docstring"""






import qiskit







def 	_snake_case     (							lowercase__ = 2						):
				_lowerCamelCase	:     Optional[Any]       =       qubits

				# Using Aer's simulator
				_lowerCamelCase	:     Dict       =       qiskit.Aer.get_backend('aer_simulator'						)

				# Creating a Quantum Circuit acting on the q register
				_lowerCamelCase	:     Dict       =       qiskit.QuantumCircuit(lowercase__				,       lowercase__						)

				# Adding a H gate on qubit 0 (now q0 in superposition)
				circuit.h(0						)

				for i in range(1				,       lowercase__						):
								# Adding CX (CNOT) gate
								circuit.cx(i - 1				,       lowercase__						)

				# Mapping the quantum measurement to the classical bits
				circuit.measure(list(range(lowercase__						)						)				,       list(range(lowercase__						)						)						)

				# Now measuring any one qubit would affect other qubits to collapse
				# their super position and have same state as the measured one.

				# Executing the circuit on the simulator
				_lowerCamelCase	:     Optional[Any]       =       qiskit.execute(lowercase__				,       lowercase__				,       shots=1000						)

				return job.result().get_counts(lowercase__						)


if __name__ == "__main__":
			print(F"Total count for various states are: {quantum_entanglement(3)}")