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

Optimization with Adam Optimizer #169

Open
bmdaj opened this issue Feb 10, 2022 · 0 comments
Open

Optimization with Adam Optimizer #169

bmdaj opened this issue Feb 10, 2022 · 0 comments

Comments

@bmdaj
Copy link

bmdaj commented Feb 10, 2022

Hello guys,

I am trying to run the QForte UCCNVQE algorithm but I am trying to implement it using the Adam optimizer (as in https://pennylane.readthedocs.io/en/stable/code/api/pennylane.AdamOptimizer.html) instead of using the SciPy optimizers.

When I run this to optimize the parameter tamps I get the following error related to the lower level C++ classes:

TypeError: add(): incompatible function arguments. The following argument types are supported:
1. (self: qforte.qforte.SQOpPool, arg0: complex, arg1: qforte.qforte.SQOperator) -> None

Invoked with: , <autograd.numpy.numpy_boxes.ArrayBox object at 0x7ff8fb9c8280>, -1.000000 ( 0^ 2 )
+1.000000 ( 2^ 0 )

As far as I am concerned, this happens because the class SQOperator can only have numbers as inputs (instead of this autograd numpy arrayboxes). Transforming this autograd numpy arrayboxes to numpy arrays seems to break the optimization process so this is not an option.

Any idea on how to make this work?

Thanks a lot.

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

No branches or pull requests

1 participant