コード例 #1
0
ファイル: test_quil.py プロジェクト: kylegulshen/pyquil
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
ファイル: test_quil.py プロジェクト: shenzhi-git/pyquil
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
ファイル: test_quil.py プロジェクト: kylegulshen/pyquil
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()