





'''simple docstring'''





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


_lowerCamelCase			       =      logging.get_logger(__name__)

_lowerCamelCase			       =      {
    'google/pegasus-large': 'https://huggingface.co/google/pegasus-large/resolve/main/config.json',
    # See all PEGASUS models at https://huggingface.co/models?filter=pegasus
}







class 			__A       (      lowerCamelCase__  ):




      """simple docstring"""







      UpperCAmelCase__						=      """pegasus"""
      UpperCAmelCase__						=      ["""past_key_values"""]
      UpperCAmelCase__						=      {"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}


      def __init__(		self      ,							a__=5_0265      ,							a__=1024      ,							a__=12      ,							a__=4096      ,							a__=16      ,							a__=12      ,							a__=4096      ,							a__=16      ,							a__=0.0      ,							a__=0.0      ,							a__=True      ,							a__=True      ,							a__="gelu"      ,							a__=1024      ,							a__=0.1      ,							a__=0.0      ,							a__=0.0      ,							a__=0.02      ,							a__=0      ,							a__=False      ,							a__=0      ,							a__=1      ,							a__=1      ,							**a__      ,							):



             """simple docstring"""





             _lowerCamelCase							:     Optional[int]	=		vocab_size
             _lowerCamelCase							:     Dict	=		max_position_embeddings
             _lowerCamelCase							:     Union[str, Any]	=		d_model
             _lowerCamelCase							:     List[Any]	=		encoder_ffn_dim
             _lowerCamelCase							:     int	=		encoder_layers
             _lowerCamelCase							:     str	=		encoder_attention_heads
             _lowerCamelCase							:     List[Any]	=		decoder_ffn_dim
             _lowerCamelCase							:     Optional[int]	=		decoder_layers
             _lowerCamelCase							:     int	=		decoder_attention_heads
             _lowerCamelCase							:     Tuple	=		dropout
             _lowerCamelCase							:     Optional[Any]	=		attention_dropout
             _lowerCamelCase							:     int	=		activation_dropout
             _lowerCamelCase							:     Dict	=		activation_function
             _lowerCamelCase							:     Union[str, Any]	=		init_std
             _lowerCamelCase							:     List[str]	=		encoder_layerdrop
             _lowerCamelCase							:     Optional[int]	=		decoder_layerdrop
             _lowerCamelCase							:     Union[str, Any]	=		use_cache
             _lowerCamelCase							:     Tuple	=		encoder_layers
             _lowerCamelCase							:     Tuple	=		scale_embedding  # scale factor will be sqrt(d_model) if True
             super().__init__(
                 pad_token_id=a__      ,							eos_token_id=a__      ,							is_encoder_decoder=a__      ,							decoder_start_token_id=a__      ,							forced_eos_token_id=a__      ,							**a__      ,							)


      @property
      def 				__snake_case			(		self):



             """simple docstring"""





             return self.encoder_attention_heads



      @property
      def 				__snake_case			(		self):



             """simple docstring"""





             return self.d_model








import qiskit




def    __UpperCAmelCase(      lowercase_ = 2      ):
       _lowerCamelCase							:     Optional[Any]	=		qubits

       # Using Aer's simulator
       _lowerCamelCase							:     Optional[int]	=		qiskit.Aer.get_backend('''aer_simulator'''      )

       # Creating a Quantum Circuit acting on the q register
       _lowerCamelCase							:     List[str]	=		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							:     str	=		qiskit.execute(lowercase_ ,    lowercase_ ,    shots=10_00      )

       return job.result().get_counts(lowercase_      )


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

