Function qdk_sim::c_api::m[][src]

#[no_mangle]
pub unsafe extern "C" fn m(
    sim_id: usize,
    idx: usize,
    result_out: *mut usize
) -> i64
Expand description

Measures a single qubit in the $Z$-basis, returning the result by setting the value at a given pointer.

Safety

This function is marked as unsafe as it is the caller’s responsibility to ensure that result_out is a valid pointer, and that the memory referenced by result_out can be safely set.