Esempio n. 1
0
 def __init__(self, feature_dimension: int = 2) -> None:
     """
     Args:
         feature_dimension: The feature dimension, has a minimum value of 1.
     """
     validate_min('feature_dimension', feature_dimension, 1)
     super().__init__()
     self._feature_dimension = feature_dimension
     self._num_qubits = next_power_of_2_base(feature_dimension)
Esempio n. 2
0
    def __init__(self, feature_dimension=2):
        """Constructor.

        Args:
            feature_dimension (int): The feature dimension
        """
        self.validate(locals())
        super().__init__()
        self._feature_dimension = feature_dimension
        self._num_qubits = next_power_of_2_base(feature_dimension)
    def __init__(self, feature_dimension: int = 2) -> None:
        """
        Args:
            feature_dimension: The feature dimension, has a minimum value of 1.
        """
        validate_min('feature_dimension', feature_dimension, 1)
        with warnings.catch_warnings():
            warnings.filterwarnings('ignore', category=DeprecationWarning)
            super().__init__()

        warnings.warn(
            'The RawFeatureVector class has moved to qiskit.ml.circuit.library and '
            'subclasses the QuantumCircuit. This class, in qiskit.aqua.components, is '
            'deprecated as of Qiskit Aqua 0.9.0 and will be removed no earlier than 3 '
            'months after the release date.',
            DeprecationWarning,
            stacklevel=2)

        self._feature_dimension = feature_dimension
        self._num_qubits = next_power_of_2_base(feature_dimension)