Skip to main content

ket_process_read_exp_value

Function ket_process_read_exp_value 

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

Returns a serialized JSON array of expectation values from the most recent execution.

If no execution has been performed yet, the returned JSON string contains null. The string is heap-allocated; the caller must free it with super::ket_string_delete.

§Parameters

  • process: The process from which expectation values are read.
  • result_json: Output: set to a pointer to a heap-allocated null-terminated JSON string.

§Returns

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