



'''simple docstring'''





import qiskit
def    _SCREAMING_SNAKE_CASE  (       UpperCamelCase							,    UpperCamelCase			):



    """simple docstring"""





    lowerCAmelCase__ :  Union[str, Any]							      =					qiskit.Aer.get_backend("""aer_simulator"""			)

    lowerCAmelCase__ :  Any							      =					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
    lowerCAmelCase__ :  int							      =					qiskit.execute(snake_case_							,    snake_case_							,    shots=1000			)

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


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









"""simple docstring"""



import requests

a_ =			""""""  # <-- Put your OpenWeatherMap appid here!
a_ =			"""https://api.openweathermap.org/data/2.5/"""







def 		__lowercase     (   snake_case_  :  str = "Chicago"				,snake_case_  :  str = APPID						)   ->dict:



    '''simple docstring'''







    return requests.get(URL_BASE + '''weather'''				,params=locals()						).json()







def 		__lowercase     (   snake_case_  :  str = "Kolkata, India"				,snake_case_  :  str = APPID						)   ->dict:



    '''simple docstring'''







    return requests.get(URL_BASE + '''forecast'''				,params=locals()						).json()







def 		__lowercase     (   snake_case_  :  float = 55.68				,snake_case_  :  float = 12.57				,snake_case_  :  str = APPID						)   ->dict:



    '''simple docstring'''







    return requests.get(URL_BASE + '''onecall'''				,params=locals()						).json()


if __name__ == "__main__":
       from pprint import pprint

       while True:
              a_ =			input("""Enter a location:""").strip()
              if location:
                     pprint(current_weather(location))
              else:
                     break




