def __init__(self, operator, Nq, propagate=False, HamiltonianOperator=[], scaleH=1, **kw):
    if (not (Nq == 1)):
        sys.exit('Did not 1 qubit in instructions...')
    para = np.array([0.0, 0.0, 0.0])
    expS = ExpPauli(para)
    for A in operator:
        para = np.array([0.0, 0.0, 0.0])
        for o in A:
            if (o.s == 'X'):
                para[0] = np.imag(o.c)
            elif (o.s == 'Y'):
                para[1] = np.imag(o.c)
            elif (o.s == 'Z'):
                para[2] = np.imag(o.c)
        expS = (ExpPauli(para) * expS)
    paraH = np.array([0.0, 0.0, 0.0])
    for o in HamiltonianOperator:
        if (o.s == 'X'):
            paraH[0] = (np.real(o.c) * scaleH)
        elif (o.s == 'Y'):
            paraH[1] = (np.real(o.c) * scaleH)
        elif (o.s == 'Z'):
            paraH[2] = (np.real(o.c) * scaleH)
    expiH = ExpPauli(paraH)
    exp = (expiH * expS)
    self._gates = [[(exp,), self._U3]]
def __init__(self, operator, Nq, propagate=False, HamiltonianOperator=[], scaleH=1, **kw):
    if (not (Nq == 1)):
        sys.exit('Did not 1 qubit in instructions...')
    para = np.array([0.0, 0.0, 0.0])
    expS = ExpPauli(para)
    for A in operator:
        para = np.array([0.0, 0.0, 0.0])
        for o in A:
            if (o.s == 'X'):
                para[0] = np.imag(o.c)
            elif (o.s == 'Y'):
                para[1] = np.imag(o.c)
            elif (o.s == 'Z'):
                para[2] = np.imag(o.c)
        expS = (ExpPauli(para) * expS)
    paraH = np.array([0.0, 0.0, 0.0])
    for o in HamiltonianOperator:
        if (o.s == 'X'):
            paraH[0] = (np.real(o.c) * scaleH)
        elif (o.s == 'Y'):
            paraH[1] = (np.real(o.c) * scaleH)
        elif (o.s == 'Z'):
            paraH[2] = (np.real(o.c) * scaleH)
    expiH = ExpPauli(paraH)
    exp = (expiH * expS)
    self._gates = [[(exp,), self._U3]]