# qml.fourier.get_spectrum¶

get_spectrum(op, decimals)[source]

Extract the frequencies contributed by an input-encoding gate to the overall Fourier representation of a quantum circuit.

If $$G$$ is the generator of the input-encoding gate $$\exp(-i x G)$$, the frequencies are the differences between any two of $$G$$’s eigenvalues. We only compute non-negative frequencies in this subroutine.

Parameters
• op (Operation) – Operation to extract the frequencies for

• decimals (int) – Number of decimal places to round the frequencies to

Returns

non-negative frequencies contributed by this input-encoding gate

Return type

set[float]