




"""simple docstring"""

import qiskit






def 						_snake_case					( _snake_case							: Any    ,  _snake_case							: List[Any]							)   -> qiskit.result.counts.Counts:






      '''simple docstring'''


      _A        =       qiskit.Aer.get_backend('aer_simulator'							)

      # Create a Quantum Circuit acting on the q register
      _A        =       qiskit.QuantumCircuit(lowerCAmelCase_    ,  lowerCAmelCase_							)

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

      # Execute the circuit on the simulator
      _A        =       qiskit.execute(lowerCAmelCase_    ,  lowerCAmelCase_    ,  shots=10_00							)

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


if __name__ == "__main__":
       print(F'''Total count for various states are: {single_qubit_measure(1, 1)}''')







"""simple docstring"""

import logging
from dataclasses import dataclass, field
from pathlib import Path
from typing import Optional, Union

from .generation.configuration_utils import GenerationConfig
from .training_args import TrainingArguments
from .utils import add_start_docstrings


a         =      logging.getLogger(__name__)





@dataclass
@add_start_docstrings(TrainingArguments.__doc__							)
class     lowercase_	(					__lowerCAmelCase							):



 '''simple docstring'''
 UpperCAmelCase   :					bool				  =     field(default=__lowerCAmelCase      ,     metadata={'''help''': '''Whether to use SortishSampler or not.'''}							)
 UpperCAmelCase   :					bool				  =     field(
     default=__lowerCAmelCase      ,     metadata={'''help''': '''Whether to use generate to calculate generative metrics (ROUGE, BLEU).'''}							)
 UpperCAmelCase   :					Optional[int]				  =     field(
     default=__lowerCAmelCase      ,     metadata={
         '''help''': (
             '''The `max_length` to use on each evaluation loop when `predict_with_generate=True`. Will default '''
             '''to the `max_length` value of the model configuration.'''
         )
     }      ,     )
 UpperCAmelCase   :					Optional[int]				  =     field(
     default=__lowerCAmelCase      ,     metadata={
         '''help''': (
             '''The `num_beams` to use on each evaluation loop when `predict_with_generate=True`. Will default '''
             '''to the `num_beams` value of the model configuration.'''
         )
     }      ,     )
 UpperCAmelCase   :					Optional[Union[str, Path, GenerationConfig]]				  =     field(
     default=__lowerCAmelCase      ,     metadata={
         '''help''': '''Model id, file path or url pointing to a GenerationConfig json file, to use during prediction.'''
     }      ,     )

 def       lowerCAmelCase_							(			self	:	int		):
       _A        =       super().to_dict()
       for k, v in d.items():
             if isinstance(_UpperCAmelCase   ,							_UpperCAmelCase		):
                   _A        =       v.to_dict()
       return d

