Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Jul 15, 2020
1 parent 87a58b4 commit 0b0c5ab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/python/circuit/test_circuit_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,15 @@ def test_reverse_bits_with_registers(self):

self.assertEqual(qc.reverse_bits(), expected)

def test_cnot_alias(self):
"""Test that the cnot method alias adds a cx gate."""
qc = QuantumCircuit(2)
qc.cnot(0, 1)

expected = QuantumCircuit(2)
expected.cx(0, 1)
self.assertEqual(qc, expected)


class TestCircuitBuilding(QiskitTestCase):
"""QuantumCircuit tests."""
Expand Down

0 comments on commit 0b0c5ab

Please sign in to comment.