Functions:
encode_in_angle
encode_in_angle(
data: CArray[CReal],
qba: Output[QArray[QBit]]
) -> None
[Qmod Classiq-library function]
Creates an angle encoding of n data points on n qubits.
Applies RY(πdata[i]) on qba[i].
Parameters:
encode_on_bloch
encode_on_bloch(
data: CArray[CReal],
qba: Output[QArray]
) -> None
[Qmod Classiq-library function]
Creates a dense angle encoding of n data points on n//2 qubits.
Encodes pairs of data points on a Bloch sphere, via RX(πdata[2i])RZ(πdata[2i+1]) on qba[i].
If the length of the data is odd then RX(πdata[i]) is applied on the last qubit.
Parameters:
inplace_encode_on_bloch
inplace_encode_on_bloch(
data: CArray[CReal],
qba: QArray
) -> None
[Qmod Classiq-library function]
Creates a dense angle encoding of n data points on n//2 qubits.
Encodes pairs of data points, normalized in the range [-1, 1], on a Bloch sphere,
via RX(pidata[2i])RZ(pidata[2i+1]) on qba[i],
such that the i’th qubit transforms as
\|0> -> cos(pidata[2i]/2)\|0> +i*e{i∗pi∗data[2∗i+1]}sin(pidata[2*i+1]/2).
If the length of the data is odd then RX(data[i]) is applied on the last qubit.
Parameters: