Tries to decompose a parameterized 2q operation into √iSWAP's + parameterized 1q rotations.
cirq.parameterized_2q_op_to_sqrt_iswap_operations(
op: 'cirq.Operation', *, use_sqrt_iswap_inv: bool = False
) -> protocols.decompose_protocol.DecomposeResult
Currently only supports decomposing the following gates:
a) cirq.CZPowGate
b) cirq.SwapPowGate
c) cirq.ISwapPowGate
d) cirq.FSimGate
Args | |
---|---|
op
|
Parameterized two qubit operation to be decomposed into sqrt-iswaps. |
use_sqrt_iswap_inv
|
If True, cirq.SQRT_ISWAP_INV is used as the target 2q gate, instead
of cirq.SQRT_ISWAP .
|
Returns | |
---|---|
A parameterized cirq.OP_TREE implementing op using only cirq.SQRT_ISWAP
(or cirq.SQRT_ISWAP_INV ) and parameterized single qubit rotations OR
None or NotImplemented if decomposition of op is not known.
|