qiskit.quantum_info.TwoQubitBasisDecomposer¶

class
TwoQubitBasisDecomposer
(gate, basis_fidelity=1.0, euler_basis=None)[소스]¶ A class for decomposing 2qubit unitaries into minimal number of uses of a 2qubit basis gate.
 매개변수
gate (Gate) – Twoqubit 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’]. Default ‘U3’.

__init__
(gate, basis_fidelity=1.0, euler_basis=None)[소스]¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(gate[, basis_fidelity, euler_basis])Initialize self.
decomp0
(target[, eps])Decompose target ~Ud(x, y, z) with 0 uses of the basis gate.
decomp1
(target)Decompose target ~Ud(x, y, z) with 1 uses of the basis gate ~Ud(a, b, c). Result Ur has trace: .. math::.
decomp2_supercontrolled
(target)Decompose target ~Ud(x, y, z) with 2 uses of the basis gate.
decomp3_supercontrolled
(target)Decompose target with 3 uses of the basis.
num_basis_gates
(unitary)Computes the number of basis gates needed in a decomposition of input unitary
traces
(target)Give the expected traces \(Tr(U \cdot Utarget^dag)\) for different number of basis gates.

static
decomp0
(target, eps=1e15)[소스]¶ Decompose target ~Ud(x, y, z) with 0 uses of the basis gate. Result Ur has trace: \(Tr(Ur.Utarget^dag) = 4(cos(x)cos(y)cos(z)+ j sin(x)sin(y)sin(z)\), which is optimal for all targets and bases

decomp1
(target)[소스]¶ Decompose target ~Ud(x, y, z) with 1 uses of the basis gate ~Ud(a, b, c). Result Ur has trace: .. math:
Tr(Ur.Utarget^dag) = 4cos(xa)cos(yb)cos(zc) + j sin(xa)sin(yb)sin(zc)
which is optimal for all targets and bases with z==0 or c==0

decomp2_supercontrolled
(target)[소스]¶ Decompose target ~Ud(x, y, z) with 2 uses of the basis gate.
For supercontrolled basis ~Ud(pi/4, b, 0), all b, result Ur has trace .. math:
Tr(Ur.Utarget^dag) = 4cos(z)
which is the optimal approximation for basis of CNOTclass
~Ud(pi/4, 0, 0)
or DCNOTclass~Ud(pi/4, pi/4, 0)
and any target. May be suboptimal for b!=0 (e.g. there exists exact decomposition for any target using BB~Ud(pi/4, pi/8, 0)
, but not this decomposition.) This is an exact decomposition for supercontrolled basis and target~Ud(x, y, 0)
. No guarantees for nonsupercontrolled basis.

decomp3_supercontrolled
(target)[소스]¶ Decompose target with 3 uses of the basis. This is an exact decomposition for supercontrolled basis ~Ud(pi/4, b, 0), all b, and any target. No guarantees for nonsupercontrolled basis.