





from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_lowerCamelCase :    Tuple  							= logging.get_logger(__name__)

_lowerCamelCase :    int  							= {
    '''xlm-mlm-en-2048''': '''https://huggingface.co/xlm-mlm-en-2048/resolve/main/config.json''',
    '''xlm-mlm-ende-1024''': '''https://huggingface.co/xlm-mlm-ende-1024/resolve/main/config.json''',
    '''xlm-mlm-enfr-1024''': '''https://huggingface.co/xlm-mlm-enfr-1024/resolve/main/config.json''',
    '''xlm-mlm-enro-1024''': '''https://huggingface.co/xlm-mlm-enro-1024/resolve/main/config.json''',
    '''xlm-mlm-tlm-xnli15-1024''': '''https://huggingface.co/xlm-mlm-tlm-xnli15-1024/resolve/main/config.json''',
    '''xlm-mlm-xnli15-1024''': '''https://huggingface.co/xlm-mlm-xnli15-1024/resolve/main/config.json''',
    '''xlm-clm-enfr-1024''': '''https://huggingface.co/xlm-clm-enfr-1024/resolve/main/config.json''',
    '''xlm-clm-ende-1024''': '''https://huggingface.co/xlm-clm-ende-1024/resolve/main/config.json''',
    '''xlm-mlm-17-1280''': '''https://huggingface.co/xlm-mlm-17-1280/resolve/main/config.json''',
    '''xlm-mlm-100-1280''': '''https://huggingface.co/xlm-mlm-100-1280/resolve/main/config.json''',
}


class 						lowerCamelCase       (A__      ):







							"""simple docstring"""




							UpperCAmelCase_      						=   "xlm"
							UpperCAmelCase_      						=   {
							    "hidden_size": "emb_dim",
							    "num_attention_heads": "n_heads",
							    "num_hidden_layers": "n_layers",
							    "n_words": "vocab_size",  # For backward compatibility
							}






							def __init__( self     :					int,			_UpperCAmelCase     :					int=3_0_1_4_5,			_UpperCAmelCase     :					Any=2_0_4_8,			_UpperCAmelCase     :					Tuple=1_2,			_UpperCAmelCase     :					Optional[Any]=1_6,			_UpperCAmelCase     :					Dict=0.1,			_UpperCAmelCase     :					List[str]=0.1,			_UpperCAmelCase     :					Optional[int]=True,			_UpperCAmelCase     :					str=False,			_UpperCAmelCase     :					Any=False,			_UpperCAmelCase     :					List[Any]=False,			_UpperCAmelCase     :					int=1,			_UpperCAmelCase     :					Union[str, Any]=True,			_UpperCAmelCase     :					int=5_1_2,			_UpperCAmelCase     :					int=2_0_4_8**-0.5,			_UpperCAmelCase     :					Optional[int]=1E-12,			_UpperCAmelCase     :					Tuple=0.02,			_UpperCAmelCase     :					Dict=0,			_UpperCAmelCase     :					Any=1,			_UpperCAmelCase     :					Dict=2,			_UpperCAmelCase     :					List[Any]=3,			_UpperCAmelCase     :					Any=5,			_UpperCAmelCase     :					List[str]=True,			_UpperCAmelCase     :					int="first",			_UpperCAmelCase     :					Dict=True,			_UpperCAmelCase     :					Union[str, Any]=None,			_UpperCAmelCase     :					List[Any]=True,			_UpperCAmelCase     :					Union[str, Any]=0.1,			_UpperCAmelCase     :					Optional[int]=5,			_UpperCAmelCase     :					Optional[int]=5,			_UpperCAmelCase     :					List[str]=0,			_UpperCAmelCase     :					Any=0,			_UpperCAmelCase     :					int=2,			_UpperCAmelCase     :					List[Any]=0,			**_UpperCAmelCase     :					List[str],			)				->			Union[str, Any]:





														"""simple docstring"""
														SCREAMING_SNAKE_CASE__       :      Any     =						vocab_size
														SCREAMING_SNAKE_CASE__       :      Tuple     =						emb_dim
														SCREAMING_SNAKE_CASE__       :      int     =						n_layers
														SCREAMING_SNAKE_CASE__       :      Any     =						n_heads
														SCREAMING_SNAKE_CASE__       :      Optional[int]     =						dropout
														SCREAMING_SNAKE_CASE__       :      Optional[Any]     =						attention_dropout
														SCREAMING_SNAKE_CASE__       :      str     =						gelu_activation
														SCREAMING_SNAKE_CASE__       :      int     =						sinusoidal_embeddings
														SCREAMING_SNAKE_CASE__       :      List[str]     =						causal
														SCREAMING_SNAKE_CASE__       :      str     =						asm
														SCREAMING_SNAKE_CASE__       :      Tuple     =						n_langs
														SCREAMING_SNAKE_CASE__       :      List[str]     =						use_lang_emb
														SCREAMING_SNAKE_CASE__       :      Optional[Any]     =						layer_norm_eps
														SCREAMING_SNAKE_CASE__       :      Optional[Any]     =						bos_index
														SCREAMING_SNAKE_CASE__       :      List[Any]     =						eos_index
														SCREAMING_SNAKE_CASE__       :      Tuple     =						pad_index
														SCREAMING_SNAKE_CASE__       :      Dict     =						unk_index
														SCREAMING_SNAKE_CASE__       :      List[str]     =						mask_index
														SCREAMING_SNAKE_CASE__       :      Optional[int]     =						is_encoder
														SCREAMING_SNAKE_CASE__       :      Optional[Any]     =						max_position_embeddings
														SCREAMING_SNAKE_CASE__       :      Dict     =						embed_init_std
														SCREAMING_SNAKE_CASE__       :      str     =						init_std
														SCREAMING_SNAKE_CASE__       :      Dict     =						summary_type
														SCREAMING_SNAKE_CASE__       :      Tuple     =						summary_use_proj
														SCREAMING_SNAKE_CASE__       :      str     =						summary_activation
														SCREAMING_SNAKE_CASE__       :      Union[str, Any]     =						summary_proj_to_labels
														SCREAMING_SNAKE_CASE__       :      Optional[int]     =						summary_first_dropout
														SCREAMING_SNAKE_CASE__       :      int     =						start_n_top
														SCREAMING_SNAKE_CASE__       :      Tuple     =						end_n_top
														SCREAMING_SNAKE_CASE__       :      int     =						mask_token_id
														SCREAMING_SNAKE_CASE__       :      Optional[Any]     =						lang_id

														if "n_words" in kwargs:
																					SCREAMING_SNAKE_CASE__       :      Union[str, Any]     =						kwargs["""n_words"""]

														super().__init__(pad_token_id=__A,			bos_token_id=__A,			**__A						)


