New Features
-
Enhanced Tutorials and Documentation for V2 Primitives, including a migration guide for V2 primitives.
-
Extended support for V2 primitives across various quantum machine learning algorithms including VQC, VQR, QSVC, QSVR, and QBayesian. If no primitive is provided, these algorithms will default to using V1 primitives as a fallback for this release. A warning is now issued to inform users of this default behavior.
-
Added partial multi-class support for VQC. This feature is now enabled when the output_shape parameter is set to num_classes and an interpret function is defined, allowing for multi-label classification tasks.
-
The PegasosQSVC and algorithms derived from NeuralNetworkClassifier module now support predict_proba function. This method can be utilized similarly to other scikit-learn-based algorithms.
-
The ADAM class now supports a callback function. This feature allows users to pass a custom callback function that will be called with information at each iteration step during the optimization process. The information passed to the callback includes the current time step, the parameters, and the function value. The callback function should be of the type
Callable[[int, Union[float, np.ndarray], float], None]
. Example of a callback function:
def callback(iteration:int, weights:np.ndarray, loss:float):
...
acc = calculate_accuracy(weights)
print(acc)
print(loss)
...