Skip to main content
Functions:
NameDescription
assign_amplitude_table[Qmod Classiq-library function].

assign_amplitude_table

assign_amplitude_table(
amplitudes: list[float],
index: Const[QArray],
indicator: QBit
) -> None
[Qmod Classiq-library function] Load a specified list of real amplitudes into a quantum variable using an extra indicator qubit: ( |i\rangle|0\rangle \rightarrow a(i)\ |i\rangle|1\rangle + \sqrt\ |i\rangle|0\rangle ). Here, (a(i)) is the i-th amplitude, determined by the QNum when the index is in state (i). A list extracted from a given classical function (f(x)), with indexing according to a given QNum, can be obtained via the utility SDK function lookup_table. This function expects the indicator qubit to be initialized to (|0\rangle). Parameters:
NameTypeDescriptionDefault
amplitudeslist[float]Real values for the amplitudes. Must be between -1 and 1required
indexConst[QArray]The quantum variable used for amplitude indexingrequired
indicatorQBitThe quantum indicator qubitrequired