Skip to content
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

Move to new qadence #22

Merged
merged 10 commits into from
Aug 28, 2024
Merged

Move to new qadence #22

merged 10 commits into from
Aug 28, 2024

Conversation

inafergra
Copy link
Collaborator

Makes qadence-libs compatible with the new qadence, in particular changing how the old TransformedModule was dealt with. In the QNG optimizer we need to distinguish the "circuit" variational parameters (those params that affect the final quantum state of the ciruict, e.g. gate params or FM params) and "non-circuit" variational parameters (e.g. the parameters modifying the observable, which do no change the final quantum state). This is because only circuit params can be optimized with the QNG optimizer (we can only compute the QFI matrix for circuit params). Before, it was easier to distinguish both as non-circuit parameters corresponded to the TransformedModule scale and shifting, but now some new logic was needed to distinguish both.

Apart from adding this new logic, I refactored the code inside qng.py so that the different approximations have now a functional API form, more in line with torch style, and also extended the documentation a bit.

@inafergra inafergra marked this pull request as ready for review August 27, 2024 10:37
Copy link
Collaborator

@jpmoutinho jpmoutinho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @inafergra. Could you bump the pyproject to 0.1.3 so we can release?

qadence_libs/qinfo_tools/qng.py Outdated Show resolved Hide resolved
@inafergra inafergra merged commit 3bdf515 into main Aug 28, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants