---
title: Split2QUnitaries (v1.3)
description: API reference for qiskit.transpiler.passes.Split2QUnitaries in qiskit v1.3
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/1.3/qiskit.transpiler.passes.Split2QUnitaries
---

# Split2QUnitaries

*class* `qiskit.transpiler.passes.Split2QUnitaries(*args, **kwargs)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.3/qiskit/transpiler/passes/optimization/split_2q_unitaries.py#L20-L40)

Bases: [`TransformationPass`](/docs/api/qiskit/1.3/qiskit.transpiler.TransformationPass "qiskit.transpiler.basepasses.TransformationPass")

Attempt to splits two-qubit unitaries in a [`DAGCircuit`](/docs/api/qiskit/1.3/qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") into two single-qubit gates.

This pass will analyze all [`UnitaryGate`](/docs/api/qiskit/1.3/qiskit.circuit.library.UnitaryGate "qiskit.circuit.library.UnitaryGate") instances and determine whether the matrix is actually a product of 2 single qubit gates. In these cases the 2q gate can be simplified into two single qubit gates and this pass will perform this optimization and will replace the two qubit gate with two single qubit [`UnitaryGate`](/docs/api/qiskit/1.3/qiskit.circuit.library.UnitaryGate "qiskit.circuit.library.UnitaryGate").

**Parameters**

**fidelity** – Allowed tolerance for splitting two-qubit unitaries and gate decompositions.

## Attributes

### is\_analysis\_pass

Check if the pass is an analysis pass.

If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.

### is\_transformation\_pass

Check if the pass is a transformation pass.

If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).

## Methods

### execute

`execute(passmanager_ir, state, callback=None)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.3/qiskit/transpiler/basepasses.py#L189-L211)

Execute optimization task for input Qiskit IR.

**Parameters**

- **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – Qiskit IR to optimize.
- **state** ([*PassManagerState*](/docs/api/qiskit/1.3/qiskit.passmanager.PassManagerState "qiskit.passmanager.compilation_status.PassManagerState")) – State associated with workflow execution by the pass manager itself.
- **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable) *| None*) – A callback function which is caller per execution of optimization task.

**Returns**

Optimized Qiskit IR and state of the workflow.

**Return type**

[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any), [qiskit.passmanager.compilation\_status.PassManagerState](/docs/api/qiskit/1.3/qiskit.passmanager.PassManagerState "qiskit.passmanager.compilation_status.PassManagerState")]

### name

`name()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.3/qiskit/passmanager/base_tasks.py#L68-L70)

Name of the pass.

**Return type**

[str](https://docs.python.org/3/library/stdtypes.html#str)

### run

`run(dag)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.3/qiskit/transpiler/passes/optimization/split_2q_unitaries.py#L37-L40)

Run the Split2QUnitaries pass on dag.

**Parameters**

**dag** ([*DAGCircuit*](/docs/api/qiskit/1.3/qiskit.dagcircuit.DAGCircuit "qiskit._accelerate.circuit.DAGCircuit")) –

**Return type**

[*DAGCircuit*](/docs/api/qiskit/1.3/qiskit.dagcircuit.DAGCircuit "qiskit._accelerate.circuit.DAGCircuit")

### update\_status

`update_status(state, run_state)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.3/qiskit/transpiler/basepasses.py#L213-L221)

Update workflow status.

**Parameters**

- **state** ([*PassManagerState*](/docs/api/qiskit/1.3/qiskit.passmanager.PassManagerState "qiskit.passmanager.compilation_status.PassManagerState")) – Pass manager state to update.
- **run\_state** (*RunState*) – Completion status of current task.

**Returns**

Updated pass manager state.

**Return type**

[*PassManagerState*](/docs/api/qiskit/1.3/qiskit.passmanager.PassManagerState "qiskit.passmanager.compilation_status.PassManagerState")
