# how can we save a model using qiskit_machine_learning?

How can we save a trained model using Qiskit Machine Learning library? I've built a VQC classification model and once finished, I'd like to save the different models to be loaded later. There is a save_model method in Qiskit Aqua (from qiskit.aqua.algorithms import VQC) but for Qiskit Machine Learning (from qiskit_machine_learning.algorithms.classifiers import VQC) I havent found it yet.

Thanks!

Qiskit ML VQC is a lightweight sub-class of sklearn SVC that supplies the quantum kernel to the SVC. You can therefore leverage sklearns capabilities to say save/restore models see https://scikit-learn.org/stable/modules/model_persistence.html#python-specific-serialization

• Thanks Steve!, but using pickle or np.savez (as the same way as aqua uses in save_model method) does no work, but with joblib it finally does. Jul 8, 2021 at 19:56