예제 #1
0
def test_validate_supported_quil_reset_qubit():
    prog = Program(
        RESET(2),
    )
    with pytest.raises(ValueError):
        validate_supported_quil(prog)
    assert not prog.is_supported_on_qpu()
예제 #2
0
def test_validate_supported_quil_measure_last():
    prog = Program(
        MEASURE(0),
        H(0),
    )
    with pytest.raises(ValueError):
        validate_supported_quil(prog)
    assert not prog.is_supported_on_qpu()
예제 #3
0
def test_validate_supported_quil_with_pragma():
    prog = Program(
        RESET(),
        H(1),
        Pragma('DELAY'),
        MEASURE(1, None)
    )
    assert prog.is_supported_on_qpu()
예제 #4
0
파일: test_quil.py 프로젝트: tocheng/pyquil
def test_validate_supported_quil_reset_first():
    prog = Program(H(0), RESET())
    with pytest.raises(ValueError):
        validate_supported_quil(prog)
    assert not prog.is_supported_on_qpu()