ket::c_api::objects

Function ket_process_get_dump

Source
#[no_mangle]
pub unsafe extern "C" fn ket_process_get_dump(
    process: &Process,
    index: usize,
    iterator: usize,
    basis_state: &mut *const u64,
    basis_state_size: &mut usize,
    amplitude_real: &mut f64,
    amplitude_imag: &mut f64,
) -> i32
Expand description

Retrieves the dump data from the Process instance.

§Arguments

  • process - [in] A reference to the Process instance.
  • index - [in] The index of the dump to query.
  • iterator - [in] The iterator for accessing individual basis states in the dump.
  • basis_state - [out] A mutable pointer to the array of u64 storing the basis state.
  • basis_state_size - [out] A mutable pointer to the size of the basis state array.
  • amplitude_real - [out] A mutable pointer to the real part of the amplitude.
  • amplitude_imag - [out] A mutable pointer to the imaginary part of the amplitude.

§Returns

An integer representing the error code. 0 indicates success.

§Safety

This function is marked as unsafe due to the use of raw pointers.