Esempio n. 1
0
def test_repr():
    cirq.testing.assert_equivalent_repr(
        QuirkQubitPermutationGate('a', 'b', [0, 1]))
Esempio n. 2
0
def test_equality():
    eq = cirq.testing.EqualsTester()
    eq.make_equality_group(lambda: QuirkQubitPermutationGate('a', 'b', [0, 1]))
    eq.add_equality_group(QuirkQubitPermutationGate('x', 'b', [0, 1]))
    eq.add_equality_group(QuirkQubitPermutationGate('a', 'X', [0, 1]))
    eq.add_equality_group(QuirkQubitPermutationGate('a', 'b', [1, 0]))