qiskit-community / qiskit-algorithms

A library of quantum algorithms for Qiskit.
https://qiskit-community.github.io/qiskit-algorithms/
Apache License 2.0
116 stars 59 forks source link

Fix State Fidelity cache key #93

Closed woodsp-ibm closed 1 year ago

woodsp-ibm commented 1 year ago

Summary

Fixes #90

Details and comments

Switches from id() to _circuit_key() where the latter is that which the reference primitives use. Using id() is problematic, as #90 notes, though _circuit_key is designated a private method, and while its the better choice functionally, it feels a bit off to be using what is designated a private method. Its been used/stable for a while though. A choice might be to copy the whole routine here - but perhaps better to see if this changes going forwards in the way some unique key/hash can be obtained for a circuit.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 6691648625


Totals Coverage Status
Change from base Build 6691594462: 0.002%
Covered Lines: 6453
Relevant Lines: 7126

💛 - Coveralls