Exemple #1
0
def _double_qcircuit_4qubit_noentanglement(theta_aux):
    C = QCircuit(4)
    for l in range(theta_aux.shape[1]):
        for q in range(theta_aux.shape[0]):
            C.U3(q, theta_aux[q,l,:3])
            C.U3(q, theta_aux[q,l,3:])
    return C
Exemple #2
0
def _qcircuit_2qubit_entanglement(theta_aux):
    C = QCircuit(2)
    for l in range(theta_aux.shape[1] - 1):
        for q in range(theta_aux.shape[0]):
            C.U3(q, theta_aux[q,l,:])
        C.Cz(0,1)
    for q in range(theta_aux.shape[0]):
        C.U3(q, theta_aux[q,-1,:])
    return C
Exemple #3
0
def _qcircuit_4qubit_entanglement(theta_aux):
    C = QCircuit(4)
    for l in range(theta_aux.shape[1] - 1):
        for q in range(theta_aux.shape[0]):
            C.U3(q, theta_aux[q,l,:])
        if l%2 == 0:
            C.Cz(0,1)
            C.Cz(2,3)
        elif l%2 == 1:
            C.Cz(1,2)
            C.Cz(0,3)
    for q in range(theta_aux.shape[0]):
        C.U3(q, theta_aux[q,-1,:])
    return C
Exemple #4
0
def _qcircuit_1qubit(theta_aux):
    C = QCircuit(1)
    for l in range(theta_aux.shape[1]):
        C.U3(0, theta_aux[0,l,:])
    return C