-
Notifications
You must be signed in to change notification settings - Fork 2
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
Remove pytket-quantinuum dependency. #107
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is looking great. Great idea to abstract timings into its own data class.
README update is the only needed change, rest are suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'd wait for @neal-erickson's review before merging this. Also, left a minor comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question about approach to the "no machine" handling but otherwise looks good to me.
pytket/phir/rebasing/rebaser.py
Outdated
api_handler=qapi_offline, # type: ignore [arg-type] | ||
machine = QTM_MACHINES_MAP.get(qtm_machine) | ||
gateset = ( | ||
{OpType.Rz, OpType.PhasedX, OpType.ZZPhase} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is roughly equivalent to the Quantinuum gateset, do we want to rebase to that in the case of no machine - seems like it might reduce the flexibility of allowing this to be run without any Quantinuum specificity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the code to use QTM_DEFAULT_GATESET
explicitly. I don't think this reduces flexibility, as one can specify a machine with another gateset if desired.
And remove the
tket_optimization_level
argument topytket_to_phir()
. Add agateset
field to theMachine
class and populate theQtmMachine
instances with the current supported gatesets. Apply a standard rebase pass after decomposing boxes (i.e. optimization level 0).Create a dataclass for machine timing data to get around ruff's (quite reasonable) complaint that there were too many arguments to
Machine.__init__()
.