Skip to main content
Functions:
NameDescription
apply_to_all[Qmod Classiq-library function].
hadamard_transform[Qmod Classiq-library function].
modular_increment[Qmod Classiq-library function].

apply_to_all

apply_to_all(
gate_operand: QCallable[Annotated[QBit, target]],
target: QArray[QBit]
) -> None
[Qmod Classiq-library function] Applies the single-qubit operand gate_operand to each qubit in the qubit array target. Parameters:
NameTypeDescriptionDefault
gate_operandQCallable[Annotated[QBit, target]]The single-qubit gate to apply to each qubit in the array.required
targetQArray[QBit]The qubit array to apply the gate to.required

hadamard_transform

hadamard_transform(
target: QArray[QBit]
) -> None
[Qmod Classiq-library function] Applies Hadamard transform to the target qubits. Corresponds to the braket notation: Hnx=12ny=02n1(1)xcdotyy H^{\otimes n} |x\rangle = \frac{1}{\sqrt{2^n}} \sum_{y=0}^{2^n - 1} (-1)^{x \\cdot y} |y\rangle Parameters:
NameTypeDescriptionDefault
targetQArray[QBit]qubits to apply to Hadamard transform to.required

modular_increment

modular_increment(
a: CInt,
x: QNum
) -> None
[Qmod Classiq-library function] Adds aa to xx modulo the range of xx, assumed that xx is a non-negative integer and aa is an integer. Mathematically it is described as: x=(x+a) mod 2x.size1 x = (x+a)\ \mod \ 2^{x.size}-1 Parameters:
NameTypeDescriptionDefault
aCIntA classical integer to be added to x.required
xQNumA quantum number that is assumed to be non-negative integer.required