Skip to content

Classiq open library function declarations

Below are the signatures of all QMOD functions in the Classiq library. These functions are available out of the box, and can be called from user-defined functions.

qfunc qft_step(target: qbit[]);
qfunc qft(target: qbit[]);
qfunc qpe_flexible<unitary_with_power: qfunc <arg0: int>()>(phase: qnum);
qfunc qpe<unitary: qfunc ()>(phase: qnum);
qfunc single_pauli<slope: real, offset: real, q1_qfunc: qfunc <theta: real>(target: qbit)>(x: qbit[], q: qbit);
qfunc linear_pauli_rotations<bases: Pauli[], slopes: real[], offsets: real[]>(x: qbit[], q: qbit[]);
qfunc amplitude_estimation<num_phase_qubits: int, num_unitary_qubits: int, sp_op: qfunc <num_unitary_qubits: int>(spq: qbit[]), oracle_op: qfunc <num_unitary_qubits: int>(oq: qbit[])>(output phase_port: qbit[], output unitary_port: qbit[]);
qfunc simple_oracle<predicate: qfunc (vars: qbit[], result: qbit)>(target: qbit[]);
qfunc grover_diffuser<num_qubits: int>(p: qbit[]);
qfunc grover_operator<num_qubits: int, sp_op: qfunc <num_qubits: int>(spq: qbit[]), oracle_op: qfunc <num_qubits: int>(oq: qbit[])>(p: qbit[]);
qfunc hadamard_transform(target: qbit[]);
qfunc apply_to_all<gate_operand: qfunc (target: qbit)>(target: qbit[]);
qfunc grover_search<num_qubits: int, reps: int, oracle_op: qfunc <num_qubits: int>(oq: qbit[])>(gsq: qbit[]);
qfunc prepare_int<val: int>(output out: qnum);
qfunc allocate_num<num_qubits: int, is_signed: bool, fraction_digits: int>(output out: qnum);
qfunc qaoa_mixer_layer<b: real>(target: qbit[]);
qfunc qaoa_init(target: qbit[]);
qfunc swap_test(state1: qbit[], state2: qbit[], output test: qbit);