Encodings
Amplitude Encoding
- class AmplitudeEncoding(n_features=2)[source]
Bases:
qlearnkit.encodings.encoding_map.EncodingMap
Amplitude Encoding map
Creates a generic Encoding Map for classical data of size n_features
- Parameters
n_features – number of features (default: 2)
Angle Encoding
- class AngleEncoding(n_features=2, rotation='Y', scaling=1.5707963267948966)[source]
Bases:
qlearnkit.encodings.encoding_map.EncodingMap
Angle Encoding algorithm. Assumes data is feature-normalized.
- Parameters
rotation – the direction admitted values: X, Y, Z
scaling – scaling factor for normalized input data. The default scaling \(\pi/2\) does not induce a relative phase difference.
Basis Encoding
- class BasisEncoding(n_features=2)[source]
Bases:
qlearnkit.encodings.encoding_map.EncodingMap
Initializes Basis Encoding Map
Encoding Map
- class EncodingMap(n_features=2)[source]
Bases:
abc.ABC
Abstract Base class for qlearnkit encoding maps
Creates a generic Encoding Map for classical data of size n_features
- Parameters
n_features – number of features (default: 2)
- abstract construct_circuit(x)[source]
construct and return quantum circuit encoding data
- Return type
QuantumCircuit
- property num_qubits
getter for number of qubits
- property num_features
getter for number of features