Skip to content

Commit

Permalink
Merge pull request #183 from dlyongemallo/remove_redundant_ry_test
Browse files Browse the repository at this point in the history
remove redundant tests for `ry`
  • Loading branch information
jvdwetering authored Nov 20, 2023
2 parents d87356a + 351478b commit c7454e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 58 deletions.
9 changes: 9 additions & 0 deletions tests/test_qasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
from pyzx.simplify import full_reduce
from pyzx.extract import extract_circuit
from pyzx.circuit import Circuit
from fractions import Fraction
import os


@unittest.skipUnless(np, "numpy needs to be installed for this to run")
Expand Down Expand Up @@ -70,6 +72,13 @@ def test_parse_qasm3(self):
self.assertEqual(c.qubits, qasm3.qubits)
self.assertListEqual(c.gates, qasm3.gates)

def test_load_qasm_from_file(self):
c = Circuit(1)
c.add_gate("YPhase", 0, Fraction(1, 4))
c1 = Circuit.from_qasm_file(os.path.join(os.path.dirname(__file__), "ry.qasm"))
self.assertEqual(c1.qubits, c.qubits)
self.assertListEqual(c1.gates,c.gates)

def test_p_same_as_rz(self):
"""Test that the `p` gate is identical to the `rz` gate.
Expand Down
58 changes: 0 additions & 58 deletions tests/test_ry.py

This file was deleted.

0 comments on commit c7454e9

Please sign in to comment.