cuda-quantum icon indicating copy to clipboard operation
cuda-quantum copied to clipboard

[StateHandling] State API for remote platforms

Open 1tnguyen opened this issue 1 year ago • 0 comments

Description

State handling for remote platforms:

  • Introduce SimulationState subclass for remote platform (RemoteSimulationState and PyRemoteSimulationState) 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 to cudaq::state for 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.

1tnguyen avatar May 10 '24 06:05 1tnguyen