import functools



def lowerCamelCase						(     SCREAMING_SNAKE_CASE						,    SCREAMING_SNAKE_CASE			):
    '''simple docstring'''







    __UpperCamelCase  :List[Any]    						=	len(SCREAMING_SNAKE_CASE			)
    __UpperCamelCase  :Optional[Any]    						=	len(SCREAMING_SNAKE_CASE			)

    @functools.cache
    def min_distance(SCREAMING_SNAKE_CASE						,    SCREAMING_SNAKE_CASE			) -> int:
        # if first word index is overflow - delete all from the second word
        if indexa >= len_worda:
            return len_worda - indexa
        # if second word index is overflow - delete all from the first word
        if indexa >= len_worda:
            return len_worda - indexa
        __UpperCamelCase  :str    						=	int(worda[indexa] != worda[indexa]			)  # current letters not identical
        return min(
            1 + min_distance(indexa + 1						,    SCREAMING_SNAKE_CASE			)						,    1 + min_distance(SCREAMING_SNAKE_CASE						,    indexa + 1			)						,    diff + min_distance(indexa + 1						,    indexa + 1			)						,    )

    return min_distance(0						,    0			)


if __name__ == "__main__":
    import doctest

    doctest.testmod()






import qiskit



def lowerCamelCase						(     SCREAMING_SNAKE_CASE						,    SCREAMING_SNAKE_CASE			):
    '''simple docstring'''







    __UpperCamelCase  :Dict    						=	qiskit.Aer.get_backend('''aer_simulator'''			)

    __UpperCamelCase  :Tuple    						=	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
    __UpperCamelCase  :Optional[Any]    						=	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__":
    __lowercase											=      half_adder(1, 1)
    print(F'Half Adder Output Qubit Counts: {counts}')





