#[no_mangle]
pub unsafe extern "C" fn ket_process_exp_value(
process: &mut Process,
hamiltonian: *mut Hamiltonian<LogicalQubit>,
result: &mut usize,
) -> i32Expand description
Calculates the expected value of the PauliHamiltonian in the Process instance.
§Arguments
process- [in] A mutable reference to theProcessinstance.hamiltonian- [in] A mutable pointer to aPauliHamiltonian.result- [out] A mutable pointer to ausizewhere the result identifier will be stored.
§Returns
An integer representing the error code. 0 indicates success.
§Safety
This function is marked as unsafe due to the use of raw pointers.