English
Languages
English
Japanese
German
Korean
Portuguese, Brazilian
French
Shortcuts

qiskit.aqua.components.feature_maps.RawFeatureVector

class RawFeatureVector(feature_dimension=2)[source]

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__(feature_dimension=2)[source]
Parameters

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

Methods

__init__([feature_dimension])

type feature_dimension

int

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_dimension

returns feature dimension

num_qubits

returns number of qubits

support_parameterized_circuit

returns whether or not the sub-class support parameterized circuit

construct_circuit(x, qr=None, inverse=False)[source]

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

property feature_dimension

returns feature dimension

static get_entangler_map(map_type, num_qubits)

get entangle map

property num_qubits

returns number of qubits

property support_parameterized_circuit

returns whether or not the sub-class support parameterized circuit

static validate_entangler_map(entangler_map, num_qubits)

validate entangler map