#[unsafe(no_mangle)]pub extern "C" fn ket_quantum_execution_live(
num_qubits: usize,
live: &CLiveExecution,
decompose: bool,
native_gate_set: *const CNativeGateSet,
qpu_config: &mut *mut QPUConfig,
) -> i32Expand description
Creates a live-mode QuantumExecution backed by the provided callback table.
In live mode each gate is dispatched to the backend immediately as it is
applied to the process. The decompose flag controls whether multi-qubit
gates are decomposed into single-qubit and two-qubit native gates before
being dispatched.
§Parameters
live: Pointer to a caller-ownedCLiveExecutionstruct whose function pointers implement the backend. The struct is cloned; the caller retains ownership of the original.decompose: Iftrue, enables multi-qubit gate decomposition before dispatching each gate to the backend.quantum_execution: Output: receives the pointer to the newly allocatedQuantumExecutionobject. Ownership is transferred to the caller.
§Returns
0 on success, non-zero error code on failure.