Summary
Add parameter support to the C API. The goal is to expose Rust's ParameterExpression to C in some way and allow creating parameterized circuits, plus assigning parameter values. This should also support basic parameter arithmetic. We could expose parameters via the Param object, which can represent any gate parameter, and would allow a smooth path to supporting other types, such as int in the future. A parameterized gate could then, e.g., be added via
QkParam* params[3] = // array of QkParam, can mix parameterized and fixed expressions
qk_circuit_parametrized_gate(circuit, QkGate_U, qubits, params);
Tasks
Summary
Add parameter support to the C API. The goal is to expose Rust's
ParameterExpressionto C in some way and allow creating parameterized circuits, plus assigning parameter values. This should also support basic parameter arithmetic. We could expose parameters via theParamobject, which can represent any gate parameter, and would allow a smooth path to supporting other types, such asintin the future. A parameterized gate could then, e.g., be added viaTasks
QkParamto C (AddQkParamto the C API #14837)QkParaminQkInstruction