

'''simple docstring'''





import qiskit


def 					_UpperCAmelCase       (  _SCREAMING_SNAKE_CASE					:		int ,   _SCREAMING_SNAKE_CASE					:		int       ):





    """simple docstring"""


    SCREAMING_SNAKE_CASE_									=						qiskit.Aer.get_backend('aer_simulator'       )

    SCREAMING_SNAKE_CASE_									=						qiskit.QuantumCircuit(4 ,   2       )
    # encode inputs in qubits 0 and 1
    if bita == 1:
        qc_ha.x(0       )
    if bita == 1:
        qc_ha.x(1       )
    qc_ha.barrier()

    # use cnots to write XOR of the inputs on qubit2
    qc_ha.cx(0 ,   2       )
    qc_ha.cx(1 ,   2       )

    # use ccx / toffoli gate to write AND of the inputs on qubit3
    qc_ha.ccx(0 ,   1 ,   3       )
    qc_ha.barrier()

    # extract outputs
    qc_ha.measure(2 ,   0       )  # extract XOR value
    qc_ha.measure(3 ,   1       )  # extract AND value

    # Execute the circuit on the qasm simulator
    SCREAMING_SNAKE_CASE_									=						qiskit.execute(_SCREAMING_SNAKE_CASE ,   _SCREAMING_SNAKE_CASE ,   shots=1_000       )

    # Return the histogram data of the results of the experiment
    return job.result().get_counts(_SCREAMING_SNAKE_CASE       )


if __name__ == "__main__":
       UpperCamelCase__  :      str			=    half_adder(1, 1)
       print(F'Half Adder Output Qubit Counts: {counts}')





def 					_UpperCAmelCase       (  ):





    """simple docstring"""


    for n in range(1 ,   1_000_000       ):
        yield n * (n + 1) // 2


def 					_UpperCAmelCase       (  _SCREAMING_SNAKE_CASE					:		Tuple       ):





    """simple docstring"""


    SCREAMING_SNAKE_CASE_									=						1
    SCREAMING_SNAKE_CASE_									=						2
    while i * i <= n:
        SCREAMING_SNAKE_CASE_									=						0
        while n % i == 0:
            n //= i
            multiplicity += 1
        divisors_count *= multiplicity + 1
        i += 1
    if n > 1:
        divisors_count *= 2
    return divisors_count


def 					_UpperCAmelCase       (  ):





    """simple docstring"""


    return next(i for i in triangle_number_generator() if count_divisors(_SCREAMING_SNAKE_CASE       ) > 500       )


if __name__ == "__main__":
       print(solution())


