


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


_UpperCAmelCase			:  List[str]     =logging.get_logger(__name__)

_UpperCAmelCase			:  List[str]     ={
    """tiiuae/falcon-40b""": """https://huggingface.co/tiiuae/falcon-40b/resolve/main/config.json""",
    """tiiuae/falcon-7b""": """https://huggingface.co/tiiuae/falcon-7b/resolve/main/config.json""",
}







class 				snake_case__(							UpperCAmelCase__							):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__      :  Tuple					=							"""falcon"""
						SCREAMING_SNAKE_CASE__      :  List[Any]					=							["""past_key_values"""]




						def __init__(				self   ,						__lowercase=6_5_0_2_4   ,						__lowercase=4_5_4_4   ,						__lowercase=3_2   ,						__lowercase=7_1   ,						__lowercase=1e-5   ,						__lowercase=0.02   ,						__lowercase=True   ,						__lowercase=0.0   ,						__lowercase=0.0   ,						__lowercase=None   ,						__lowercase=False   ,						__lowercase=False   ,						__lowercase=True   ,						__lowercase=True   ,						__lowercase=False   ,						__lowercase=1_1   ,						__lowercase=1_1   ,						**__lowercase   ,						)					->    Any:
										lowerCAmelCase_ :      int    				=				vocab_size
										# Backward compatibility with n_embed kwarg
										lowerCAmelCase_ :      List[Any]    				=				kwargs.pop('''n_embed'''   ,						__lowercase							)
										lowerCAmelCase_ :      List[Any]    				=				hidden_size if n_embed is None else n_embed
										lowerCAmelCase_ :      Tuple    				=				num_hidden_layers
										lowerCAmelCase_ :      Any    				=				num_attention_heads
										lowerCAmelCase_ :      int    				=				layer_norm_epsilon
										lowerCAmelCase_ :      Union[str, Any]    				=				initializer_range
										lowerCAmelCase_ :      Tuple    				=				use_cache
										lowerCAmelCase_ :      Optional[Any]    				=				hidden_dropout
										lowerCAmelCase_ :      Any    				=				attention_dropout

										lowerCAmelCase_ :      Tuple    				=				bos_token_id
										lowerCAmelCase_ :      Optional[Any]    				=				eos_token_id
										lowerCAmelCase_ :      Any    				=				num_attention_heads if num_kv_heads is None else num_kv_heads
										lowerCAmelCase_ :      str    				=				alibi
										lowerCAmelCase_ :      Union[str, Any]    				=				new_decoder_architecture
										lowerCAmelCase_ :      List[Any]    				=				multi_query  # Ignored when new_decoder_architecture is True
										lowerCAmelCase_ :      Any    				=				parallel_attn
										lowerCAmelCase_ :      str    				=				bias

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




						@property
						def 						lowercase_ (				self							)					->    Optional[int]:
										return self.hidden_size // self.num_attention_heads




						@property
						def 						lowercase_ (				self							)					->    Any:
										return not self.alibi



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