validate

fireopal.validate(circuits, credentials, backend_name)

Validate quantum circuits for compatibility with Fire Opal.

Call this function before execute() or estimate_expectation() to verify that circuits meet Fire Opal’s processing requirements on the specified backend. Validation does not consume execution credits.

Each circuit is checked for the following constraints:

  • Is a valid QASM 2.0/3.0 string, free of syntax errors.
  • Has at least one measurement gate and one quantum register.
  • Contains no physical qubit specifications or ancilla qubits.
  • Contains no conditional operations.
  • Contains fewer than 20,000 multi-qubit gates.
  • Contains no mid-circuit measurements, unless an IBM backend is requested.
  • Contains only one classical register, unless an IBM backend is requested.
  • Does not require more qubits than available on the requested backend.

Parameters

  • circuits (list [ str ]) – Quantum circuits as QASM 2.0 or 3.0 strings. Convert Qiskit QuantumCircuit objects using qiskit.qasm2.dumps or qiskit.qasm3.dumps.
  • 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 backend that will execute the circuits after validation.

Returns

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

results (list[str]) : Validation errors. If empty, the circuits can be submitted for execution.

warnings (list[str]) : Warnings about the circuits that do not prevent execution, but may impact performance. For example, a warning will be issued if a circuit’s duration is approaching the requested backend’s T1 limit.

Was this useful?