cnot2cz_decomposer
CNOT2CZDecomposer
Bases: Decomposer
Source code in opensquirrel/passes/decomposer/cnot2cz_decomposer.py
decompose
Predefined decomposition of CNOT gate into CZ gate with Ry rotations.
Note
This decomposition preserves the global phase of the CNOT gate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gate
|
Gate
|
CNOT gate to decompose. |
required |
Returns:
| Type | Description |
|---|---|
list[Gate]
|
A sequence of gates, Ry(-π/2)-CZ-Ry(π/2), that decompose the CNOT gate. |

