struct QPanda::KakDescription

Kak description of an arbitrary two-qubit operation. U = g x (Gate A1 Gate A0) x exp(i(xXX + yYY + zZZ))x(Gate b1 Gate b0) A global phase factor Two single-qubit operations (before): Gate b0, b1 The Exp() circuit specified by 3 coefficients (x, y, z) Two single-qubit operations (after): Gate a0, a1.

#include <KAK.h>

struct KakDescription
{
    // fields

    Eigen::Matrix4cd in_matrix;
    std::complex<double> global_phase;
    Eigen::Matrix2cd b0;
    Eigen::Matrix2cd b1;
    Eigen::Matrix2cd a0;
    Eigen::Matrix2cd a1;
    double x;
    double y;
    double z;

    // methods

    QCircuit to_qcircuit(
        Qubit* in_bit1,
        Qubit* in_bit2
        ) const;

    Eigen::MatrixXcd to_matrix() const;
};