qml.gradients.eigvals_to_frequencies¶
- eigvals_to_frequencies(eigvals)[source]¶
Convert an eigenvalue spectrum to frequency values, defined as the the set of positive, unique differences of the eigenvalues in the spectrum.
- Parameters
eigvals (tuple[int, float]) – eigenvalue spectra
- Returns
frequencies
- Return type
tuple[int, float]
Example
>>> eigvals = (-0.5, 0, 0, 0.5) >>> eigvals_to_frequencies(eigvals) (0.5, 1.0)
code/api/pennylane.gradients.eigvals_to_frequencies
Download Python script
Download Notebook
View on GitHub