






from typing import List, Optional, Union

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


SCREAMING_SNAKE_CASE__				     =			logging.get_logger(__name__)

SCREAMING_SNAKE_CASE__				     =			{
    '''huggingface/informer-tourism-monthly''': (
        '''https://huggingface.co/huggingface/informer-tourism-monthly/resolve/main/config.json'''
    ),
    # See all Informer models at https://huggingface.co/models?filter=informer
}






class 			_UpperCamelCase(       __lowerCamelCase		):
		__SCREAMING_SNAKE_CASE  :       List[Any]							=							'''informer'''
		__SCREAMING_SNAKE_CASE  :       List[Any]							=							{
		    '''hidden_size''': '''d_model''',
		    '''num_attention_heads''': '''encoder_attention_heads''',
		    '''num_hidden_layers''': '''encoder_layers''',
		}

		def __init__(					self		:    Optional[int]    ,       SCREAMING_SNAKE_CASE__		:    Optional[int] = None    ,       SCREAMING_SNAKE_CASE__		:    Optional[int] = None    ,       SCREAMING_SNAKE_CASE__		:    str = "student_t"    ,       SCREAMING_SNAKE_CASE__		:    str = "nll"    ,       SCREAMING_SNAKE_CASE__		:    int = 1    ,       SCREAMING_SNAKE_CASE__		:    List[int] = None    ,       SCREAMING_SNAKE_CASE__		:    Optional[Union[str, bool]] = "mean"    ,       SCREAMING_SNAKE_CASE__		:    int = 0    ,       SCREAMING_SNAKE_CASE__		:    int = 0    ,       SCREAMING_SNAKE_CASE__		:    int = 0    ,       SCREAMING_SNAKE_CASE__		:    int = 0    ,       SCREAMING_SNAKE_CASE__		:    Optional[List[int]] = None    ,       SCREAMING_SNAKE_CASE__		:    Optional[List[int]] = None    ,       SCREAMING_SNAKE_CASE__		:    int = 6_4    ,       SCREAMING_SNAKE_CASE__		:    int = 3_2    ,       SCREAMING_SNAKE_CASE__		:    int = 3_2    ,       SCREAMING_SNAKE_CASE__		:    int = 2    ,       SCREAMING_SNAKE_CASE__		:    int = 2    ,       SCREAMING_SNAKE_CASE__		:    int = 2    ,       SCREAMING_SNAKE_CASE__		:    int = 2    ,       SCREAMING_SNAKE_CASE__		:    bool = True    ,       SCREAMING_SNAKE_CASE__		:    str = "gelu"    ,       SCREAMING_SNAKE_CASE__		:    float = 0.05    ,       SCREAMING_SNAKE_CASE__		:    float = 0.1    ,       SCREAMING_SNAKE_CASE__		:    float = 0.1    ,       SCREAMING_SNAKE_CASE__		:    float = 0.1    ,       SCREAMING_SNAKE_CASE__		:    float = 0.1    ,       SCREAMING_SNAKE_CASE__		:    int = 1_0_0    ,       SCREAMING_SNAKE_CASE__		:    float = 0.02    ,       SCREAMING_SNAKE_CASE__		:    Union[str, Any]=True    ,       SCREAMING_SNAKE_CASE__		:    str = "prob"    ,       SCREAMING_SNAKE_CASE__		:    int = 5    ,       SCREAMING_SNAKE_CASE__		:    bool = True    ,       **SCREAMING_SNAKE_CASE__		:    Tuple    ,       ):



					'''simple docstring'''



					__a						:  Dict									=     prediction_length
					__a						:  Tuple									=     context_length or prediction_length
					__a						:  Tuple									=     distribution_output
					__a						:  Tuple									=     loss
					__a						:  str									=     input_size
					__a						:  Dict									=     num_time_features
					__a						:  Optional[int]									=     lags_sequence if lags_sequence is not None else [1, 2, 3, 4, 5, 6, 7]
					__a						:  str									=     scaling
					__a						:  Tuple									=     num_dynamic_real_features
					__a						:  int									=     num_static_real_features
					__a						:  Dict									=     num_static_categorical_features

					# set cardinality
					if cardinality and num_static_categorical_features > 0:
								if len(SCREAMING_SNAKE_CASE__    ) != num_static_categorical_features:
											raise ValueError(
											    'The cardinality should be a list of the same length as `num_static_categorical_features`'    )
								__a						:  Optional[Any]									=     cardinality
					else:
								__a						:  Optional[int]									=     [0]

					# set embedding_dimension
					if embedding_dimension and num_static_categorical_features > 0:
								if len(SCREAMING_SNAKE_CASE__    ) != num_static_categorical_features:
											raise ValueError(
											    'The embedding dimension should be a list of the same length as `num_static_categorical_features`'    )
								__a						:  int									=     embedding_dimension
					else:
								__a						:  List[Any]									=     [min(5_0    ,       (cat + 1) // 2    ) for cat in self.cardinality]

					__a						:  int									=     num_parallel_samples

					# Transformer architecture configuration
					__a						:  str									=     input_size * len(self.lags_sequence    ) + self._number_of_features
					__a						:  Optional[int]									=     d_model
					__a						:  Union[str, Any]									=     encoder_attention_heads
					__a						:  int									=     decoder_attention_heads
					__a						:  Any									=     encoder_ffn_dim
					__a						:  Union[str, Any]									=     decoder_ffn_dim
					__a						:  List[Any]									=     encoder_layers
					__a						:  Optional[int]									=     decoder_layers

					__a						:  int									=     dropout
					__a						:  Optional[Any]									=     attention_dropout
					__a						:  Dict									=     activation_dropout
					__a						:  Union[str, Any]									=     encoder_layerdrop
					__a						:  Optional[int]									=     decoder_layerdrop

					__a						:  List[str]									=     activation_function
					__a						:  str									=     init_std

					__a						:  Optional[int]									=     use_cache

					# Informer
					__a						:  Union[str, Any]									=     attention_type
					__a						:  str									=     sampling_factor
					__a						:  Dict									=     distil

					super().__init__(is_encoder_decoder=SCREAMING_SNAKE_CASE__    ,       **SCREAMING_SNAKE_CASE__    )



		@property
		def    __lowerCAmelCase  (					self		:    Any    ):



					'''simple docstring'''



					return (
					    sum(self.embedding_dimension    )
					    + self.num_dynamic_real_features
					    + self.num_time_features
					    + self.num_static_real_features
					    + self.input_size * 2  # the log1p(abs(loc)) and log(scale) features
					)









import qiskit
def 							__lowerCamelCase		(					UpperCAmelCase_		:						int					,    UpperCAmelCase_		:						int		):




      """simple docstring"""





      a		:Tuple									=			qiskit.Aer.get_backend('''aer_simulator'''		)

      # Create a Quantum Circuit acting on the q register
      a		:str									=			qiskit.QuantumCircuit(UpperCAmelCase_					,    UpperCAmelCase_		)

      # 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
      a		:Optional[Any]									=			qiskit.execute(UpperCAmelCase_					,    UpperCAmelCase_					,    shots=1000		)

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


if __name__ == "__main__":
     snake_case							:       Any										=	single_qubit_measure(2, 2)
     print(F"""Total count for various states are: {counts}""")





