-
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
[Draft] Add a standard way of creating QNN models #18
Conversation
hi @smitchaudhary , i responded in pasqal-io/qadence#396 regarding this, but i think @jpmoutinho is the best person to consult about this |
Thanks @dominikandreasseitz, yes I am aware of these changes and will review it. |
Thanks @dominikandreasseitz and @jpmoutinho Still a draft. Once I incorporate more changes, will request a proper review. Open for feedback already though. |
Watchout @smitchaudhary, there's still a reference to the |
Hey @smitchaudhary will you have time to work on this ? |
@Roland-djee Yes I will pick it up soon. Gathering some more feedback from some users and incorporating that. |
|
||
|
||
@dataclass | ||
class ObservableConfig: |
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 @smitchaudhary , lets add the logic for output transformation here
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.
Yeah! It can already do a scaling operation for each qubit. Will expand that to include shifting too. Also I need to make the names a bit more clear.
@smitchaudhary should we merge pasqal-io/qadence#385 and this together? |
@dominikandreasseitz I assume the transformed module needs to be refactored for qadence at large but does this new config workflow also go directly into qadence, in contrast to just qadence-libs for now? |
imo, i would have all of this in qadence for now and then move the full |
I would first try to converge on the goal for the QNN interface before deciding how to handle the code here and the changes being made in your MR @dominikandreasseitz. Some thoughts:
|
This was developed independent of the QNN/TransformedModule logic (and is just a draft at that), so if the plan is to open up QNN and change the definition/signature altogether, then we could do that. However, the current
I think @dominikandreasseitz 's impetus behind merging the two is exactly this. Do away with the wrapper |
Yes indeed! I just meant that it is an opportunity to think about the best option and work towards that. We already have the |
@awennersteen @Roland-djee , @smitchaudhary @jpmoutinho and I propose to combine https://github.com/pasqal-io/qadence/pull/385/files and this MR together, meaning:
However some libraries which use qadence rely on the TransfomedModule for classical NNs, we think its best to fully separate the quantum and classical parts which would be achieved by doing the above. wdyt? |
Moved this PR to the main qadence repo here |
Meant to fix pasqal-io/qadence#396
It is not meant as a replacement of the current workflow but a more of a standardised alternative.