Exemplo n.º 1
0
def test_instruction_group_string():
    ig = InstructionGroup()
    ig.inst(
        "Y 0",
        "X 1",
    )
    assert len(ig.actions) == 2
    assert ig.out() == "Y 0\nX 1\n"
Exemplo n.º 2
0
def test_instruction_group_tuple():
    ig = InstructionGroup()
    ig.inst(("Y", 0), ("X", 1))
    assert len(ig.actions) == 2
    assert ig.out() == "Y 0\nX 1\n"
Exemplo n.º 3
0
def test_instruction_group_gates():
    ig = InstructionGroup()
    ig.inst(H(0), X(1))
    assert len(ig.actions) == 2
    assert ig.out() == "H 0\nX 1\n"