Skip to main content

ket_process_status

Function ket_process_status 

Source
#[unsafe(no_mangle)]
pub extern "C" fn ket_process_status( process: &Process, status: &mut *const c_char, ) -> i32
Expand description

Returns the current status of the process as a static C string.

The string is one of:

  • "AcceptingGate": the process is ready to accept gate blocks.
  • "AcceptingHamiltonian": all gates have been appended; expectation-value requests can now be submitted.
  • "ReadyToExecute": execution has been requested and the circuit is ready.
  • "Terminated": execution has completed and results are available.

The returned pointer points to a static string and must not be freed.

§Parameters

  • process: The process whose status is queried.
  • status: Output: set to a pointer to a static null-terminated string.

§Returns

0 on success, non-zero error code on failure.