






"""simple docstring"""


from typing import TYPE_CHECKING

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


lowercase_								=	{
    'configuration_swin2sr': ['SWIN2SR_PRETRAINED_CONFIG_ARCHIVE_MAP', 'Swin2SRConfig'],
}


try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowercase_								=	[
           'SWIN2SR_PRETRAINED_MODEL_ARCHIVE_LIST',
           'Swin2SRForImageSuperResolution',
           'Swin2SRModel',
           'Swin2SRPreTrainedModel',
       ]


try:
       if not is_vision_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowercase_								=	['Swin2SRImageProcessor']


if TYPE_CHECKING:
       from .configuration_swinasr import SWIN2SR_PRETRAINED_CONFIG_ARCHIVE_MAP, SwinaSRConfig

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_swinasr import (
                  SWIN2SR_PRETRAINED_MODEL_ARCHIVE_LIST,
                  SwinaSRForImageSuperResolution,
                  SwinaSRModel,
                  SwinaSRPreTrainedModel,
              )

       try:
              if not is_vision_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .image_processing_swinasr import SwinaSRImageProcessor


else:
       import sys

       lowercase_								=	_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)






'''simple docstring'''





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

def   A			(							A_				:       float = np.pi / 2     ,				A_				:       float = np.pi / 2     ,				A_				:       float = np.pi / 2							):
						snake_case							:  List[Any]			=     QuantumRegister(3     ,				'''qr'''							)  # Define the number of quantum bits
						snake_case							:  List[Any]			=     ClassicalRegister(1     ,				'''cr'''							)  # Define the number of classical bits

						snake_case							:  Dict			=     QuantumCircuit(A_     ,				A_							)  # Define the quantum circuit.

						# Build the circuit
						quantum_circuit.u(A_     ,				A_     ,				A_     ,				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
						snake_case							:  str			=     Aer.get_backend('''aer_simulator'''							)
						snake_case							:  List[str]			=     execute(A_     ,				A_     ,				shots=1000							)

						return job.result().get_counts(A_							)


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

