Italian
Linguaggi
English
Bengali
French
Hindi
Italian
Japanese
Korean
Malayalam
Russian
Spanish
Tamil
Turkish
Vietnamese
Shortcuts



QSVC

class QSVC(*args, quantum_kernel=None, **kwargs)[sorgente]

Quantum Support Vector Classifier that extends the scikit-learn sklearn.svm.SVC classifier and introduces an additional quantum_kernel parameter.

This class shows how to use a quantum kernel for classification. The class inherits its methods like fit and predict from scikit-learn, see the example below. Read more in the scikit-learn user guide.

Example

qsvc = QSVC(quantum_kernel=qkernel)
qsvc.fit(sample_train,label_train)
qsvc.predict(sample_test)
Parametri
  • quantum_kernel (Optional[BaseKernel]) – Quantum kernel to be used for classification.

  • *args – Variable length argument list to pass to SVC constructor.

  • **kwargs – Arbitrary keyword arguments to pass to SVC constructor.

Attributes

quantum_kernel

Returns quantum kernel

Methods