






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


UpperCAmelCase_					:		str           = {'''configuration_vit_hybrid''': ['''VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ViTHybridConfig''']}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	UpperCAmelCase_					:		Union[str, Any]           = [
	    '''VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST''',
	    '''ViTHybridForImageClassification''',
	    '''ViTHybridModel''',
	    '''ViTHybridPreTrainedModel''',
	]

try:
	if not is_vision_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	UpperCAmelCase_					:		int           = ['''ViTHybridImageProcessor''']


if TYPE_CHECKING:
	from .configuration_vit_hybrid import VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTHybridConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_vit_hybrid import (
		    VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST,
		    ViTHybridForImageClassification,
		    ViTHybridModel,
		    ViTHybridPreTrainedModel,
		)

	try:
		if not is_vision_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .image_processing_vit_hybrid import ViTHybridImageProcessor


else:
	import sys

	UpperCAmelCase_					:		List[str]           = _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)








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

def   SCREAMING_SNAKE_CASE_				(				__magic_name__   :    float = np.pi / 2      ,     __magic_name__   :    float = np.pi / 2      ,     __magic_name__   :    float = np.pi / 2   )						->     qiskit.result.counts.Counts:






	"""simple docstring"""



	UpperCamelCase	:Optional[int]		=      QuantumRegister(3      ,     """qr"""   )  # Define the number of quantum bits
	UpperCamelCase	:Optional[Any]		=      ClassicalRegister(1      ,     """cr"""   )  # Define the number of classical bits

	UpperCamelCase	:List[Any]		=      QuantumCircuit(__magic_name__      ,     __magic_name__   )  # Define the quantum circuit.

	# Build the circuit
	quantum_circuit.u(__magic_name__      ,     __magic_name__      ,     __magic_name__      ,     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
	UpperCamelCase	:Union[str, Any]		=      Aer.get_backend("""aer_simulator"""   )
	UpperCamelCase	:Dict		=      execute(__magic_name__      ,     __magic_name__      ,     shots=1000   )

	return job.result().get_counts(__magic_name__   )


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