<jupyter_start><jupyter_text>Put in your API Token and Register<jupyter_code>from qiskit import IBMQ
# Authenticate an account and add for use during this session. Replace string argument with your private token.
IBMQ.enable_account("INSERT_YOUR_API_TOKEN_HERE")
# To store your credentials locally you can run:
#IBMQ.save_account("INSERT_YOUR_API_TOKEN_HERE")<jupyter_output><empty_output><jupyter_text>List the available backends and pick one<jupyter_code>print(IBMQ.backends()) # remote IBM backends
from qiskit import Aer
print(Aer.backends()) # local backends
# Pick an available backend
backend = IBMQ.get_backend('ibmq_qasm_simulator') # if this isn't available pick a backend whose name containes '_qasm_simulator' from the output above<jupyter_output><empty_output><jupyter_text>Run your first quantum programThis program starts with an input of the quantum equivalent of five "0" bits, five quantum "0" bits. It then performs no action before it outputs the classical equivalent of the quantum bits. Since they haven't changed, the output should be 00000.<jupyter_code>import time
q = qiskit.QuantumRegister(5)
c = qiskit.ClassicalRegister(5)
qc = qiskit.QuantumCircuit(q, c)
qc.measure(q, c)
job_exp = qiskit.execute(qc, backend=backend)<jupyter_output><empty_output><jupyter_text>Seeing the resultsHere we will get output 00000 with 100% probability as our output<jupyter_code>from qiskit.tools.visualization import plot_histogram
plot_histogram(job_exp.result().get_counts(qc))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07697368421052632, 'fraction_numerical': 0.01118421052631579, 'mean_word_length': 7.4972067039106145, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '35983', 'license': 'MIT', 'n_tokens_mistral': 498, 'n_tokens_neox': 472, 'n_words': 149, 'path': 'Chapter01/Hello Quantum World.ipynb', 'repo_name': 'tavoludra1/Quantum_IBMQx', 'size': '1520'}