qiskit-documentation/docs/api/qiskit/0.24/qiskit.aqua.components.feat...

92 lines
5.5 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: FeatureMap
description: API reference for qiskit.aqua.components.feature_maps.FeatureMap
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.aqua.components.feature_maps.FeatureMap
---
<span id="qiskit-aqua-components-feature-maps-featuremap" />
# qiskit.aqua.components.feature\_maps.FeatureMap
<Class id="qiskit.aqua.components.feature_maps.FeatureMap" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.8/qiskit/aqua/components/feature_maps/feature_map.py" signature="FeatureMap" modifiers="class">
Base class for FeatureMap.
This method should initialize the module and use an exception if a component of the module is not available.
### \_\_init\_\_
<Function id="qiskit.aqua.components.feature_maps.FeatureMap.__init__" signature="__init__()" modifiers="abstract">
Initialize self. See help(type(self)) for accurate signature.
</Function>
## Methods
| | |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [`__init__`](#qiskit.aqua.components.feature_maps.FeatureMap.__init__ "qiskit.aqua.components.feature_maps.FeatureMap.__init__")() | Initialize self. |
| [`construct_circuit`](#qiskit.aqua.components.feature_maps.FeatureMap.construct_circuit "qiskit.aqua.components.feature_maps.FeatureMap.construct_circuit")(x\[, qr, inverse]) | Construct the variational form, given its parameters. |
| [`get_entangler_map`](#qiskit.aqua.components.feature_maps.FeatureMap.get_entangler_map "qiskit.aqua.components.feature_maps.FeatureMap.get_entangler_map")(map\_type, num\_qubits) | get entangle map |
| [`validate_entangler_map`](#qiskit.aqua.components.feature_maps.FeatureMap.validate_entangler_map "qiskit.aqua.components.feature_maps.FeatureMap.validate_entangler_map")(entangler\_map, num\_qubits) | validate entangler map |
## Attributes
| | |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| [`feature_dimension`](#qiskit.aqua.components.feature_maps.FeatureMap.feature_dimension "qiskit.aqua.components.feature_maps.FeatureMap.feature_dimension") | returns feature dimension |
| [`num_qubits`](#qiskit.aqua.components.feature_maps.FeatureMap.num_qubits "qiskit.aqua.components.feature_maps.FeatureMap.num_qubits") | returns number of qubits |
| [`support_parameterized_circuit`](#qiskit.aqua.components.feature_maps.FeatureMap.support_parameterized_circuit "qiskit.aqua.components.feature_maps.FeatureMap.support_parameterized_circuit") | returns whether or not the sub-class support parameterized circuit |
### construct\_circuit
<Function id="qiskit.aqua.components.feature_maps.FeatureMap.construct_circuit" signature="construct_circuit(x, qr=None, inverse=False)" modifiers="abstract">
Construct the variational form, given its parameters.
**Parameters**
* **x** (*numpy.ndarray\[float]*) 1-D array, data
* **qr** ([*QuantumRegister*](qiskit.circuit.QuantumRegister "qiskit.circuit.QuantumRegister")) the QuantumRegister object for the circuit, if None, generate new registers with name q.
* **inverse** (*bool*) whether or not inverse the circuit
**Returns**
a quantum circuit.
**Return type**
[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
</Function>
### feature\_dimension
<Attribute id="qiskit.aqua.components.feature_maps.FeatureMap.feature_dimension">
returns feature dimension
</Attribute>
### get\_entangler\_map
<Function id="qiskit.aqua.components.feature_maps.FeatureMap.get_entangler_map" signature="get_entangler_map(map_type, num_qubits)" modifiers="static">
get entangle map
</Function>
### num\_qubits
<Attribute id="qiskit.aqua.components.feature_maps.FeatureMap.num_qubits">
returns number of qubits
</Attribute>
### support\_parameterized\_circuit
<Attribute id="qiskit.aqua.components.feature_maps.FeatureMap.support_parameterized_circuit">
returns whether or not the sub-class support parameterized circuit
</Attribute>
### validate\_entangler\_map
<Function id="qiskit.aqua.components.feature_maps.FeatureMap.validate_entangler_map" signature="validate_entangler_map(entangler_map, num_qubits)" modifiers="static">
validate entangler map
</Function>
</Class>