Qiskit Machine Learningの概要¶
概要¶
Qiskit Machine Learningは、分類や回帰など、さまざまなアプリケーションで使用される基本的な計算ビルディングブロック、量子カーネル (Quantum Kernel) や 量子ニューラルネットワーク (Quantum Neural Networks) など、を導入しています。 この設計は非常に使いやすく、ユーザーは量子コンピューティングの深い知識がなくても最初のモデルのプロトタイプをすばやく作成できます。 一方、Qiskit Machine Learningは非常に柔軟性があり、ユーザーはそれを簡単に拡張して最先端の量子機械学習研究をサポートできます。
Qiskit Machine Learning provides the FidelityQuantumKernel
class class that makes use of the BaseStateFidelity
algorithm
introduced in Qiskit and can be easily used to directly compute kernel matrices for given datasets
or can be passed to a Quantum Support Vector Classifier
(QSVC
) or
Quantum Support Vector Regressor (QSVR
)
to quickly start solving classification or regression problems.
It also can be used with many other existing kernel-based machine learning algorithms from established
classical frameworks.
Qiskit Machine Learning defines a generic interface for neural networks that is implemented by different
quantum neural networks. Two core implementations are readily provided, such as the
EstimatorQNN
and the SamplerQNN
.
The EstimatorQNN
leverages
the BaseEstimator
primitive from Qiskit and allows users to combine
parametrized quantum circuits with quantum mechanical observables. The circuits can be constructed
using, for example, building blocks from Qiskit’s circuit library, and the QNN’s output is given
by the expected value of the observable.
The SamplerQNN
leverages another primitive
introduced in Qiskit, the BaseSampler
primitive. This neural network
translates quasi-probabilities of bitstrings estimated by the primitive into a desired output. This
translation step can be used to interpret a given bitstring in a particular context, e.g.
translating it into a set of classes.
ニューラルネットワークには、特定の入力に対してそれらを評価する機能と、対応する勾配を計算する機能が含まれています。これは、効率的なトレーニングに重要です。 ニューラルネットワークをトレーニングして使用するために、Qiskit Machine Learningは、 NeuralNetworkClassifier
や NeuralNetworkRegressor
などのさまざまな学習アルゴリズムを提供します。 どちらもQNNを入力として受け取り、分類または回帰のコンテキストで使用します。 簡単に開始できるように、2つの便利な実装が提供されています。変分量子分類 (Variational Quantum Classifier、 VQC
) と変分量子回帰 (Variational Quantum Regressor、 VQR
) です。 どちらも特徴マップと ansatz を取り、基礎となるQNNを自動的に構築します。
In addition to the models provided directly in Qiskit Machine Learning, it has the
TorchConnector
,
which allows users to integrate all of our quantum neural networks directly into the
PyTorch
open source machine learning library. Thanks to Qiskit’s gradient algorithms, this includes automatic
differentiation - the overall gradients computed by PyTorch
during the backpropagation take into
account quantum neural networks, too. The flexible design also allows the building of connectors
to other packages in the future.