Skip to content

Commit

Permalink
Merge pull request #208 from dlyongemallo/upgrade_qiskit_v1_0
Browse files Browse the repository at this point in the history
Ensure compatibility with Qiskit v1.0.
  • Loading branch information
jvdwetering authored Apr 17, 2024
2 parents 3a6a878 + 85499d1 commit ce833d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
python -m pip install --upgrade pip
pip install mypy==1.5.1
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test_requirements.txt ]; then pip install -r test_requirements.txt; fi
- name: mypy
run: |
mypy pyzx/ tests/
Expand Down
2 changes: 2 additions & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
qiskit~=1.0.0
qiskit_qasm3_import~=0.4.2
3 changes: 2 additions & 1 deletion tests/test_qasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
try:
from qiskit import quantum_info, transpile
from qiskit.circuit import QuantumCircuit
from qiskit.qasm2 import dumps
from qiskit.qasm3 import loads
except ImportError:
QuantumCircuit = None
Expand Down Expand Up @@ -244,7 +245,7 @@ def test_qiskit_transpile_pyzx_optimization_round_trip(self):
qc1 = transpile(qc)
t1 = quantum_info.Operator(qc1).data

c = Circuit.from_qasm(qc1.qasm())
c = Circuit.from_qasm(dumps(qc1))
g = c.to_graph()
full_reduce(g)
qasm = extract_circuit(g).to_basic_gates().to_qasm()
Expand Down

0 comments on commit ce833d4

Please sign in to comment.