documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Review/refactor "submit user transpiled circuits" tutorials

Open javabster opened this issue 1 year ago • 1 comments

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

  • [ ] review if this tutorial should be a tutorial or a docs page
  • [ ] improve overall quality of content (including update to qiskit 1.0 and primitives v2)

javabster avatar Apr 05 '24 13:04 javabster

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'

frankharkins avatar Apr 24 '24 10:04 frankharkins

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

beckykd avatar May 28 '24 19:05 beckykd

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

beckykd avatar Jun 13 '24 14:06 beckykd