Closed splch closed 3 months ago
enable multi-circuit submission and retrieval of results
from qiskit import QuantumCircuit, transpile from qiskit_ionq import IonQProvider from math import pi provider = IonQProvider() backend = provider.get_backend("ionq_simulator") qc1 = QuantumCircuit(2, 2, name="2 registers") qc1.u(pi, pi / 2, pi / 4, 0) qc1.measure_all() qc1 = transpile(qc1, backend) qc2 = QuantumCircuit(3, 3, name="inverted measurements") qc2.h(1) qc2.cx(1, 2) qc2.measure([1, 2], [2, 0]) single_job = backend.run(qc1) multi_job = backend.run([qc1, qc2]) single_job.get_counts() # {'00 01': 1024} multi_job.get_counts() # [{'00 01': 1024}, {'000': 520, '110': 504}] multi_job.get_counts(qc1) # {'00 01': 1024}
we should offer a get_children() method that returns child ids and associate with indices of the Results' results list.
get_children()
look into how experiments work
Summary
enable multi-circuit submission and retrieval of results
Notes
we should offer a
get_children()
method that returns child ids and associate with indices of the Results' results list.look into how experiments work
Details and comments