Qiskit / documentation

The documentation content home for https://docs.quantum.ibm.com.
https://docs.quantum.ibm.com
Apache License 2.0
29 stars 48 forks source link

Review/refactor "submit user transpiled circuits" tutorials #1139

Open javabster opened 3 months ago

javabster commented 3 months ago

https://learning.quantum.ibm.com/tutorial/submit-transpiled-circuits

frankharkins commented 2 months ago

Piggybacking on this to report that the current notebook does not work. Here's the problem cell and its traceback.

# Need to add measurements to the circuit
qc.measure_all()

circuits = []
for optimization_level in [0, 3]:
    t_qc = transpile(qc, backend, optimization_level=optimization_level, seed_transpiler=0)
    print(f"CNOTs (optimization_level={optimization_level}): ", t_qc.count_ops()["cx"])
    circuits.append(t_qc)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Cell In[5], line 7
      5 for optimization_level in [0, 3]:
      6     t_qc = transpile(qc, backend, optimization_level=optimization_level, seed_transpiler=0)
----> 7     print(f"CNOTs (optimization_level={optimization_level}): ", t_qc.count_ops()["cx"])
      8     circuits.append(t_qc)

KeyError: 'cx'
beckykd commented 1 month ago

Also note that this tutorial says that the runtime still transpiles circuits but it doesn't.

beckykd commented 3 weeks ago

Accidentally started updating this with #1286 , so now there is a PR for this work: #1540