---
title: Q-CTRL Optimization Solver by Global Data Quantum API reference
description: API reference for Optimization Solver, A Qiskit Function by Q-CTRL Fire Opal
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/functions/q-ctrl-optimization-solver
---

# Q-CTRL Optimization Solver by Global Data Quantum API reference

- [**Qiskit Functions**](/docs/guides/q-ctrl-optimization-solver) — Qiskit Functions — pre-built tools created by partner organizations — abstract away parts of the software development workflow to simplify and accelerate utility-scale algorithm discovery and application development. Click to view the guide for this Qiskit Function.

## Inputs

### `problem`

Type: `str or SparsePauliOp`

Default value: `None`

One of the representations listed under "Accepted problem formats".

- Required: Yes
- Example: `Poly(2.0*n[0]*n[1] + 2.0*n[0]*n[2] - 3.13520241298341*n[0] + 2.0*n[1]*n[2] - 3.14469748506794*n[1] - 3.18897660121566*n[2] + 6.0, n[0], n[1], n[2], domain='RR')`

### `problem_type`

Type: `str`

Default value: `None`

Name of the problem class; only used for graph and spin chain problem definitions, which are limited to `"maxcut"` or `"spin_chain"`; not required for arbitrary objective function problem definitions.

- Required: No
- Example: `"maxcut"`

### `backend_name`

Type: `str`

Default value: `Least busy backend`

Name of the backend to use.

- Required: No
- Example: `"ibm_fez"`

### Options

Type: `dict`

Default value: `None`

Input options, including the following: (Optional) `session_id`: `str`; default behavior creates a new Session. Options are specified as a nested dictionary. See the full [list of options](#options-list) and their default values.

- Required: No
- Example: `{"session_id": "cw2q70c79ws0008z6g4g"}`

#### Options list

##### `session_id`

Type: `str`

Default value: `None`

An existing IBM Quantum Compute Service session ID.

- Default: `None`
- Example: `"cw4r3je6f0t010870y3g"`

##### `job_tags`

Type: `list[str]`

Default value: `None`

A list of job tags.

- Default: `None`
- Example: `["job_tag1", "job_tag2"]`

## Outputs

### `result`

Type: `dict[str, Any]`

Solution and metadata listed under [Result dictionary contents](#result-dictionary-contents).

Example: `{'solution_bitstring_cost': 3.0, `final\_bitstring\_distribution`: {`000001`: 100, `000011`: 2}, `iteration\_count`: 3, 'solution_bitstring': `000001`,  'variables_to_bitstring_index_map': {n[1]': 5, 'n[2]': 4, 'n[3]': 3, 'n[4]': 2, 'n[5]': 1}, 'best_parameters': [0.19628831763697097, -1.047052334523102], 'warnings': []}`

### Result dictionary contents

#### `solution_bitstring_cost`

Type: `float`

The best minimum cost across all iterations.

#### `final_bitstring_distribution`

Type: `CountsDict`

The bitstring counts dictionary associated with the minimum cost.

#### `solution_bitstring`

Type: `str`

Bitstring with the best cost in the final distribution.

#### `iteration_count`

Type: `int`

The total number of QAOA iterations performed by the Solver.

#### `variables_to_bitstring_index_map`

Type: `float`

The mapping from the variables to the equivalent bit in the bitstring.

#### `best_parameters`

Type: `list[float]`

The optimized beta and gamma parameters across all iterations.

#### `warnings`

Type: `list[str]`

Default value: `None`

The warnings produced while compiling or running QAOA.
