Esempio n. 1
0
def test_main_loop():
    """Test that the main loop is able to run without erring."""
    # Keep test from taking a long time by lowering repetitions.
    pytest.importorskip("cirq_google")
    args = '--num_qubits 5 --depth 5 --num_circuits 1  --routes 3'.split()
    with cirq.testing.assert_deprecated('Use cirq.optimize_for_target_gateset',
                                        deadline='v0.16',
                                        count=None):
        quantum_volume.main(**quantum_volume.parse_arguments(args))
Esempio n. 2
0
def test_parse_args():
    """Test that an argument string is parsed correctly."""
    args = ('--num_qubits 5 --depth 5 --num_circuits 200 --seed 1234').split()
    kwargs = quantum_volume.parse_arguments(args)
    assert kwargs == {
        'num_qubits': 5,
        'depth': 5,
        'num_circuits': 200,
        'seed': 1234,
    }
Esempio n. 3
0
def test_main_loop():
    """Test that the main loop is able to run without erring."""
    # Keep test from taking a long time by lowering repetitions.
    args = '--num_qubits 5 --depth 5 --num_repetitions 1'.split()
    quantum_volume.main(**quantum_volume.parse_arguments(args))
Esempio n. 4
0
def test_main_loop():
    """Test that the main loop is able to run without erring."""
    # Keep test from taking a long time by lowering repetitions.
    pytest.importorskip("cirq.google")
    args = '--num_qubits 5 --depth 5 --num_circuits 1  --routes 3'.split()
    quantum_volume.main(**quantum_volume.parse_arguments(args))