


"""simple docstring"""



import numpy as np
import qiskit
from qiskit import Aer, ClassicalRegister, QuantumCircuit, QuantumRegister, execute
def     UpperCAmelCase    (					_lowercase   :      float = np.pi / 2 ,      _lowercase   :      float = np.pi / 2 ,      _lowercase   :      float = np.pi / 2  )	->   qiskit.result.counts.Counts:


	"""simple docstring"""




	lowerCAmelCase_			       = QuantumRegister(3 ,      '''qr'''  )  # Define the number of quantum bits
	lowerCAmelCase_			       = ClassicalRegister(1 ,      '''cr'''  )  # Define the number of classical bits

	lowerCAmelCase_			       = QuantumCircuit(_lowercase ,      _lowercase  )  # Define the quantum circuit.

	# Build the circuit
	quantum_circuit.u(_lowercase ,      _lowercase ,      _lowercase ,      0  )  # Quantum State to teleport
	quantum_circuit.h(1  )  # add hadamard gate
	quantum_circuit.cx(
	    1 ,      2  )  # add control gate with qubit 1 as control and 2 as target.
	quantum_circuit.cx(0 ,      1  )
	quantum_circuit.h(0  )
	quantum_circuit.cz(0 ,      2  )  # add control z gate.
	quantum_circuit.cx(1 ,      2  )

	quantum_circuit.measure([2] ,      [0]  )  # measure the qubit.

	# Simulate the circuit using qasm simulator
	lowerCAmelCase_			       = Aer.get_backend('''aer_simulator'''  )
	lowerCAmelCase_			       = execute(_lowercase ,      _lowercase ,      shots=1_0_0_0  )

	return job.result().get_counts(_lowercase  )


if __name__ == "__main__":
		print(
		    'Total count for teleported state is: '
		    f"""{quantum_teleportation(np.pi/2, np.pi/2, np.pi/2)}"""
		)



"""simple docstring"""



lowercase_							 =       [0.485, 0.456, 0.406]
lowercase_							 =       [0.229, 0.224, 0.225]
lowercase_							 =       [0.5, 0.5, 0.5]
lowercase_							 =       [0.5, 0.5, 0.5]
lowercase_							 =       [0.4814_5466, 0.457_8275, 0.4082_1073]
lowercase_							 =       [0.2686_2954, 0.2613_0258, 0.2757_7711]