Skip to main content

Module process

Module process 

Source
Expand description

C API for interacting with Process operations.

Functionsยง

ket_config_new
Allocates a new QPUConfig for a QPU with the specified number of physical qubits.
ket_process_alloc
Allocates a new logical qubit in the process.
ket_process_append_block
Appends a BasicBlock of gates to the process.
ket_process_delete
Deallocates the memory associated with a Process.
ket_process_dump
Dumps the quantum state of qubits (live mode only).
ket_process_execute
Compiles and executes the accumulated circuit.
ket_process_exp_value
Requests the expectation value computation for a given Hamiltonian (passed as JSON) on a Process.
ket_process_gates_json
Returns the accumulated gate instructions of the process as a JSON string.
ket_process_measure
Performs a single-shot mid-circuit measurement of qubits.
ket_process_new
Allocates a new Process using the provided QPU configuration.
ket_process_param
Registers a new differentiable parameter with the given initial value.
ket_process_read_exp_value
Returns a serialized JSON array of expectation values from the most recent execution.
ket_process_read_gradient
Returns a serialized JSON array of parameter-shift gradients from the most recent execution.
ket_process_read_sample
Reads the cached sample data from a Process.
ket_process_sample
Requests a measurement sample of qubits over shots repetitions.
ket_process_set_parameter
Registers a new parameter with the given initial value in the process.
ket_process_status
Returns the current status of the process as a static C string.