Function qdk_sim::c_api::set_noise_model[][src]

#[no_mangle]
pub unsafe extern "C" fn set_noise_model(
    sim_id: usize,
    new_model: *const c_char
) -> i64
Expand description

Sets the noise model used by a given simulator instance, given a string containing a JSON serialization of that noise model.

Safety

This function is marked as unsafe as the caller is responsible for ensuring that new_model:

  • Is a valid pointer to a null-terminated array of C characters.
  • The pointer remains valid for at least the duration of the call.
  • No other thread may modify the memory referenced by new_model for at least the duration of the call.