



'''simple docstring'''



import warnings
from contextlib import contextmanager

from ....processing_utils import ProcessorMixin





class _UpperCamelCase		(  _snake_case		):





				'''simple docstring'''





				lowerCAmelCase__            =     """MCTCTFeatureExtractor"""
				lowerCAmelCase__            =     """AutoTokenizer"""

				def __init__(				self	:	Optional[Any]	,							_lowerCAmelCase	:	Dict	,							_lowerCAmelCase	:	Dict):







											'''simple docstring'''

											super().__init__(_lowerCamelCase	,							_lowerCamelCase)
											__lowercase													=self.feature_extractor
											__lowercase													=False

				def __call__(				self	:	Dict	,							*_lowerCAmelCase	:	Any	,							**_lowerCAmelCase	:	int):







											'''simple docstring'''

											if self._in_target_context_manager:
																		return self.current_processor(*_lowerCamelCase	,							**_lowerCamelCase)

											if "raw_speech" in kwargs:
																		warnings.warn('Using `raw_speech` as a keyword argument is deprecated. Use `audio` instead.')
																		__lowercase													=kwargs.pop('raw_speech')
											else:
																		__lowercase													=kwargs.pop('audio'	,							_lowerCamelCase)
											__lowercase													=kwargs.pop('sampling_rate'	,							_lowerCamelCase)
											__lowercase													=kwargs.pop('text'	,							_lowerCamelCase)
											if len(_lowerCamelCase) > 0:
																		__lowercase													=args[0]
																		__lowercase													=args[1:]

											if audio is None and text is None:
																		raise ValueError('You need to specify either an `audio` or `text` input to process.')

											if audio is not None:
																		__lowercase													=self.feature_extractor(_lowerCamelCase	,							*_lowerCamelCase	,							sampling_rate=_lowerCamelCase	,							**_lowerCamelCase)
											if text is not None:
																		__lowercase													=self.tokenizer(_lowerCamelCase	,							**_lowerCamelCase)

											if text is None:
																		return inputs
											elif audio is None:
																		return encodings
											else:
																		__lowercase													=encodings['''input_ids''']
																		return inputs

				def 					__lowerCamelCase  (				self	:	Tuple	,							*_lowerCAmelCase	:	Optional[Any]	,							**_lowerCAmelCase	:	Any):







											'''simple docstring'''

											return self.tokenizer.batch_decode(*_lowerCamelCase	,							**_lowerCamelCase)

				def 					__lowerCamelCase  (				self	:	str	,							*_lowerCAmelCase	:	str	,							**_lowerCAmelCase	:	Any):







											'''simple docstring'''

											if self._in_target_context_manager:
																		return self.current_processor.pad(*_lowerCamelCase	,							**_lowerCamelCase)

											__lowercase													=kwargs.pop('input_features'	,							_lowerCamelCase)
											__lowercase													=kwargs.pop('labels'	,							_lowerCamelCase)
											if len(_lowerCamelCase) > 0:
																		__lowercase													=args[0]
																		__lowercase													=args[1:]

											if input_features is not None:
																		__lowercase													=self.feature_extractor.pad(_lowerCamelCase	,							*_lowerCamelCase	,							**_lowerCamelCase)
											if labels is not None:
																		__lowercase													=self.tokenizer.pad(_lowerCamelCase	,							**_lowerCamelCase)

											if labels is None:
																		return input_features
											elif input_features is None:
																		return labels
											else:
																		__lowercase													=labels['''input_ids''']
																		return input_features

				def 					__lowerCamelCase  (				self	:	List[Any]	,							*_lowerCAmelCase	:	Union[str, Any]	,							**_lowerCAmelCase	:	List[Any]):







											'''simple docstring'''

											return self.tokenizer.decode(*_lowerCamelCase	,							**_lowerCamelCase)

				@contextmanager
				def 					__lowerCamelCase  (				self	:	Dict):







											'''simple docstring'''

											warnings.warn(
											    '`as_target_processor` is deprecated and will be removed in v5 of Transformers. You can process your '
											    'labels by using the argument `text` of the regular `__call__` method (either in the same call as '
											    'your audio inputs, or in a separate call.')
											__lowercase													=True
											__lowercase													=self.tokenizer
											yield
											__lowercase													=self.feature_extractor
											__lowercase													=False







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}""")





