Check your installation of Qiskit by running the following code, and refer to Chapter 1, What is Quantum Computing?, in the Setup and run Qiskit examples section, as required for troubleshooting:
from qiskit import Aer
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")
Recall that to get your API token, log into IBM QX at https://quantumexperience.ng.bluemix.net/qx and then go to My Account. The API token will be in the upper right of the user interface. Click on Advanced, then on Copy API Token to insert it here.
Run the following code:
import qiskit
from qiskit.tools.visualization import plot_histogram
# Pick an available backend
backend = IBMQ.get_backend('ibmq_qasm_simulator')
# Setup 5 quantum and 5 classical registers, performing a measurement
q = qiskit.QuantumRegister(5)
c = qiskit.ClassicalRegister(5)
qc = qiskit.QuantumCircuit(q, c)
qc.measure(q, c)
# Executing the job on IBM QX
job_exp = qiskit.execute(qc, backend=backend)
plot_histogram(job_exp.result().get_counts(qc))
You should get, as you did in Chapter 1, What is Quantum Computing? 00000 in the classic register with 100% probability:
Note, if you are at a loss for a backend, Qiskit always has a local simulator available, with the backend name of local_qasm_simulator, which doesn't require registering with the IBM QX API. If you have registered, then the backend of ibm_qasm_simulator is always available.