!pip install qiskit

from qiskit import IBMQ

IBMQ.backends()

IBMQ.stored_accounts()

IBMQ.enable_account("7099aa657902a0c2289d1f31dfcd2166e8491773275a1c891362c73facd343a1aa9d4c77c27328bfca8de4ec42047f50c90ff7df5af406807251b7c7cab96223")

IBMQ.backends()

IBMQ.load_accounts()

IBMQ.backends(operational=True, simulator=False)

backend=IBMQ.get_backend('ibmqx4')

backend.name()

backend.status()

from qiskit import execute, QuantumRegister, ClassicalRegister, QuantumCircuit

q = QuantumRegister(2)
c = ClassicalRegister(2)

qc = QuantumCircuit(q,c)

qc.h(q[0])
qc.cx(q[0],q[1])

qc.barrier(q)
qc.measure(q,c)

qc.draw()

job=execute(qc,backend=backend,shots=1024)

job.status()

res=job.result()
res.get_counts()

from qiskit.tools.visualization import plot_histogram

plot_histogram(res.get_counts())

