



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


def 						_UpperCAmelCase							( snake_case = np.pi / 2      ,		snake_case = np.pi / 2      ,		snake_case = np.pi / 2     ):





					"""simple docstring"""

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

					_lowerCAmelCase         =       QuantumCircuit(snake_case      ,		snake_case     )  # Define the quantum circuit.

					# Build the circuit
					quantum_circuit.u(snake_case      ,		snake_case      ,		snake_case      ,		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(snake_case      ,		snake_case      ,		shots=10_00     )

					return job.result().get_counts(snake_case     )


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








from typing import List, Union

from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase_          =				logging.get_logger(__name__)

UpperCAmelCase_          =				{
    "allenai/led-base-16384": "https://huggingface.co/allenai/led-base-16384/resolve/main/config.json",
    # See all LED models at https://huggingface.co/models?filter=led
}





class 		UpperCAmelCase    (    snake_case_					):
   SCREAMING_SNAKE_CASE__					      =  '''led'''
   SCREAMING_SNAKE_CASE__					      =  {
       '''num_attention_heads''': '''encoder_attention_heads''',
       '''hidden_size''': '''d_model''',
       '''attention_probs_dropout_prob''': '''attention_dropout''',
       '''initializer_range''': '''init_std''',
   }





   def __init__(						self							,  _lowerCAmelCase=50_265							,  _lowerCAmelCase=16_384							,  _lowerCAmelCase=1_024							,  _lowerCAmelCase=12							,  _lowerCAmelCase=4_096							,  _lowerCAmelCase=16							,  _lowerCAmelCase=12							,  _lowerCAmelCase=4_096							,  _lowerCAmelCase=16							,  _lowerCAmelCase=0.0							,  _lowerCAmelCase=0.0							,  _lowerCAmelCase=True							,  _lowerCAmelCase=True							,  _lowerCAmelCase="gelu"							,  _lowerCAmelCase=1_024							,  _lowerCAmelCase=0.1							,  _lowerCAmelCase=0.0							,  _lowerCAmelCase=0.0							,  _lowerCAmelCase=0.02							,  _lowerCAmelCase=2							,  _lowerCAmelCase=0.0							,  _lowerCAmelCase=1							,  _lowerCAmelCase=0							,  _lowerCAmelCase=2							,  _lowerCAmelCase = 512							,  **_lowerCAmelCase							,  ):
         _lowerCAmelCase			      =	vocab_size
         _lowerCAmelCase			      =	max_encoder_position_embeddings
         _lowerCAmelCase			      =	max_decoder_position_embeddings
         _lowerCAmelCase			      =	d_model
         _lowerCAmelCase			      =	encoder_ffn_dim
         _lowerCAmelCase			      =	encoder_layers
         _lowerCAmelCase			      =	encoder_attention_heads
         _lowerCAmelCase			      =	decoder_ffn_dim
         _lowerCAmelCase			      =	decoder_layers
         _lowerCAmelCase			      =	decoder_attention_heads
         _lowerCAmelCase			      =	dropout
         _lowerCAmelCase			      =	attention_dropout
         _lowerCAmelCase			      =	activation_dropout
         _lowerCAmelCase			      =	activation_function
         _lowerCAmelCase			      =	init_std
         _lowerCAmelCase			      =	encoder_layerdrop
         _lowerCAmelCase			      =	decoder_layerdrop
         _lowerCAmelCase			      =	classifier_dropout
         _lowerCAmelCase			      =	use_cache
         _lowerCAmelCase			      =	encoder_layers
         _lowerCAmelCase			      =	attention_window

         super().__init__(
             pad_token_id=_lowerCAmelCase							,  bos_token_id=_lowerCAmelCase							,  eos_token_id=_lowerCAmelCase							,  is_encoder_decoder=_lowerCAmelCase							,  decoder_start_token_id=_lowerCAmelCase							,  **_lowerCAmelCase							,  )