Skip to main content
IBM Quantum Platform
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.

RawFeatureVector

class RawFeatureVector(feature_dimension=2)

GitHub

Bases: qiskit.aqua.components.feature_maps.feature_map.FeatureMap

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.


Methods

construct_circuit

RawFeatureVector.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

get_entangler_map

static RawFeatureVector.get_entangler_map(map_type, num_qubits)

get entangle map

validate_entangler_map

static RawFeatureVector.validate_entangler_map(entangler_map, num_qubits)

validate entangler map


Attributes

feature_dimension

returns feature dimension

num_qubits

returns number of qubits

support_parameterized_circuit

returns whether or not the sub-class support parameterized circuit

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