Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomello committed Nov 29, 2023
1 parent 81e9df4 commit 1f6d28a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_models_circuit_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ def test_circuit_unitary_bigger(backend, with_measurement):
backend.assert_allclose(final_matrix, target_matrix)


def test_circuit_unitary_with_noise_channel(backend):
circuit = Circuit(2)
circuit.add(gates.H(0))
circuit.add(gates.CNOT(0, 1))
circuit.add(gates.DepolarizingChannel([0, 1], 0.2))
with pytest.raises(NotImplementedError):
circuit.unitary(backend)


@pytest.mark.parametrize("compile", [False, True])
def test_circuit_vs_gate_execution(backend, compile):
"""Check consistency between executing circuit and stand alone gates."""
Expand Down

0 comments on commit 1f6d28a

Please sign in to comment.