Reviewing the results of your quantum circuit on Quantum Lab Notebooks
- From the open Notebook, enter and run the following in the next empty cell:
backend = Aer.get_backend('qasm_simulator')
The preceding code generates a
backendobject that will connect to the specified simulator or device. In this case, we are generating a
backendobject linked to the QASM simulator.
- In the next empty cell, let's run the
executefunction. This function takes in three parameters—the circuit we wish to run, the backend we want to run it on, and how many
shotswe wish to execute. The returned object will be a job object with the contents of the executed circuit on the backend. The code for this can be seen here:
job_simulator = execute(qc, backend, shots=1024)
- We now want to extract the results...