-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug/607 fidelity statevector kernel cannot be pickled (#778)
* Made fidelity_statevector_kernel picklable Added a new param to store cache size and a custom __getstate__ and __setstate__ to handle removing and re-initliasing the lru cache during pickle/unpickling respectively. * updated notes * name changes * spell corrections * Updated description * Added unittest for pickling * Spelling changes * Making error messages clearer * Spelling -_- * Update releasenotes/notes/fix-fid_statevector_kernel-pickling-b7fa2b13a15ec9c6.yaml Co-authored-by: Declan Millar <declan.millar@ibm.com> * Update .gitignore Co-authored-by: Declan Millar <declan.millar@ibm.com> * Update test/kernels/test_fidelity_statevector_kernel.py Co-authored-by: Declan Millar <declan.millar@ibm.com> * Update qiskit_machine_learning/kernels/fidelity_statevector_kernel.py Co-authored-by: Declan Millar <declan.millar@ibm.com> * Update test/kernels/test_fidelity_statevector_kernel.py Co-authored-by: Declan Millar <declan.millar@ibm.com> * Update qiskit_machine_learning/kernels/fidelity_statevector_kernel.py Co-authored-by: Declan Millar <declan.millar@ibm.com> * Added Any class --------- Co-authored-by: M. Emre Sahin <40424147+OkuyanBoga@users.noreply.github.com> Co-authored-by: Declan Millar <declan.millar@ibm.com> Co-authored-by: Anton Dekusar <62334182+adekusar-drl@users.noreply.github.com> (cherry picked from commit c59063a)
- Loading branch information
1 parent
8e18006
commit 833f391
Showing
3 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
releasenotes/notes/fix-fid_statevector_kernel-pickling-b7fa2b13a15ec9c6.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed a bug where :class:`.FidelityStatevectorKernel` threw an error when pickled. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters