Skip to content

Commit

Permalink
Initial approach outline
Browse files Browse the repository at this point in the history
  • Loading branch information
nealerickson-qtm committed Oct 4, 2023
1 parent 4e89fc5 commit e108592
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 29 deletions.
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.

0 comments on commit e108592

Please sign in to comment.