Ejemplo n.º 1
0
    def get_qasm(self, var_parameters):
        assert len(var_parameters) == 1
        parameter_1 = var_parameters[0]

        qasm = QasmUtils.eff_d_f_exc_qasm(parameter_1, self.qubits[0],
                                          self.qubits[1])

        # if the spin complement is different, add a qasm for it
        if [set(self.qubits[0]), set(self.qubits[1])] != [set(self.complement_qubits[0]), set(self.complement_qubits[1])] and \
           [set(self.qubits[0]), set(self.qubits[1])] != [set(self.complement_qubits[1]), set(self.complement_qubits[0])]:

            qasm += QasmUtils.eff_d_f_exc_qasm(parameter_1,
                                               self.complement_qubits[0],
                                               self.complement_qubits[1])

        return qasm
Ejemplo n.º 2
0
    def get_qasm(self, var_parameters):
        assert len(var_parameters) == 1
        parameter = var_parameters[0]

        return QasmUtils.eff_d_f_exc_qasm(parameter, self.qubits[0],
                                          self.qubits[1])