def test_comparing_different_gates(main_engine): basic_gate = _basics.BasicGate() basic_rotation_gate = _basics.BasicRotationGate(1.0) self_inverse_gate = _basics.SelfInverseGate() assert not basic_gate == basic_rotation_gate assert not basic_gate == self_inverse_gate assert not self_inverse_gate == basic_rotation_gate
def test_self_inverse_gate(): self_inverse_gate = _basics.SelfInverseGate() assert self_inverse_gate.get_inverse() == self_inverse_gate assert id(self_inverse_gate.get_inverse()) != id(self_inverse_gate)