---
title: CliffordUnitarySynthesis (dev version)
description: API reference for qiskit.transpiler.passes.synthesis.clifford_unitary_synth_plugin.CliffordUnitarySynthesis in the dev version of qiskit
source: https://quantum.cloud.ibm.com/docs/en/api/qiskit/dev/qiskit.transpiler.passes.synthesis.clifford_unitary_synth_plugin.CliffordUnitarySynthesis
---

# CliffordUnitarySynthesis

*class* `qiskit.transpiler.passes.synthesis.clifford_unitary_synth_plugin.CliffordUnitarySynthesis`

[GitHub](https://github.com/Qiskit/qiskit/tree/main/qiskit/transpiler/passes/synthesis/clifford_unitary_synth_plugin.py#L36-L123)

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

A Clifford unitary synthesis plugin.

The plugin is invoked by the [`UnitarySynthesis`](/docs/api/qiskit/dev/qiskit.transpiler.passes.UnitarySynthesis "qiskit.transpiler.passes.UnitarySynthesis") transpiler pass when the parameter `method` is set to `"clifford"`.

The plugin checks if the given unitary can be represented by a Clifford, in which case it returns a circuit implementing this unitary and consisting only of Clifford gates.

In addition, the parameter `plugin_config` of [`UnitarySynthesis`](/docs/api/qiskit/dev/qiskit.transpiler.passes.UnitarySynthesis "qiskit.transpiler.passes.UnitarySynthesis") can be used to pass the following plugin-specific parameters:

- min\_qubits: the minimum number of qubits to consider (the default value is 1).
- max\_qubits: the maximum number of qubits to consider (the default value is 3).

## Attributes

### max\_qubits

### min\_qubits

### supported\_bases

### supports\_basis\_gates

### supports\_coupling\_map

### supports\_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/dev/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

### 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/dev/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

### supports\_pulse\_optimize

### supports\_target

Whether the plugin supports taking `target` as an option

`target` will be a [`Target`](/docs/api/qiskit/dev/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/dev/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/dev/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/main/qiskit/transpiler/passes/synthesis/clifford_unitary_synth_plugin.py#L91-L123)

Run the CliffordUnitarySynthesis plugin on the given unitary.
