





import math

import qiskit



def A_     (		A__ = 1		,				A__ = 1		,				A__ = 1    )  ->		qiskit.result.counts.Counts:
       if (
           isinstance(A__		,				A__    )
           or isinstance(A__		,				A__    )
           or isinstance(A__		,				A__    )
       ):
              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(A__    ) != input_a)
           or (math.floor(A__    ) != input_a)
           or (math.floor(A__    ) != 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
       a__						:     List[Any]			=    qiskit.QuantumRegister(4		,				'qr'    )
       a__						:     List[Any]			=    qiskit.ClassicalRegister(2		,				'cr'    )
       # list the entries
       a__						:     Optional[int]			=    [input_a, input_a, carry_in]

       a__						:     Optional[Any]			=    qiskit.QuantumCircuit(A__		,				A__    )

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

       a__						:     Optional[int]			=    qiskit.Aer.get_backend('aer_simulator'    )
       a__						:     Union[str, Any]			=    qiskit.execute(A__		,				A__		,				shots=1000    )

       return job.result().get_counts(A__    )


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









from __future__ import annotations

from collections.abc import Callable



def A_     (		A__		,				A__		,				A__		,				A__ = 100		,				)  ->		float:
       a__						:     Dict			=    x_start
       a__						:     Any			=    fnc(A__    )
       a__						:     Optional[int]			=    0.0
       for _ in range(A__    ):
              # Approximates small segments of curve as linear and solve
              # for trapezoidal area
              a__						:     Union[str, Any]			=    (x_end - x_start) / steps + xa
              a__						:     str			=    fnc(A__    )
              area += abs(fxa + fxa    ) * (xa - xa) / 2
              # Increment step
              a__						:     Optional[Any]			=    xa
              a__						:     Optional[int]			=    fxa
       return area


if __name__ == "__main__":



    def A_     (		A__    )  ->		List[str]:
           return x**3 + x**2

    print("""f(x) = x^3 + x^2""")
    print("""The area between the curve, x = -5, x = 5 and the x axis is:""")
    lowercase				:	Union[str, Any]      						=  1_0
    while i <= 1_0_0_0_0_0:
        print(F"""with {i} steps: {trapezoidal_area(f, -5, 5, i)}""")
        i *= 1_0


