Skip to content

Commit da6bfd8

Browse files
committed
Fix undefined 'backend' in IBMQ getting-started example
The IBMQ example declares 'nairobi_device' but then calls 'backend.run_circuit(...)', which is not defined in that code block (it happens to resolve only by leaking the AerBackend from the earlier Aer example). Run the compiled circuit on 'nairobi_device' instead.
1 parent 2d03cce commit da6bfd8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎pytket/docs/getting_started.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ nairobi_device = IBMQBackend('ibm_nairobi')
117117
118118
# Compile Circuit to use supported gates of IBMQ Nairobi
119119
compiled_circ = nairobi_device.get_compiled_circuit(circ)
120-
result = backend.run_circuit(compiled_circ, n_shots=100)
120+
result = nairobi_device.run_circuit(compiled_circ, n_shots=100)
121121
```
122122

123123
Here the default compilation pass is applied by `IBMQBackend.get_compiled_circuit`. See [this page](https://docs.quantinuum.com/tket/extensions/pytket-qiskit/#default-compilation) for more details.

0 commit comments

Comments
 (0)