Skip to content
New issue

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

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

Already on GitHub? # to your account

Make quipper_name a class var in Gate with a default value of undefined. #141

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

dlyongemallo
Copy link
Contributor

Fixes #138.

In to_quipper, no longer default to name if quipper_name is not defined.

Behaviour changes:

  • calling to_quipper on ParityPhase, InitAncilla, and PostSelect will no longer cause a crash (AttributeError: 'ParityPhase' object has no attribute 'target'. Did you mean: 'targets'?)
  • calling to_quipper on FSim and DiscardBit will result in a TypeError: Gate {} doesn't have a Quipper description (previous output was, e.g., 'QGate"FSim" with nocontrol')

…defined`. Fixes zxcalc#138.

In `to_quipper`, no longer default to `name` if `quipper_name` is not defined.

Behaviour changes:
- calling `to_quipper` on `ParityPhase`, `InitAncilla`, and `PostSelect` will no longer cause a crash
  (`AttributeError: 'ParityPhase' object has no attribute 'target'. Did you mean: 'targets'?`)
- calling `to_quipper` on `FSim` and `DiscardBit` will result in a `TypeError: Gate {} doesn't have a Quipper description`
  (previous output was, e.g., 'QGate["FSim"](db) with nocontrol')
@jvdwetering jvdwetering merged commit 3418df2 into zxcalc:master Aug 31, 2023
@dlyongemallo dlyongemallo deleted the quipper_name branch October 21, 2023 05:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

quippername should be treated more consistently with gate names for other export formats
2 participants