Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.aqua.components.feature_maps.RawFeatureVector

class RawFeatureVector(feature_dimension=2)

GitHub

Raw Feature Vector feature map.

The Raw Feature Vector can be directly used as a feature map, where the raw feature vectors will be automatically padded with ending 0s as necessary, to make sure vector length is a power of 2, and normalized such that it can be treated and used as an initial quantum state vector.

Parameters

feature_dimension (int) – The feature dimension, has a minimum value of 1.

__init__

__init__(feature_dimension=2)

Parameters

feature_dimension (int) – The feature dimension, has a minimum value of 1.


Methods

__init__([feature_dimension])type feature_dimensionint
construct_circuit(x[, qr, inverse])Construct the second order expansion based on given data.
get_entangler_map(map_type, num_qubits)get entangle map
validate_entangler_map(entangler_map, num_qubits)validate entangler map

Attributes

feature_dimensionreturns feature dimension
num_qubitsreturns number of qubits
support_parameterized_circuitreturns whether or not the sub-class support parameterized circuit

construct_circuit

construct_circuit(x, qr=None, inverse=False)

Construct the second order expansion based on given data.

Parameters

  • x (numpy.ndarray) – 1-D to-be-encoded data.
  • qr (QuantumRegister) – the QuantumRegister object for the circuit, if None, generate new registers with name q.
  • inverse (bool) – inverse

Returns

a quantum circuit transform data x.

Return type

QuantumCircuit

Raises

  • TypeError – invalid input
  • ValueError – invalid input

feature_dimension

returns feature dimension

get_entangler_map

static get_entangler_map(map_type, num_qubits)

get entangle map

num_qubits

returns number of qubits

support_parameterized_circuit

returns whether or not the sub-class support parameterized circuit

validate_entangler_map

static validate_entangler_map(entangler_map, num_qubits)

validate entangler map

Was this page helpful?
Report a bug or request content on GitHub.