#[unsafe(no_mangle)]pub extern "C" fn ket_process_param(
process: &mut Process,
param: f64,
param_index: &mut usize,
) -> i32Expand description
Registers a new differentiable parameter with the given initial value.
The returned param_index uniquely identifies this parameter within the
process. Use it to construct Param::Ref values when building
parameterised gate instructions. When the parameter value changes between
executions, gates that reference the same index are automatically updated
during the next compilation pass.
§Parameters
process: The process in which the parameter is registered.param: The initial numeric value of the parameter.param_index: Output: receives the index that identifies this parameter within the process.
§Returns
0 on success, non-zero error code on failure.