





'''simple docstring'''

from typing import List, Optional, Union

from ...image_utils import ImageInput
from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding, PaddingStrategy, PreTokenizedInput, TextInput, TruncationStrategy
from ...utils import TensorType






class        UpperCAmelCase     (	lowerCamelCase__    ):
	__lowercase       		=    ["""image_processor""", """tokenizer"""]
	__lowercase       		=    """BlipImageProcessor"""
	__lowercase       		=    ("""BertTokenizer""", """BertTokenizerFast""")
	def __init__(    self				:Union[str, Any]						,	lowercase_				:Any						,	lowercase_				:Optional[Any]							)->							Optional[int]:
					A__    =      False
					super().__init__(__A						,	__A							)
					A__    =      self.image_processor
	def __call__(    self				:List[str]						,	lowercase_				:ImageInput = None						,	lowercase_				:Union[TextInput, PreTokenizedInput, List[TextInput], List[PreTokenizedInput]] = None						,	lowercase_				:bool = True						,	lowercase_				:Union[bool, str, PaddingStrategy] = False						,	lowercase_				:Union[bool, str, TruncationStrategy] = None						,	lowercase_				:Optional[int] = None						,	lowercase_				:int = 0						,	lowercase_				:Optional[int] = None						,	lowercase_				:Optional[bool] = None						,	lowercase_				:bool = False						,	lowercase_				:bool = False						,	lowercase_				:bool = False						,	lowercase_				:bool = False						,	lowercase_				:bool = False						,	lowercase_				:bool = True						,	lowercase_				:Optional[Union[str, TensorType]] = None						,	**lowercase_				:int						,	)->							Dict:
					if images is None and text is None:
									raise ValueError("You have to specify either images or text."							)

					# Get only text
					if images is None:
									A__    =      self.tokenizer
									A__    =      self.tokenizer(
									    text=__A						,	add_special_tokens=__A						,	padding=__A						,	truncation=__A						,	max_length=__A						,	stride=__A						,	pad_to_multiple_of=__A						,	return_attention_mask=__A						,	return_overflowing_tokens=__A						,	return_special_tokens_mask=__A						,	return_offsets_mapping=__A						,	return_token_type_ids=__A						,	return_length=__A						,	verbose=__A						,	return_tensors=__A						,	**__A						,	)
									return text_encoding

					# add pixel_values
					A__    =      self.image_processor(__A						,	return_tensors=__A							)

					if text is not None:
									A__    =      self.tokenizer(
									    text=__A						,	add_special_tokens=__A						,	padding=__A						,	truncation=__A						,	max_length=__A						,	stride=__A						,	pad_to_multiple_of=__A						,	return_attention_mask=__A						,	return_overflowing_tokens=__A						,	return_special_tokens_mask=__A						,	return_offsets_mapping=__A						,	return_token_type_ids=__A						,	return_length=__A						,	verbose=__A						,	return_tensors=__A						,	**__A						,	)
					else:
									A__    =      None

					if text_encoding is not None:
									encoding_image_processor.update(__A							)

					return encoding_image_processor
	def 					UpperCAmelCase_							(    self				:Union[str, Any]						,	*lowercase_				:str						,	**lowercase_				:List[Any]							)->							List[str]:
					return self.tokenizer.batch_decode(*__A						,	**__A							)
	def 					UpperCAmelCase_							(    self				:Tuple						,	*lowercase_				:int						,	**lowercase_				:Dict							)->							Tuple:
					return self.tokenizer.decode(*__A						,	**__A							)



	@property
	def 					UpperCAmelCase_							(    self				:int							)->							Any:
					A__    =      self.tokenizer.model_input_names
					A__    =      self.image_processor.model_input_names
					return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names							)							)










'''simple docstring'''

import qiskit





def 						UpperCamelCase    (							_lowerCamelCase : int						,	_lowerCamelCase : int	):
    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)}""")



