[StateHandling] State API for remote platforms
Description
State handling for remote platforms:
-
Introduce
SimulationStatesubclass for remote platform (RemoteSimulationStateandPyRemoteSimulationState) which is essentially a holder of the kernel IR. -
Perform a lazy evaluation to resolve the state:
(1) For state accessor, e.g.,
amplitudes: adding a configurable qubit number threshold. If the number of qubits is less than the threshold, resolve the full state vector to the client. Otherwise, send on amplitude access request. Adding an API tocudaq::statefor batched amplitude access.(2) For overlap, sending job requests with both kernel IRs.
Note: the remote state is implemented for MLIR kernels only (C++ MLIR mode, kernel builder and Python).
Library mode C++ kernel is evaluated as-is (v0.7 mode): state is resolved to a vector by the server for each get_state call.