---
title: RossSelingerSynthesis (latest version)
description: API reference for qiskit.transpiler.passes.synthesis.ross_selinger_plugin.RossSelingerSynthesis in the latest version of qiskit
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/qiskit.transpiler.passes.synthesis.ross_selinger_plugin.RossSelingerSynthesis
---

# RossSelingerSynthesis

*class* `qiskit.transpiler.passes.synthesis.ross_selinger_plugin.RossSelingerSynthesis`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/transpiler/passes/synthesis/ross_selinger_plugin.py#L32-L114)

Bases: [`UnitarySynthesisPlugin`](/docs/api/qiskit/qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugin "qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugin")

A Ross-Selinger Qiskit unitary synthesis plugin.

The algorithm is described in \[1]. The source code (in Rust) is available at [https://github.com/qiskit-community/rsgridsynth](https://github.com/qiskit-community/rsgridsynth).

This plugin is invoked by [`transpile()`](/docs/api/qiskit/compiler#qiskit.compiler.transpile "qiskit.compiler.transpile") when the `unitary_synthesis_method` parameter is set to `"gridsynth"`.

This plugin supports customization and additional parameters can be passed to the plugin by passing a dictionary as the `unitary_synthesis_plugin_config` parameter of the [`transpile()`](/docs/api/qiskit/compiler#qiskit.compiler.transpile "qiskit.compiler.transpile") function.

Supported parameters in the dictionary:

**epsilon (f64):**

The allowed approximation error.

References:

**\[1] Neil J. Ross, Peter Selinger, Optimal ancilla-free Clifford+T approximation of z-rotations,**

[arXiv:1403.2975](https://arxiv.org/pdf/1403.2975)

## Attributes

### max\_qubits

Maximum number of supported qubits is `1`.

### min\_qubits

Minimum number of supported qubits is `1`.

### supported\_bases

The plugin does not support bases for synthesis.

### supports\_basis\_gates

The plugin does not support basis gates. By default it synthesizes to the `["h", "s", "t", "x"]` gate basis.

### supports\_coupling\_map

The plugin does not support coupling maps.

### supports\_gate\_errors

The plugin does not support gate errors.

### supports\_gate\_errors\_by\_qubit

Return whether the plugin supports taking `gate_errors_by_qubit`

This differs from `supports_gate_errors`/`gate_errors` by using a different view of the same data. Instead of being keyed by gate name this is keyed by qubit and uses [`Gate`](/docs/api/qiskit/qiskit.circuit.Gate "qiskit.circuit.Gate") instances to represent gates (instead of gate names).

`gate_errors_by_qubit` will be a dictionary in the form of `{(qubits,): [Gate, error]}`. For example:

```python
{
(0,): [SXGate(): 0.0006149355812506126, RZGate(): 0.0],
(0, 1): [CXGate(): 0.012012477900732316]
}
```

Do note that this dictionary might not be complete or could be empty as it depends on the target backend reporting gate errors on every gate for each qubit. The gate error rates reported in `gate_errors` are provided by the target device `Backend` object and the exact meaning might be different depending on the backend.

This defaults to False

### supports\_gate\_lengths

The plugin does not support gate lengths.

### supports\_gate\_lengths\_by\_qubit

Return whether the plugin supports taking `gate_lengths_by_qubit`

This differs from `supports_gate_lengths`/`gate_lengths` by using a different view of the same data. Instead of being keyed by gate name this is keyed by qubit and uses [`Gate`](/docs/api/qiskit/qiskit.circuit.Gate "qiskit.circuit.Gate") instances to represent gates (instead of gate names)

`gate_lengths_by_qubit` will be a dictionary in the form of `{(qubits,): [Gate, length]}`. For example:

```python
{
(0,): [SXGate(): 0.0006149355812506126, RZGate(): 0.0],
(0, 1): [CXGate(): 0.012012477900732316]
}
```

where the `length` value is in units of seconds.

Do note that this dictionary might not be complete or could be empty as it depends on the target backend reporting gate lengths on every gate for each qubit.

This defaults to False

### supports\_natural\_direction

The plugin does not support natural direction, it does not assume bidirectional two qubit gates.

### supports\_pulse\_optimize

The plugin does not support optimization of pulses.

### supports\_target

Whether the plugin supports taking `target` as an option

`target` will be a [`Target`](/docs/api/qiskit/qiskit.transpiler.Target "qiskit.transpiler.Target") object representing the target device for the output of the synthesis pass.

By default this will be `False` since the plugin interface predates the [`Target`](/docs/api/qiskit/qiskit.transpiler.Target "qiskit.transpiler.Target") class. If a plugin returns `True` for this attribute, it is expected that the plugin will use the [`Target`](/docs/api/qiskit/qiskit.transpiler.Target "qiskit.transpiler.Target") instead of the values passed if any of `supports_gate_lengths`, `supports_gate_errors`, `supports_coupling_map`, and `supports_basis_gates` are set (although ideally all those parameters should contain duplicate information).

## Methods

### run

`run(unitary, **options)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/transpiler/passes/synthesis/ross_selinger_plugin.py#L104-L114)

Run the Ross-Selinger synthesis plugin on the given unitary.
