Skip to content

Commit

Permalink
Update test/terra/noise/passes/test_local_noise_pass.py
Browse files Browse the repository at this point in the history
Co-authored-by: Toshinari Itoko <[email protected]>
  • Loading branch information
chriseclectic and itoko authored Feb 8, 2022
1 parent e141626 commit 60dc49f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/terra/noise/passes/test_local_noise_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def composite_error(op, qubits):

noise_pass = LocalNoisePass(func=composite_error, op_types=CXGate)
noise_qc = noise_pass(qc)
self.assertEqual(len(noise_qc.data), 3)
self.assertEqual(noise_qc.data[1][0].name, "x")
self.assertEqual(noise_qc.data[2][0].name, "x")

expected = QuantumCircuit(2)
expected.cx(0, 1)
expected.x(0)
expected.x(1)

self.assertEqual(expected, noise_qc)

0 comments on commit 60dc49f

Please sign in to comment.