import qiskit

qiskit.__qiskit_version__

from qiskit import IBMQ

IBMQ.save_account('86ae6d9e149ed5f78869fe4c6ba5b9b42419053fed9e1c0f731d63d6c7b416c9812292cc69fd2cf108e4096a6c3e20f5d7366d48de2ac650fc599d86acaa526c')

IBMQ.load_account()

from qiskit import *
qr = QuantumRegister(2)
cr = ClassicalRegister(2)
circuit = QuantumCircuit(qr, cr)
circuit = QuantumCircuit(qr, cr)
circuit.draw()


circuit.h(qr[0])

circuit.draw(output= 'mpl')

circuit.cx(qr[0], qr[1])

circuit.draw(output= 'mpl')

circuit.measure(qr, cr)

circuit.draw(output= 'mpl')

simulator = Aer.get_backend("qasm_simulator")

execute(circuit, backend = simulator)

result = execute(circuit, backend = simulator).result()

from qiskit.tools.visualization import plot_histogram

plot_histogram(result.get_counts(circuit))

IBMQ.load_account()

provider = IBMQ.get_provider(hub='ibm-q', group='open', project='main')

provider.backends()

qcomp = provider.get_backend('ibmq_santiago')

job = execute(circuit, backend=qcomp)

from qiskit.tools.monitor import job_monitor

job_monitor(job)

result = job.result()

plot_histogram(result.get_count(circuit))

