-
Notifications
You must be signed in to change notification settings - Fork 345
Description
Required prerequisites
- Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.
Describe the feature
Describe the feature
I would like to request support for adjoint differentiation as a gradient strategy in CUDA-Q, with an initial focus on simulator backends.
CUDA-Q currently documents the following gradient strategies:
- CentralDifference
- ForwardDifference
- ParameterShift
For simulator-based workflows, especially VQE / QAOA / QML workloads with many parameters, an adjoint / reverse-mode gradient method could substantially reduce gradient-evaluation cost compared with parameter-shift.
Motivation
This would be useful for:
- large parameterized circuits evaluated on simulators
- variational workloads where gradient cost dominates runtime
- training and optimization loops that currently require many shifted circuit evaluations
CUDA-Q already exposes a gradient abstraction in C++, so this seems like a natural extension point for adding another gradient strategy.
Proposed initial scope
To keep the request realistic, I am not asking for hardware-backend support in the first step.
A good initial scope might be:
- simulator backends only
- first-order gradients
- expectation-value objectives (e.g.
observe) - continuous gate parameters
A narrower first implementation (for example, statevector simulation first) would also be perfectly reasonable.
Possible API direction
One possible direction could be:
- C++: a new
cudaq::gradients::adjoint(or similar) strategy - Python: an
AdjointGradientoption alongside the existing gradient strategies
I am not attached to the exact API shape; this is only a suggestion.
Prior search / why this is not a duplicate
Before opening this issue, I searched the public issue tracker and discussions for:
adjoint gradientadjoint differentiationautodiff
I found related issues around broadcasting / vectorization / tensor inputs, but I did not find a dedicated feature request for adjoint differentiation as a CUDA-Q gradient strategy.
Related but not duplicate:
- [RFC] cudaq::observe_n(...), spin_op observe broadcasting #62 discusses batched / broadcasted
observeevaluation - Request: Native Vectorized Batch Evaluation for Parameterized Quantum Circuits (Similar to PennyLane's Parameter Broadcasting) #3664 requests native vectorized batch evaluation for parameterized circuits
This request is instead about adding adjoint differentiation as a gradient strategy for simulator backends.
Why this would help CUDA-Q
CUDA-Q is already strong for simulator-heavy hybrid quantum-classical workflows. Adding adjoint differentiation would make it more attractive for variational optimization and training workloads where simulator performance matters.
Contribution
I would be happy to help discuss scope and contribute an implementation if this direction aligns with the maintainers’ roadmap.
I am happy to start with a simulator-only implementation if that is the preferred first step.