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

Initial approach outline #5

Closed
wants to merge 1 commit into from
Closed
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
22 changes: 22 additions & 0 deletions pytket/phir/api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from pytket.circuit import Circuit

from .sharding.sharder import Sharder


def pytket_to_phir(
circuit: Circuit,
) -> str:
"""Converts a pytket circuit into its PHIR representation

:param circuit: Circuit object to be converted
"""

# TODO: Process circuit according to desired machine architecture

sharder = Sharder(circuit)
shards = sharder.shard() # noqa: F841

# TODO: Pass shards[] into placement, routing, etc
# TODO: Convert to PHIR JSON spec and return

return "{ phir json, someday }"
29 changes: 0 additions & 29 deletions pytket/phir/main.py

This file was deleted.