def one_and_two_body_interaction(p, q, a, b) -> cirq.OP_TREE: th_symbol = LetterWithSubscripts('Th', i) tv_symbol = LetterWithSubscripts('Tv', i) v_symbol = LetterWithSubscripts('V', i) if _is_horizontal_edge(p, q, self.x_dim, self.y_dim, self.periodic): yield XXYYPowGate(exponent=th_symbol).on(a, b) if _is_vertical_edge(p, q, self.x_dim, self.y_dim, self.periodic): yield XXYYPowGate(exponent=tv_symbol).on(a, b) if _are_same_site_opposite_spin(p, q, self.x_dim * self.y_dim): yield cirq.CZPowGate(exponent=v_symbol).on(a, b)
def one_and_two_body_interaction(p, q, a, b) -> cirq.OP_TREE: t_symbol = LetterWithSubscripts('T', p, q, i) w_symbol = LetterWithSubscripts('W', p, q, i) v_symbol = LetterWithSubscripts('V', p, q, i) if t_symbol in param_set: yield XXYYPowGate(exponent=t_symbol).on(a, b) if w_symbol in param_set: yield YXXYPowGate(exponent=w_symbol).on(a, b) if v_symbol in param_set: yield cirq.CZPowGate(exponent=v_symbol).on(a, b)