


import math

import qiskit






def 							_lowercase    (		SCREAMING_SNAKE_CASE_   :		int = 1       ,  SCREAMING_SNAKE_CASE_   :		int = 1       ,  SCREAMING_SNAKE_CASE_   :		int = 1	):





			"""simple docstring"""




			if (
			    isinstance(snake_case__       ,  snake_case__	)
			    or isinstance(snake_case__       ,  snake_case__	)
			    or isinstance(snake_case__       ,  snake_case__	)
			):
						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(snake_case__	) != input_a)
			    or (math.floor(snake_case__	) != input_a)
			    or (math.floor(snake_case__	) != 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
			UpperCamelCase         =					qiskit.QuantumRegister(4       ,  """qr"""	)
			UpperCamelCase         =					qiskit.ClassicalRegister(2       ,  """cr"""	)
			# list the entries
			UpperCamelCase         =					[input_a, input_a, carry_in]

			UpperCamelCase         =					qiskit.QuantumCircuit(snake_case__       ,  snake_case__	)

			for i in range(0       ,  3	):
						if entry[i] == 2:
									quantum_circuit.h(snake_case__	)  # for hadamard entries
						elif entry[i] == 1:
									quantum_circuit.x(snake_case__	)  # for 1 entries
						elif entry[i] == 0:
									quantum_circuit.i(snake_case__	)  # 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]       ,  snake_case__	)  # measure the last two qbits

			UpperCamelCase         =					qiskit.Aer.get_backend("""aer_simulator"""	)
			UpperCamelCase         =					qiskit.execute(snake_case__       ,  snake_case__       ,  shots=1_000	)

			return job.result().get_counts(snake_case__	)


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








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


__snake_case            =   logging.get_logger(__name__)

__snake_case            =   {
    "SCUT-DLVCLab/lilt-roberta-en-base": (
        "https://huggingface.co/SCUT-DLVCLab/lilt-roberta-en-base/resolve/main/config.json"
    ),
}




class    UpperCAmelCase					(       __snake_case    ):
			lowercase						= """lilt"""




			def __init__(						self							:		Tuple       ,       __magic_name__							:		Tuple=3_0_5_2_2       ,       __magic_name__							:		List[str]=7_6_8       ,       __magic_name__							:		Optional[Any]=1_2       ,       __magic_name__							:		str=1_2       ,       __magic_name__							:		Tuple=3_0_7_2       ,       __magic_name__							:		List[Any]="gelu"       ,       __magic_name__							:		Dict=0.1       ,       __magic_name__							:		str=0.1       ,       __magic_name__							:		Dict=5_1_2       ,       __magic_name__							:		Any=2       ,       __magic_name__							:		Optional[int]=0.02       ,       __magic_name__							:		Optional[int]=1e-12       ,       __magic_name__							:		Optional[int]=0       ,       __magic_name__							:		List[str]="absolute"       ,       __magic_name__							:		List[Any]=None       ,       __magic_name__							:		str=4       ,       __magic_name__							:		Any=1_0_2_4       ,       **__magic_name__							:		List[str]       ,       ):







						"""simple docstring"""







						super().__init__(pad_token_id=__magic_name__       ,       **__magic_name__						)

						UpperCamelCase         =					vocab_size
						UpperCamelCase         =					hidden_size
						UpperCamelCase         =					num_hidden_layers
						UpperCamelCase         =					num_attention_heads
						UpperCamelCase         =					hidden_act
						UpperCamelCase         =					intermediate_size
						UpperCamelCase         =					hidden_dropout_prob
						UpperCamelCase         =					attention_probs_dropout_prob
						UpperCamelCase         =					max_position_embeddings
						UpperCamelCase         =					type_vocab_size
						UpperCamelCase         =					initializer_range
						UpperCamelCase         =					layer_norm_eps
						UpperCamelCase         =					position_embedding_type
						UpperCamelCase         =					classifier_dropout
						UpperCamelCase         =					channel_shrink_ratio
						UpperCamelCase         =					max_ad_position_embeddings




