


from ...configuration_utils import PretrainedConfig
from ...utils import logging


_UpperCAmelCase			:  Any     =logging.get_logger(__name__)

_UpperCAmelCase			:  List[Any]     ={
    """facebook/s2t-wav2vec2-large-en-de""": (
        """https://huggingface.co/facebook/s2t-wav2vec2-large-en-de/resolve/main/config.json"""
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech2text2
}







class 				snake_case__(							UpperCAmelCase__							):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__      :  Optional[int]					=							"""speech_to_text_2"""
						SCREAMING_SNAKE_CASE__      :  int					=							["""past_key_values"""]
						SCREAMING_SNAKE_CASE__      :  Any					=							{"""num_attention_heads""": """decoder_attention_heads""", """hidden_size""": """d_model"""}




						def __init__(				self   ,						__lowercase=1_0_0_0_0   ,						__lowercase=6   ,						__lowercase=2_0_4_8   ,						__lowercase=4   ,						__lowercase=0.0   ,						__lowercase=True   ,						__lowercase="relu"   ,						__lowercase=2_5_6   ,						__lowercase=0.1   ,						__lowercase=0.0   ,						__lowercase=0.0   ,						__lowercase=0.02   ,						__lowercase=2   ,						__lowercase=True   ,						__lowercase=1   ,						__lowercase=0   ,						__lowercase=2   ,						__lowercase=1_0_2_4   ,						**__lowercase   ,						)					->    str:
										lowerCAmelCase_ :      Union[str, Any]    				=				vocab_size
										lowerCAmelCase_ :      List[Any]    				=				d_model
										lowerCAmelCase_ :      Any    				=				decoder_ffn_dim
										lowerCAmelCase_ :      Any    				=				decoder_layers
										lowerCAmelCase_ :      str    				=				decoder_attention_heads
										lowerCAmelCase_ :      Any    				=				dropout
										lowerCAmelCase_ :      Union[str, Any]    				=				attention_dropout
										lowerCAmelCase_ :      Optional[int]    				=				activation_dropout
										lowerCAmelCase_ :      Dict    				=				activation_function
										lowerCAmelCase_ :      str    				=				init_std
										lowerCAmelCase_ :      Tuple    				=				decoder_layerdrop
										lowerCAmelCase_ :      Union[str, Any]    				=				use_cache
										lowerCAmelCase_ :      Tuple    				=				decoder_layers
										lowerCAmelCase_ :      Dict    				=				scale_embedding  # scale factor will be sqrt(d_model) if True
										lowerCAmelCase_ :      List[str]    				=				max_target_positions

										super().__init__(
										    pad_token_id=__lowercase   ,						bos_token_id=__lowercase   ,						eos_token_id=__lowercase   ,						decoder_start_token_id=__lowercase   ,						**__lowercase   ,						)



import math

import qiskit



def 			lowerCAmelCase (		lowerCAmelCase_ = 1 ,   lowerCAmelCase_ = 1 ,   lowerCAmelCase_ = 1 )-> qiskit.result.counts.Counts:
				if (
				    isinstance(lowerCAmelCase_ ,   lowerCAmelCase_ )
				    or isinstance(lowerCAmelCase_ ,   lowerCAmelCase_ )
				    or isinstance(lowerCAmelCase_ ,   lowerCAmelCase_ )
				):
								raise TypeError('''inputs must be integers.''' )

				if (input_a < 0) or (input_a < 0) or (carry_in < 0):
								raise ValueError('''inputs must be positive.''' )

				if (
				    (math.floor(lowerCAmelCase_ ) != input_a)
				    or (math.floor(lowerCAmelCase_ ) != input_a)
				    or (math.floor(lowerCAmelCase_ ) != carry_in)
				):
								raise ValueError('''inputs must be exact integers.''' )

				if (input_a > 2) or (input_a > 2) or (carry_in > 2):
								raise ValueError('''inputs must be less or equal to 2.''' )

				# build registers
				lowerCAmelCase_ :      str    				=				qiskit.QuantumRegister(4 ,   '''qr''' )
				lowerCAmelCase_ :      str    				=				qiskit.ClassicalRegister(2 ,   '''cr''' )
				# list the entries
				lowerCAmelCase_ :      Any    				=				[input_a, input_a, carry_in]

				lowerCAmelCase_ :      int    				=				qiskit.QuantumCircuit(lowerCAmelCase_ ,   lowerCAmelCase_ )

				for i in range(0 ,   3 ):
								if entry[i] == 2:
												quantum_circuit.h(lowerCAmelCase_ )  # for hadamard entries
								elif entry[i] == 1:
												quantum_circuit.x(lowerCAmelCase_ )  # for 1 entries
								elif entry[i] == 0:
												quantum_circuit.i(lowerCAmelCase_ )  # for 0 entries

    # build the circuit
				quantum_circuit.ccx(0 ,   1 ,   3 )  # ccx = toffoli gate
				quantum_circuit.cx(0 ,   1 )
				quantum_circuit.ccx(1 ,   2 ,   3 )
				quantum_circuit.cx(1 ,   2 )
				quantum_circuit.cx(0 ,   1 )

				quantum_circuit.measure([2, 3] ,   lowerCAmelCase_ )  # measure the last two qbits

				lowerCAmelCase_ :      Tuple    				=				qiskit.Aer.get_backend('''aer_simulator''' )
				lowerCAmelCase_ :      Union[str, Any]    				=				qiskit.execute(lowerCAmelCase_ ,   lowerCAmelCase_ ,   shots=1_000 )

				return job.result().get_counts(lowerCAmelCase_ )


if __name__ == "__main__":
						print(f"""Total sum count for state is: {quantum_full_adder(1, 1, 1)}""")