iterate

fireopal.iterate(circuits, shot_count, credentials, backend_name, parameters=None, run_options=None)

Submit circuits for execution with optimized queuing for repeated submissions.

Use iterate instead of execute when submitting multiple jobs in succession, such as variational algorithms (VQE, QAOA) or batch workloads that exceed the 300-circuit limit per job. Fire Opal automatically manages provider-specific features like Qiskit Runtime sessions to reduce queuing and preprocessing time between submissions. Call stop_iterate when finished to release the session.

Parameters

  • circuits (str or list [ str ]) – Quantum circuits as QASM 2.0 or 3.0 strings. Convert Qiskit QuantumCircuit objects using qiskit.qasm2.dumps or qiskit.qasm3.dumps.
  • shot_count (int) – Number of measurements (shots) to take per circuit.
  • credentials (Credentials) – Credentials for the target hardware provider, created using the appropriate helper from the fireopal.credentials module. For example, use make_credentials_for_ibm_cloud() for IBM backends.
  • backend_name (str) – Name of the target backend device (for example, "ibm_boston"). Call show_supported_devices() to list available names for your credentials.
  • parameters (dict [ str , float ] or list [ dict [ str , float ] ] or None , optional) – Parameter bindings for parametric circuits. Provide a single dict to apply the same bindings to every circuit, or a list with one dict per circuit. Defaults to None.
  • run_options (RunOptions or None , optional) – Provider-specific execution options, for example IbmRunOptions. See the fireopal.run_options module for available classes. Defaults to None.

Returns

FireOpalJob – A job object whose result() method returns a dictionary containing:

results (list[dict[str, int]]) : The measured bitstring counts for each circuit, where each dictionary maps bitstring outcomes to the number of times they were observed.

Was this useful?