pip install qiskit

from qiskit import *
qr = QuantumRegister(2)
cr = ClassicalRegister(2)
circuit = QuantumCircuit(qr , cr)
circuit.h(qr[0])
circuit.cx(qr[0], qr[1])
circuit.measure(qr,cr)
circuit.draw(output='mpl')

from qiskit.visualization import plot_histogram

backend=Aer.get_backend('qasm_simulator')
counts = execute(circuit, backend= backend, shots= 1024).result().get_counts()
plot_histogram(counts)

IBMQ.save_account('copy your token here')
IBMQ.load_account()

from qiskit.visualization import plot_histogram
from qiskit.tools.monitor import job_monitor   #used to monitor the job process

provider = IBMQ.get_provider('ibm-q')
qcomp = provider.get_backend('ibmq_16_melbourne')
job=execute(circuit, backend=qcomp)
job_monitor(job)
rishwi=job.result()
plot_histogram(rishwi.get_counts(circuit))