
"""simple docstring"""






import math

import qiskit



def      lowerCAmelCase__			(		__magic_name__ = 1			,   __magic_name__ = 1			,   __magic_name__ = 1      )						->qiskit.result.counts.Counts:
			if (
			    isinstance(__magic_name__			,   __magic_name__      )
			    or isinstance(__magic_name__			,   __magic_name__      )
			    or isinstance(__magic_name__			,   __magic_name__      )
			):
						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(__magic_name__      ) != input_a)
			    or (math.floor(__magic_name__      ) != input_a)
			    or (math.floor(__magic_name__      ) != 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
			__lowercase       =       qiskit.QuantumRegister(4			,   "qr"      )
			__lowercase       =       qiskit.ClassicalRegister(2			,   "cr"      )
			# list the entries
			__lowercase       =       [input_a, input_a, carry_in]

			__lowercase       =       qiskit.QuantumCircuit(__magic_name__			,   __magic_name__      )

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

			__lowercase       =       qiskit.Aer.get_backend("aer_simulator"      )
			__lowercase       =       qiskit.execute(__magic_name__			,   __magic_name__			,   shots=1_0_0_0      )

			return job.result().get_counts(__magic_name__      )


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







"""simple docstring"""






_lowercase							=				'''
# Installazione di Transformers
! pip install transformers datasets
# Per installare dalla fonte invece dell\'ultima versione rilasciata, commenta il comando sopra e
# rimuovi la modalità commento al comando seguente.
# ! pip install git+https://github.com/huggingface/transformers.git
'''

_lowercase							=				[{'''type''': '''code''', '''content''': INSTALL_CONTENT}]
_lowercase							=				{
    '''{processor_class}''': '''FakeProcessorClass''',
    '''{model_class}''': '''FakeModelClass''',
    '''{object_class}''': '''FakeObjectClass''',
}





