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

Don't try to install pytket[ZX] with Python 3.13. #1627

Merged
merged 2 commits into from
Oct 21, 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
19 changes: 16 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,11 @@ jobs:
- name: Build pytket
run: |
cd pytket
pip install -e .[ZX] -v
if python --version | grep -q '3.13' ; then
pip install -e . -v
else
pip install -e .[ZX] -v
fi
- name: Run doctests
run: |
cd pytket
Expand Down Expand Up @@ -403,7 +407,11 @@ jobs:
- name: Build pytket
run: |
cd pytket
python -m pip install -e .[ZX] -v
if python --version | grep -q '3.13' ; then
pip install -e . -v
else
pip install -e .[ZX] -v
fi
- name: Run doctests
run: |
cd pytket
Expand Down Expand Up @@ -529,9 +537,14 @@ jobs:
with:
python-version: '3.13'
- name: Build pytket
shell: bash
run: |
cd pytket
pip install -e .[ZX] -v
if python --version | grep -q '3.13' ; then
pip install -e . -v
else
pip install -e .[ZX] -v
fi
- name: Run doctests
run: |
cd pytket
Expand Down
4 changes: 1 addition & 3 deletions pytket/pytket/circuit/logic_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@ def from_dict(cls, dic: Dict[str, Any]) -> "LogicExp":
"""Load from JSON serializable nested dictionary."""
opset_name, op_name = dic["op"].split(".", 2)
opset = BitWiseOp if opset_name == "BitWiseOp" else RegWiseOp
op = cast(
Union[BitWiseOp, RegWiseOp], next(o for o in opset if o.name == op_name)
)
op = next(o for o in opset if o.name == op_name)
args: List[ArgType] = []
for arg_ser in dic["args"]:
if isinstance(arg_ser, Constant):
Expand Down
Loading