qxmt.feature_maps.pennylane.ising module#
- class qxmt.feature_maps.pennylane.ising.XXFeatureMap(n_qubits, reps)
Bases:
BaseFeatureMap
XX feature map class.
- Parameters:
BaseFeatureMap (_type_) – base feature map class
n_qubits (int)
reps (int)
Example
>>> import numpy as np >>> from qxmt.feature_maps.pennylane.ising import XXFeatureMap >>> feature_map = XXFeatureMap(2, 2) >>> feature_map.draw(x_dim=2) 0: ──RX(0.33)─╭IsingXX(15.19)──RX(0.33)─╭IsingXX(15.19)─┤ 1: ──RX(0.44)─╰IsingXX(15.19)──RX(0.44)─╰IsingXX(15.19)─┤
- __init__(n_qubits, reps)
Initialize the XX feature map class.
- Parameters:
n_qubits (int) – number of qubits
reps (int) – number of repetitions
- Return type:
None
- feature_map(x)
Create quantum circuit of XX feature map.
- Parameters:
x (np.ndarray) – input data
- Return type:
None
- class qxmt.feature_maps.pennylane.ising.YYFeatureMap(n_qubits, reps)
Bases:
BaseFeatureMap
YY feature map class.
- Parameters:
BaseFeatureMap (_type_) – base feature map class
n_qubits (int)
reps (int)
Example
>>> import numpy as np >>> from qxmt.feature_maps.pennylane.ising import YYFeatureMap >>> feature_map = YYFeatureMap(2, 2) >>> feature_map.draw(x_dim=2) 0: ──H──RY(0.86)─╭IsingYY(11.23)──H──RY(0.86)─╭IsingYY(11.23)─┤ 1: ──H──RY(0.68)─╰IsingYY(11.23)──H──RY(0.68)─╰IsingYY(11.23)─┤
- __init__(n_qubits, reps)
Initialize the YY feature map class.
- Parameters:
n_qubits (int) – number of qubits
reps (int) – number of repetitions
- Return type:
None
- feature_map(x)
Create quantum circuit of YY feature map.
- Parameters:
x (np.ndarray) – input data
- Return type:
None
- class qxmt.feature_maps.pennylane.ising.ZZFeatureMap(n_qubits, reps)
Bases:
BaseFeatureMap
ZZ feature map class.
- Parameters:
BaseFeatureMap (_type_) – base feature map class
n_qubits (int)
reps (int)
Example
>>> import numpy as np >>> from qxmt.feature_maps.pennylane.ising import ZZFeatureMap >>> feature_map = ZZFeatureMap(2, 2) >>> feature_map.draw(x_dim=2) 0: ──H──RZ(0.88)─╭IsingZZ(13.28)──H──RZ(0.88)─╭IsingZZ(13.28)─┤ 1: ──H──RZ(0.20)─╰IsingZZ(13.28)──H──RZ(0.20)─╰IsingZZ(13.28)─┤
- __init__(n_qubits, reps)
Initialize the ZZ feature map class.
- Parameters:
n_qubits (int) – number of qubits
reps (int) – number of repetitions
- Return type:
None
- feature_map(x)
Create quantum circuit of ZZ feature map.
- Parameters:
x (np.ndarray) – input data
- Return type:
None