Skip to content

Commit

Permalink
Update pennylane_lightning/lightning_gpu/lightning_gpu.py
Browse files Browse the repository at this point in the history
Co-authored-by: Ali Asadi <[email protected]>
  • Loading branch information
LuisAlfredoNu and maliasadi authored Sep 18, 2024
1 parent b5f5090 commit 812fd84
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pennylane_lightning/lightning_gpu/lightning_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,12 +489,10 @@ def supports_derivatives(
Bool: Whether or not a derivative can be calculated provided the given information
"""
if execution_config is None and circuit is None:
if circuit is None or (execution_config is None and circuit is None):
return True
if execution_config.gradient_method not in {"adjoint", "best"}:
return False
if circuit is None:
return True
return _supports_adjoint(circuit=circuit)

def simulate(
Expand Down

0 comments on commit 812fd84

Please sign in to comment.