class 						lowerCamelCase       (A__      ):







							"""simple docstring"""




							@property
							def  A_     ( self     :					List[str]						)				->			Mapping[str, Mapping[int, str]]:





														"""simple docstring"""
														if self.task == "multiple-choice":
																					SCREAMING_SNAKE_CASE__       :      Union[str, Any]     =						{0: """batch""", 1: """choice""", 2: """sequence"""}
														else:
																					SCREAMING_SNAKE_CASE__       :      int     =						{0: """batch""", 1: """sequence"""}
														return OrderedDict(
														    [
														        ("input_ids", dynamic_axis),
														        ("attention_mask", dynamic_axis),
														        ("token_type_ids", dynamic_axis),
														    ]						)













import qiskit




def _a (  SCREAMING_SNAKE_CASE__      :  int			,				SCREAMING_SNAKE_CASE__      :  int       )	->    qiskit.result.counts.Counts:

							'''simple docstring'''






							SCREAMING_SNAKE_CASE__       :      Union[str, Any]     =						qiskit.Aer.get_backend("aer_simulator"       )

							# Create a Quantum Circuit acting on the q register
							SCREAMING_SNAKE_CASE__       :      List[Any]     =						qiskit.QuantumCircuit(SCREAMING_SNAKE_CASE__			,				SCREAMING_SNAKE_CASE__       )

							# Apply X (NOT) Gate to Qubits 0 & 1
							circuit.x(0       )
							circuit.x(1       )

							# Map the quantum measurement to the classical bits
							circuit.measure([0, 1]			,				[0, 1]       )

							# Execute the circuit on the qasm simulator
							SCREAMING_SNAKE_CASE__       :      int     =						qiskit.execute(SCREAMING_SNAKE_CASE__			,				SCREAMING_SNAKE_CASE__			,				shots=10_00       )

							# Return the histogram data of the results of the experiment.
							return job.result().get_counts(SCREAMING_SNAKE_CASE__       )


if __name__ == "__main__":
		_lowerCamelCase :    List[str]  							= single_qubit_measure(2, 2)
		print(f"Total count for various states are: {counts}")






