Skip to content

Instantly share code, notes, and snippets.

@techwithshadab
Created November 3, 2021 21:04
Show Gist options
  • Save techwithshadab/9f9371b67fa50852255060e7601c0946 to your computer and use it in GitHub Desktop.
Save techwithshadab/9f9371b67fa50852255060e7601c0946 to your computer and use it in GitHub Desktop.
def numpyEigensolver(qubitOp):
selections = []
exact_eigensolver = NumPyMinimumEigensolver(qubitOp)
result = exact_eigensolver.run()
selection, state, values, probabilities = print_result(result)
print(selection_to_picks(num_assets, selection))
return state, values, probabilities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment