# validate

Source: https://docs.q-ctrl.com/references/fire-opal/fireopal/fireopal.validate

```python
fireopal.validate(circuits, credentials, backend_name, run_options=None)
```

Validate quantum circuits for compatibility with Fire Opal.

Call this function before [`execute()`](https://docs.q-ctrl.com/references/fire-opal/fireopal/fireopal.execute.md#fireopal.execute) or [`estimate_expectation()`](https://docs.q-ctrl.com/references/fire-opal/fireopal/fireopal.estimate_expectation.md#fireopal.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`](https://docs.q-ctrl.com/references/fire-opal/fireopal/fireopal.credentials.md#module-fireopal.credentials) module. For
  example, use [`make_credentials_for_ibm_cloud()`](https://docs.q-ctrl.com/references/fire-opal/fireopal/fireopal.credentials.make_credentials_for_ibm_cloud.md#fireopal.credentials.make_credentials_for_ibm_cloud) for
  IBM backends.
* **backend_name** (*str*) – Name of the backend that will execute the circuits after validation.
* **run_options** (*RunOptions* *or* *None* *,* *optional*) – Provider-specific execution options, for example,
  [`IbmRunOptions`](https://docs.q-ctrl.com/references/fire-opal/fireopal/fireopal.run_options.IbmRunOptions.md#fireopal.run_options.IbmRunOptions)).
  See the [`fireopal.run_options`](https://docs.q-ctrl.com/references/fire-opal/fireopal/fireopal.run_options.md#module-fireopal.run_options) module for available classes.
  Defaults to None.
### Returns
[`FireOpalJob`](https://docs.q-ctrl.com/references/fire-opal/fireopal/fireopal.FireOpalJob.md#fireopal.FireOpalJob) – A job object whose [`result()`](https://docs.q-ctrl.com/references/fire-opal/fireopal/fireopal.FireOpalJob.result.md#fireopal.FireOpalJob.result) method returns a dictionary
containing:

  `results (list[str])`
  : Contains validation details for each circuit, including characteristics of the
    transpiled circuit and metadata for the target backend.

  `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.
