TwoQubitBasisDecomposer¶
- class TwoQubitBasisDecomposer(gate, basis_fidelity=1.0, euler_basis='U', pulse_optimize=None)[source]¶
Bases:
object
A class for decomposing 2-qubit unitaries into minimal number of uses of a 2-qubit basis gate.
- Parameters
gate (Gate) – Two-qubit gate to be used in the KAK decomposition.
basis_fidelity (float) – Fidelity to be assumed for applications of KAK Gate. Default 1.0.
euler_basis (str) – Basis string to be provided to OneQubitEulerDecomposer for 1Q synthesis. Valid options are [‘ZYZ’, ‘ZXZ’, ‘XYX’, ‘U’, ‘U3’, ‘U1X’, ‘PSX’, ‘ZSX’, ‘RR’].
pulse_optimize (None or bool) – If True, try to do decomposition which minimizes local unitaries in between entangling gates. This will raise an exception if an optimal decomposition is not implemented. Currently, only [{CX, SX, RZ}] is known. If False, don’t attempt optimization. If None, attempt optimization but don’t raise if unknown.
Methods
Decompose target ~Ud(x, y, z) with 0 uses of the basis gate.
Decompose target ~Ud(x, y, z) with 1 uses of the basis gate ~Ud(a, b, c). Result Ur has trace: .. math::.
Decompose target ~Ud(x, y, z) with 2 uses of the basis gate.
Decompose target with 3 uses of the basis.
Computes the number of basis gates needed in a decomposition of input unitary
Give the expected traces \(|Tr(U \cdot Utarget^dag)|\) for different number of basis gates.