Skip to main content

ket_process_execute

Function ket_process_execute 

Source
#[unsafe(no_mangle)]
pub extern "C" fn ket_process_execute(process: &mut Process) -> i32
Expand description

Compiles and executes the accumulated circuit.

This is the primary entry point for batch mode execution. Calling it in live mode returns an ExplicitExecuteInLiveMode error. If no pending measurement or expectation-value requests have been recorded, NoPendingMeasurement is returned. If the process is already in the Terminated state, this call is idempotent and returns success.

§Parameters

  • process: The process to compile and execute.

§Returns

0 on success, non-zero error code on failure (including NoPendingMeasurement and ExplicitExecuteInLiveMode).