API Reference

QML Regressors

kernel.ml.QSVR

Quantum Support Vector Regression

kernel.ml.QKRR

Quantum Kernel Ridge Regression.

kernel.ml.QGPR

Quantum Gaussian Process Regression (QGPR).

qnn.QNNRegressor

Quantum Neural Network for Regression.

QML Classifiers

kernel.ml.QSVC

Quantum Support Vector Classification

kernel.ml.QGPC

Quantum Gaussian process classification (QGPC), that extends the scikit-learn sklearn.gaussian_process.GaussianProcessClassifier.

qnn.QNNClassifier

Quantum Neural Network for Classification.

Circuit Design

Encoding Circuits

encoding_circuit.YZ_CX_EncodingCircuit

Creates the YZ-CX Encoding Circuit from reference [1].

encoding_circuit.HighDimEncodingCircuit

The high-dimensional encoding circuit from reference [1].

encoding_circuit.HubregtsenEncodingCircuit

Creates the data reuploading encoding circuit as presented in reference [1].

encoding_circuit.ChebyshevTower

A feature-map that is based on the Chebyshev Tower encoding.

encoding_circuit.ChebyshevPQC

Chebyshev Encoding Circuit from reference [1].

encoding_circuit.MultiControlEncodingCircuit

Encoding circuit with HZ encoding followed by controlled Rx, Ry Rz rotations.

encoding_circuit.ChebyshevRx

Simple Chebyshev encoding circuit build from Rx gates

encoding_circuit.ParamZFeatureMap

Parameterized Z feature map with optional CNOT gates between the default layers.

encoding_circuit.QiskitEncodingCircuit

Wrapper to create sQUlearn encoding circuits from the Qiskit circuit library.

encoding_circuit.QCNNEncodingCircuit

Encoding circuit for quantum convolutional neural networks (QCNN).

Encoding Circuit Tools

encoding_circuit.encoding_circuit_base.EncodingCircuitBase

Encoding circuit base class

encoding_circuit.PrunedEncodingCircuit

Class for pruning redundant parameter of encoding circuits.

encoding_circuit.LayeredEncodingCircuit

A class for a simple creation of layered encoding circuits.

encoding_circuit.EncodingCircuitDerivatives

Class for automatic differentiation of encoding circuits.

encoding_circuit.TranspiledEncodingCircuit

Class for generated a Encoding Circuit with a transpiled circuit.

encoding_circuit.automated_pruning

Function for automated pruning of the parameters in the inputted parameterized quantum circuit.

encoding_circuit.pruning_from_QFI

Algorithm for determining the redundant parameters from the Quantum Fischer Information.

Operators

observables.SinglePauli

Observable constructed from a single Pauli operator of a single Qubit.

observables.SummedPaulis

Observable for summation of single Pauli operators.

observables.SingleProbability

Observable for measuring the probability of being in state 0 or 1 of a specified qubit.

observables.SummedProbabilities

Observable for summing single Qubit probabilities of binary states.

observables.IsingHamiltonian

Implementation of Ising type Hamiltonians.

observables.CustomObservable

Class for defining a custom observable.

Operator Tools

observables.observable_base.ObservableBase

Base class for observables.

observables.observable_derivatives.ObservableDerivatives

Class for calculating derivatives of observables.

Execution Tools

Executor

A class for executing quantum jobs on IBM Quantum systems or simulators.

Core

Quantum Kernel Core

kernel.matrix.FidelityKernel

Fidelity Quantum Kernel.

kernel.matrix.ProjectedQuantumKernel

Projected Quantum Kernel for Quantum Kernel Algorithms

kernel.optimization.kernel_optimizer.KernelOptimizer

Quantum kernel optimizer.

kernel.optimization.negative_log_likelihood.NLL

Negative log likelihood loss function.

kernel.optimization.target_alignment.TargetAlignment

Target alignment loss function.

QNN Core

QNN module for classification and regression.

qnn.lowlevel_qnn.LowLevelQNN

Low-level QNN factory, which creates the specific low-level QNN based on the quantum framework.

qnn.lowlevel_qnn_qiskit.LowLevelQNNQiskit

Low level implementation of QNNs and its derivatives based on Qiskit.

qnn.lowlevel_qnn_qiskit.Expec

Data structure that holds the set-up of derivative of the expectation value.

qnn.lowlevel_qnn_pennylane.LowLevelQNNPennyLane

Low level implementation of QNNs and its derivatives based on PennyLane.

qnn.lowlevel_qnn_base.LowLevelQNNBase

Base class for low-level QNNs.

qnn.loss.SquaredLoss

Squared loss for regression.

qnn.loss.VarianceLoss

Variance loss for regression.

qnn.loss.ParameterRegularizationLoss

Loss for parameter regularization.

Tools for training QNNs

qnn.get_variance_fac

Function for adjusting the variance regularization along the iterations.

qnn.get_lr_decay

Function for running an Adam optimization with a decay in the learning rate.

qnn.ShotsFromRSTD

Shot control for setting the shots of the gradient evaluation after the RSTD of the loss.

qnn.training.train

Function for training a given QNN.

qnn.training.train_mini_batch

Minimize a loss function using mini-batch gradient descent.

Implemented optimizers

Module for optimizer implementations and wrappers.

optimizers.Adam

sQUlearn's implementation of the ADAM optimizer

optimizers.LBFGSB

Wrapper class for scipy's L-BFGS-B implementation.

optimizers.SLSQP

Wrapper class for scipy's SLSQP implementation.

optimizers.SPSA

Wrapper class for Qiskit's SPSA implementation.

optimizers.SGLBO

sQUlearn's implementation of the SGLBO optimizer

OpTree Data Structure

util.OpTree

Static class containing functions for working with OpTrees objects.

util.optree.OpTreeList

A OpTree node that represents its children as a list/array/vector.

util.optree.OpTreeSum

A OpTree node that sums over its children.

util.optree.OpTreeCircuit

A leaf of the OpTree that represents a circuit.

util.optree.OpTreeOperator

A leaf of the OpTree that represents an operator.

util.optree.OpTreeExpectationValue

Leaf of the OpTree that represents an expectation value of a circuit and an operator.

util.optree.OpTreeMeasuredOperator

Leaf of the OpTree that represents an measurement.

util.optree.OpTreeContainer

A container for arbitrary objects that can be used as leafs in the OpTree.

util.optree.OpTreeValue

A leaf that contains an evaluated value.

PennyLane interface

util.pennylane.PennyLaneCircuit

Class for converting a Qiskit circuit to a PennyLane circuit.

Base Classes

observables.observable_base.ObservableBase

Base class for observables.

encoding_circuit.encoding_circuit_base.EncodingCircuitBase

Encoding circuit base class

kernel.matrix.kernel_matrix_base.KernelMatrixBase

Base class for defining quantum kernels.

kernel.optimization.kernel_loss_base.KernelLossBase

Empty parent class for a kernel loss function.

kernel.optimization.kernel_optimization_base.KernelOptimizerBase

Empty parent class for defining a kernel optimizer object.

optimizers.optimizer_base.OptimizerBase

Base class for QNN optimizers.

qnn.base_qnn.BaseQNN

Base Class for Quantum Neural Networks.

qnn.loss.LossBase

Base class implementation for loss functions.