Skip to content

Commit

Permalink
Merge pull request #6 from qDNA-yonsei/nqe-ae-feature-map
Browse files Browse the repository at this point in the history
Adds class `NqeAeFeatureMap`
  • Loading branch information
israelferrazaraujo authored Dec 2, 2023
2 parents 128c13c + cd8d0e4 commit 148dc64
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions qdna/embedding/nqe_ae_feature_map.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright 2023 qdna-lib project.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from qdna.embedding.nqe_base import NqeBase
from qdna.embedding.ae_feature_map import AeFeatureMap


class NqeAeFeatureMap(AeFeatureMap, NqeBase):

def __init__(
self,
num_qubits: int,
reps: int = 1,
parameter_prefix: str = "x",
insert_barriers: bool = False,
name: str = "NqeAeFeatureMap",
nn = None,
) -> None:

super().__init__(
num_qubits=num_qubits,
reps=reps,
parameter_prefix=parameter_prefix,
insert_barriers=insert_barriers,
name=name
)

NqeBase.__init__(self, nn=nn)

self._feature_map = AeFeatureMap
self._init_parameters = {
'num_qubits':num_qubits,
'reps':reps,
'parameter_prefix':parameter_prefix,
'insert_barriers':insert_barriers,
'name':name
}

0 comments on commit 148dc64

Please sign in to comment.