






import qiskit



def  a__ (__lowercase							:int					,  __lowercase							:int   )		-> qiskit.result.counts.Counts:
				_A	:				Tuple   =      qiskit.Aer.get_backend('''aer_simulator'''   )

				_A	:				Dict   =      qiskit.QuantumCircuit(4					,  2   )
				# encode inputs in qubits 0 and 1
				if bita == 1:
								qc_ha.x(0   )
				if bita == 1:
								qc_ha.x(1   )
				qc_ha.barrier()

				# use cnots to write XOR of the inputs on qubit2
				qc_ha.cx(0					,  2   )
				qc_ha.cx(1					,  2   )

				# use ccx / toffoli gate to write AND of the inputs on qubit3
				qc_ha.ccx(0					,  1					,  3   )
				qc_ha.barrier()

				# extract outputs
				qc_ha.measure(2					,  0   )  # extract XOR value
				qc_ha.measure(3					,  1   )  # extract AND value

				# Execute the circuit on the qasm simulator
				_A	:				List[str]   =      qiskit.execute(__lowercase					,  __lowercase					,  shots=1000   )

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


if __name__ == "__main__":
	_UpperCamelCase			:	Optional[Any]								=half_adder(1, 1)
	print(f'''Half Adder Output Qubit Counts: {counts}''')











from typing import List, Optional, Union

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






class 						UpperCAmelCase__ (							__snake_case							):
		__snake_case      :       Optional[Any]     =   ["image_processor", "tokenizer"]
		__snake_case      :       Tuple     =   "BridgeTowerImageProcessor"
		__snake_case      :       List[str]     =   ("RobertaTokenizer", "RobertaTokenizerFast")







		def __init__(					self       ,A__       ,A__		):
						super().__init__(A__       ,A__		)







		def __call__(					self       ,A__       ,A__ = None       ,A__ = True       ,A__ = False       ,A__ = None       ,A__ = None       ,A__ = 0       ,A__ = None       ,A__ = None       ,A__ = None       ,A__ = False       ,A__ = False       ,A__ = False       ,A__ = False       ,A__ = True       ,A__ = None       ,**A__       ,):
						_A	:				List[Any]   =      self.tokenizer(
						    text=A__       ,add_special_tokens=A__       ,padding=A__       ,truncation=A__       ,max_length=A__       ,stride=A__       ,pad_to_multiple_of=A__       ,return_token_type_ids=A__       ,return_attention_mask=A__       ,return_overflowing_tokens=A__       ,return_special_tokens_mask=A__       ,return_offsets_mapping=A__       ,return_length=A__       ,verbose=A__       ,return_tensors=A__       ,**A__       ,)
						# add pixel_values + pixel_mask
						_A	:				Optional[Any]   =      self.image_processor(
						    A__       ,return_tensors=A__       ,do_normalize=A__       ,do_center_crop=A__       ,**A__		)
						encoding.update(A__		)

						return encoding







		def  A__      (					self       ,*A__       ,**A__		):
						return self.tokenizer.batch_decode(*A__       ,**A__		)







		def  A__      (					self       ,*A__       ,**A__		):
						return self.tokenizer.decode(*A__       ,**A__		)







		@property
		def  A__      (					self		):
						_A	:				Union[str, Any]   =      self.tokenizer.model_input_names
						_A	:				str   =      self.image_processor.model_input_names
						return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names		)		)



