-
Notifications
You must be signed in to change notification settings - Fork 198
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
[BUG] lie_closure
not accepting complex coefficients on PauliWord
s
#1318
Comments
Hi @qubitzer , Thank you for opening this issue! In the implementation for So the real issue here is that this isn't mentioned clearly in the documentation 🙃 , sorry for that. We'll fix the documentation to make this clear. Thank you for making us aware of this and helping us improve! Let us know if you have any other questions or find any other issues. |
Hi @CatalinaAlbornoz , I understand. Thank you for the explanation. Enhancing the docu is great, but still I would suggest to also adjust the functionality. The mentioned example
does not contain explicit complex coefficients, but it does not work. As I now realized with your help it does work if a global factor of
Wouldn't it be simpler if |
Thank you for the clarification :-) |
Pennylane version: 0.40.0
Observed behaviour:
The following code runs into an error:
It works if the complex coefficient
1j
is omitted. In this minimal example, it does not matter to omitt the coefficient.Though, in more involved instances, complex coefficients naturally arise and cannot be omitted without changing the DLA.
For example:
Expected behaviour:
Generators with complex coefficients should be accepted in the same way as generators with only real coefficients
An idea for a fix:
I ajdusted the current
lie_closure
implementation locally into a minimal version that accepts complex coefficients:It currently works well for my use cases, though it is not very performant. Maybe this still helps for a fix.
The text was updated successfully, but these errors were encountered: