भाषाएँ
English
Bengali
French
Hindi
Italian
Japanese
Korean
Malayalam
Russian
Spanish
Tamil
Turkish
Vietnamese



QuantumKernel.evaluate

QuantumKernel.evaluate(x_vec, y_vec=None)[स्रोत]

Construct kernel matrix for given data and feature map

If y_vec is None, self inner product is calculated. If using statevector_simulator, only build circuits for \(\Psi(x)|0\rangle\), then perform inner product classically.

मापदण्ड:
  • x_vec (ndarray) -- 1D or 2D array of datapoints, NxD, where N is the number of datapoints, D is the feature dimension

  • y_vec (Optional[ndarray]) -- 1D or 2D array of datapoints, MxD, where M is the number of datapoints, D is the feature dimension

प्रदत्त प्रकार :

ndarray

प्रदत्त :

2D matrix, NxM

उभारता है :
  • QiskitMachineLearningError --

    • A quantum instance or backend has not been provided

  • ValueError --

    • unbound training parameters in the feature map circuit - x_vec and/or y_vec are not one or two dimensional arrays - x_vec and y_vec have have incompatible dimensions - x_vec and/or y_vec have incompatible dimension with feature map and and feature map can not be modified to match.