





"""simple docstring"""
import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto import CONFIG_MAPPING


lowerCamelCase_								=		logging.get_logger(__name__)

lowerCamelCase_								=		{
    "ut/deta": "https://huggingface.co/ut/deta/resolve/main/config.json",
}






class 					_SCREAMING_SNAKE_CASE(   A  ):
       SCREAMING_SNAKE_CASE_   :      Any							=  '''deta'''
       SCREAMING_SNAKE_CASE_   :      str							=  {
           '''hidden_size''': '''d_model''',
           '''num_attention_heads''': '''encoder_attention_heads''',
       }




       def __init__(						self		,SCREAMING_SNAKE_CASE__=None		,SCREAMING_SNAKE_CASE__=9_00		,SCREAMING_SNAKE_CASE__=20_48		,SCREAMING_SNAKE_CASE__=6		,SCREAMING_SNAKE_CASE__=20_48		,SCREAMING_SNAKE_CASE__=8		,SCREAMING_SNAKE_CASE__=6		,SCREAMING_SNAKE_CASE__=10_24		,SCREAMING_SNAKE_CASE__=8		,SCREAMING_SNAKE_CASE__=0.0		,SCREAMING_SNAKE_CASE__=True		,SCREAMING_SNAKE_CASE__="relu"		,SCREAMING_SNAKE_CASE__=2_56		,SCREAMING_SNAKE_CASE__=0.1		,SCREAMING_SNAKE_CASE__=0.0		,SCREAMING_SNAKE_CASE__=0.0		,SCREAMING_SNAKE_CASE__=0.0_2		,SCREAMING_SNAKE_CASE__=1.0		,SCREAMING_SNAKE_CASE__=True		,SCREAMING_SNAKE_CASE__=False		,SCREAMING_SNAKE_CASE__="sine"		,SCREAMING_SNAKE_CASE__=5		,SCREAMING_SNAKE_CASE__=4		,SCREAMING_SNAKE_CASE__=4		,SCREAMING_SNAKE_CASE__=True		,SCREAMING_SNAKE_CASE__=3_00		,SCREAMING_SNAKE_CASE__=True		,SCREAMING_SNAKE_CASE__=True		,SCREAMING_SNAKE_CASE__=1		,SCREAMING_SNAKE_CASE__=5		,SCREAMING_SNAKE_CASE__=2		,SCREAMING_SNAKE_CASE__=1		,SCREAMING_SNAKE_CASE__=1		,SCREAMING_SNAKE_CASE__=5		,SCREAMING_SNAKE_CASE__=2		,SCREAMING_SNAKE_CASE__=0.1		,SCREAMING_SNAKE_CASE__=0.2_5		,**SCREAMING_SNAKE_CASE__		,)			->      Tuple:





             """simple docstring"""






             if backbone_config is None:
                   logger.info('''`backbone_config` is `None`. Initializing the config with the default `ResNet` backbone.'''							)
                   __SCREAMING_SNAKE_CASE   :Optional[int]						=  CONFIG_MAPPING['''resnet'''](out_features=['''stage2''', '''stage3''', '''stage4''']							)
             else:
                   if isinstance(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							):
                         __SCREAMING_SNAKE_CASE   :List[Any]						=  backbone_config.pop('''model_type'''							)
                         __SCREAMING_SNAKE_CASE   :Any						=  CONFIG_MAPPING[backbone_model_type]
                         __SCREAMING_SNAKE_CASE   :Optional[int]						=  config_class.from_dict(SCREAMING_SNAKE_CASE__							)

             __SCREAMING_SNAKE_CASE   :Optional[int]						=  backbone_config
             __SCREAMING_SNAKE_CASE   :Any						=  num_queries
             __SCREAMING_SNAKE_CASE   :Any						=  max_position_embeddings
             __SCREAMING_SNAKE_CASE   :int						=  d_model
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  encoder_ffn_dim
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  encoder_layers
             __SCREAMING_SNAKE_CASE   :Dict						=  encoder_attention_heads
             __SCREAMING_SNAKE_CASE   :Dict						=  decoder_ffn_dim
             __SCREAMING_SNAKE_CASE   :List[str]						=  decoder_layers
             __SCREAMING_SNAKE_CASE   :List[Any]						=  decoder_attention_heads
             __SCREAMING_SNAKE_CASE   :str						=  dropout
             __SCREAMING_SNAKE_CASE   :str						=  attention_dropout
             __SCREAMING_SNAKE_CASE   :Optional[int]						=  activation_dropout
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  activation_function
             __SCREAMING_SNAKE_CASE   :int						=  init_std
             __SCREAMING_SNAKE_CASE   :int						=  init_xavier_std
             __SCREAMING_SNAKE_CASE   :str						=  encoder_layerdrop
             __SCREAMING_SNAKE_CASE   :Dict						=  auxiliary_loss
             __SCREAMING_SNAKE_CASE   :List[str]						=  position_embedding_type
             # deformable attributes
             __SCREAMING_SNAKE_CASE   :Dict						=  num_feature_levels
             __SCREAMING_SNAKE_CASE   :Optional[int]						=  encoder_n_points
             __SCREAMING_SNAKE_CASE   :Dict						=  decoder_n_points
             __SCREAMING_SNAKE_CASE   :Tuple						=  two_stage
             __SCREAMING_SNAKE_CASE   :Tuple						=  two_stage_num_proposals
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  with_box_refine
             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  assign_first_stage
             if two_stage is True and with_box_refine is False:
                   raise ValueError('''If two_stage is True, with_box_refine must be True.'''							)
             # Hungarian matcher
             __SCREAMING_SNAKE_CASE   :Tuple						=  class_cost
             __SCREAMING_SNAKE_CASE   :Any						=  bbox_cost
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  giou_cost
             # Loss coefficients
             __SCREAMING_SNAKE_CASE   :Dict						=  mask_loss_coefficient
             __SCREAMING_SNAKE_CASE   :str						=  dice_loss_coefficient
             __SCREAMING_SNAKE_CASE   :str						=  bbox_loss_coefficient
             __SCREAMING_SNAKE_CASE   :int						=  giou_loss_coefficient
             __SCREAMING_SNAKE_CASE   :Optional[Any]						=  eos_coefficient
             __SCREAMING_SNAKE_CASE   :Optional[int]						=  focal_alpha
             super().__init__(is_encoder_decoder=SCREAMING_SNAKE_CASE__		,**SCREAMING_SNAKE_CASE__							)




       @property
       def     _UpperCamelCase     (						self							)			->      int:





             """simple docstring"""






             return self.encoder_attention_heads




       @property
       def     _UpperCamelCase     (						self							)			->      int:





             """simple docstring"""






             return self.d_model




       def     _UpperCamelCase     (						self							)			->      Optional[Any]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  copy.deepcopy(self.__dict__							)
             __SCREAMING_SNAKE_CASE   :Optional[int]						=  self.backbone_config.to_dict()
             __SCREAMING_SNAKE_CASE   :Any						=  self.__class__.model_type
             return output






"""simple docstring"""
import qiskit



def      __lowerCamelCase   (							a_     :		int ,   a_     :		int							)			->      qiskit.result.counts.Counts:
      __SCREAMING_SNAKE_CASE   :Tuple						=  qiskit.Aer.get_backend('''aer_simulator'''							)

      # Create a Quantum Circuit acting on the q register
      __SCREAMING_SNAKE_CASE   :Union[str, Any]						=  qiskit.QuantumCircuit(a_ ,   a_							)

      # 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   :Tuple						=  qiskit.execute(a_ ,   a_ ,   shots=10_00							)

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


if __name__ == "__main__":
  lowerCamelCase_								=		single_qubit_measure(2, 2)
  print(f'Total count for various states are: {counts}')