Ejemplo n.º 1
0
def test_three_qubit_depolarizing_representation_error():
    q0, q1, q2 = LineQubit.range(3)
    with pytest.raises(ValueError):
        represent_operation_with_global_depolarizing_noise(
            Circuit(CCNOT(q0, q1, q2)),
            0.05,
        )
Ejemplo n.º 2
0
def test_three_qubit_biased_noise_representation_error():
    q0, q1, q2 = LineQubit.range(3)
    with pytest.raises(ValueError):
        represent_operation_with_local_biased_noise(
            Circuit(CCNOT(q0, q1, q2)), 0.05, 10
        )
Ejemplo n.º 3
0
def test_three_qubit_depolarizing_decomposition():
    q0, q1, q2 = LineQubit.range(3)
    noise_level = 0.05
    with pytest.raises(ValueError):
        depolarizing_decomposition(CCNOT(q0, q1, q2), noise_level)