Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure compatibility with Qiskit v1.0. #208

Merged
merged 3 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading