-
Notifications
You must be signed in to change notification settings - Fork 14
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
Use dimension option in XIR program #47
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.
Looks good! Much nicer to be able to use a script-level option to set the dimension rather than to have to add it as a gate argument. 🙂
Co-authored-by: Theodor <[email protected]>
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.
Much nicer to be able to use a script-level option to set the dimension rather than to have to add it as a gate argument. 🙂
That's right!
Context:
The Jet-XIR interpreter does not currently support CV circuits with a Fock ladder cutoff greater than two. This is a consequence of the fact that the Jet-XIR interpreter always constructs
Circuit
instances with qudits of dimension two.Description of the Change:
dimension
attribute has been added to theGate
class.FockGate
andQubitGate
classes now handle the validation ofGate
dimensions.cutoff
parameter is now automatically inserted for CV gates by the Jet-XIR interpreter.dimension
option of an XIR program is now validated and used to constructCircuit
instances.Benefits:
Possible Drawbacks:
None.
Related GitHub Issues:
None.