You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both process_counts and process_samples assume that the diagonalizing gates have already been applied before the sampling was performed.
All we need is consistency between the eigenstates created by the diagonalizing gates and the eigenvalues returned by Operator.eigvals(). So the diagonalizing gates of cost_h should map the eigenstate with the largest eigenvalue to 000000. This can be double-checked with qml.ops.functions.assert_valid(cost_h).
If the eigenvalues and diagonalizing gates are indeed inconsistent, we'd be happy to look into fixing that.
Expected behavior
returns the largest eigenvalue of the
cost_h
Hamiltonian. probably because it sorts the eigenvalues and then it doesn't sort the counts / samplesActual behavior
The provided code should return the eigenvalue corresponding to the eigenstate provided.
Additional information
No response
Source code
No response
Tracebacks
No response
System information
Existing GitHub issues
The text was updated successfully, but these errors were encountered: