PennyLaneAI / pennylane

PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
https://pennylane.ai
Apache License 2.0
2.22k stars 577 forks source link

Async calculation on remote devices #4208

Open fretchen opened 1 year ago

fretchen commented 1 year ago

Feature details

Pennylane can send jobs to remote devices. However, whenever such a job is sent out pennylane typically seems to wait for the answer within the code before the user can continue with his life. As example see here. At least this is what I got from a quick search and question in the forum

While this is of great help for the design of the language, this assumption can create numerous serious problems in real life:

Implementation

A very helpful feature would be to allow users to have some kind of "non-blocking" interaction, if they wish and if it makes sense. Then the user submits the calculation lives his life and comes back to see the result when it might be time.

How important would you say this feature is?

1: Not important. Would be nice to have.

Additional information

qiskit has this basically build in for qubits and as a design choise, but it seems a bit strange to go always through qiskit just because I have some kind of "remote"-quantum hardware.

For the interaction with more complex hardware like cold atoms etc this seems like a crucial feature. But who am I too judge if this is crucial. pennylane survived until now without this feature too.

trbromley commented 1 year ago

Thanks @fretchen! I agree that this is indeed a pain point for long-running remote executions. Non-blocking/asynchronous execution is something we'd love to build up, we just need to work out the details to make it work nicely :100:

fretchen commented 1 year ago

Sounds good. Feel free, to tell me if you are looking for input. Just as ressources:

I am looking forward to the implementation :wink:.