-
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
Quantum circuit and state models for IR integration #21
Conversation
Thank you again for the review, @josh146! Let me know if any of my answers to your questions are unsatisfactory. |
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.
Great work on this. Minor comments, that can be ignored if they add nothing.
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.
Hey Mikhail, good work on this. I have a few questions/suggestions around the Circuit class, I'm going to take a closer look at the State part after.
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.
Hey Mikhail, I really like this design/naming conventions.
One thing and this is just about making it possibly future-proof - do you think it will be easy to incorporate in this design "non-wire" connections between operators/gates in the circuit? Maybe we can call these "bonds" as this is what they are called in the specific case of Matrix Product State representations. These prop up for Krauss operations and Matrix Product State representations of Gates.
Also, I'm assuming it will be easy to incorporate in this design, adjoint operators/gates which are needed in almost every non-amplitude type calculation (e.g. sampling, local expectation,...) as well as in mixed-state simulation. These are just connections on a wire anyway, so I assume they can be easily incorporated here.
If you think these things will break this design in a major way, maybe we should fit them in now?
Cheers!
Yeah, I gave this some thought while implementing the
My current plan is to implement a class method
Yes but fortunately I think the current design should be flexible enough to support our foreseeable needs 🙂. We can always iterate on this later if we find a major design flaw. |
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 Mikhail, just one suggestion on state.py
, though if you merge as-is that would be fine.
Context:
This PR is part of an ongoing series of changes to integrate the XIR with Jet.
Description of the Change:
State
class has been added to model quantum states.Qudit
andQuditRegister
implementations ofState
.Circuit
class has been added to model the connectivity between quantum states and gates.Wire
class has also been created as a byproduct of theCircuit
implementation.gates.py
file has been renamed togate.py
for the sake of consistency.Benefits:
Possible Drawbacks:
jet
package.Related GitHub Issues:
None.