#[no_mangle]
pub unsafe extern "C" fn ket_process_sample(
process: &mut Process,
qubits: *const usize,
qubits_size: usize,
shots: usize,
result: &mut usize,
) -> i32Expand description
Samples the specified qubits in the Process instance.
§Arguments
process- [in] A mutable reference to theProcessinstance.qubits- [in] A pointer to an array of integers representing the qubit indices to be sampled.qubits_size- [in] The size of thequbitsarray.shots- [in] The number of measurement shots.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.