Closed rlosadagarcia closed 11 months ago
Hi @rlosadagarcia, I have opened an issue on qiskit-machine-learning to try to find a fix from the QKT class side. You can follow up here: https://github.com/Qiskit/qiskit-machine-learning/issues/600
I believe this has been resolved by https://github.com/Qiskit/qiskit-ibm-runtime/pull/902, if not, feel free to reopen
Describe the bug I am encountering a
RecursionError
when using theQuantumKernelTrainer
class during the fitting process of aTrainableFidelityQuantumKernel
object from the qiskit_machine_learning package within a Qiskit IBM Runtime session. To train the classifier over a noisy backend, I am manually setting a noise model in theSampler
options.However, the traceback reveals that the issue is related to the deepcopy function in the copy module, which is called by the internal functions of the
QuantumKernelTrainer
.I want to know if the issue I'm facing is due to a bug in the underlying code or if the approach I'm taking is incorrect.
Steps to reproduce This is a minimal working example to prompt the error:
The error obtained is the following:
Expected behavior The expected thing would be that the Quantum Kernel is correctly trained.
Suggested solutions
Additional Information I first posted it on Stack Overflow and was advised to also post it here