Replies: 1 comment 4 replies
-
|
Hello, We do understand that one pain-point for VQE support in So in the current setting, if you want to change parameters from run to run, you'll have to create new It would also be nice if you could provide a minimal example to show your current workflow and then we may be able to come up with something that works for your case. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Overview:
(I believe) I have to implement workarounds to optimize parameterized circuits, these workarounds could themselves be further enhanced
Request:
An enhancement that allows me to input a
PyTorchorCupyarray as the parameters of a circuit.....(This is related to, but not superseded by, NVIDIA/cuda-quantum#1480)
Improved support for tracing over indices in
einsum.state_vector, etc.Or pointing out the obvious thing I've missed.
Discussion:
Hello!
I am a
cuQuantum/cuda-quantumneophyte, so if I'm missing something obvious, please point it out.I work with diverse VQCs that I define in
Qiskitand then optimize the parameters. It is important to my workflow to be able to take a circuit off the shelf and repeat the entire optimization from scratch.I am, for the moment, very happy with the classical optimization of parameters that
cuQuantumallows me to use throughCircuitToEinsum, thencuquantum.contractthis is excellent.However, the rest of my of my workflow in
cuQuantumis manipulating saideinsum, both expression and arguments, to work around the limitation that the input circuit be fully parameterized, and this is the pain-point I'm raising here.It would be nice if we had an easier way of inputing parameters to an
cuquantum.Network, unless I've missed something.Currently I'm working around this by manipulating the arguments of my network directly, but this workaround would be greatly enhanced if
einsum.amplitudeoreinsum.state_vectorallowed for partial inputs of parameters, others to be set during the index contraction, and/or allowed for more easily tracing over inputs rather than fixing them to specific pauli strings. I.e. I want thestate_vectorfor qubits 0-3, where qubits 4-16 are traced out.I note the above is a solution, not a requirement, so I would generally shy away from such a suggestion. Generically, my requirement is 'make it easier to work with VQCs'. However, I believe the intermediate solutions I suggest above are themselves a good feature to have, which is why I'm suggesting it.
I further note that
qiskit_aerand the relatedPyTorchwrapping almost uses a similar workaround, but in the end sends the parameters to CPU to define a circuit that is then simulated on GPU, rather than creating the input matrices on GPU. So their solution hits a significant bottleneck. This may not be your problem, but I thought you might be interested.Cheers!
Beta Was this translation helpful? Give feedback.
All reactions