import qiskit

from qiskit import *

n = int(input("Enter the length of binry string: "))
n_q = n
n_c = n
qc = QuantumCircuit(n_q,n_c)
for i in range(n):
    qc.h(i)
    qc.measure(i,i)
qc.draw('mpl')

simulator = Aer.get_backend('qasm_simulator')
result = execute(qc, backend = simulator, shots = 1).result()
counts = result.get_counts()
print(counts)

