qxmt.feature_maps.pennylane.yzcx module#
- class qxmt.feature_maps.pennylane.yzcx.YZCXFeatureMap(n_qubits, reps, c, seed)
Bases:
BaseFeatureMap
YZCX feature map class. Reference: https://arxiv.org/abs/2108.01039
- Parameters:
BaseFeatureMap (_type_) – base feature map class
n_qubits (int)
reps (int)
c (float)
seed (int)
Example
>>> import numpy as np >>> from qxmt.feature_maps.pennylane.yzcx import YZCXFeatureMap >>> feature_map = YZCXFeatureMap(2, 2, 0.1, 0) >>> feature_map.draw(x_dim=2) 0: ──RY(0.03)──RY(3.42)──RZ(0.05)──RZ(5.88)─╭●──RY(0.03)──RY(5.39)──RZ(0.05)──RZ(0.21) 1: ─────────────────────────────────────────╰X──RY(0.03)──RY(5.13)──RZ(0.05)──RZ(0.02) ──────────────────────────────────────────┤ ──RY(0.03)───RY(4.58)──RZ(0.05)──RZ(1.10)─┤
- __init__(n_qubits, reps, c, seed)
“Initialize the YZCX feature map class.
- Parameters:
n_qubits (int) – number of qubits
reps (int) – number of repetitions
c (float) – scaling factor
seed (int) – random seed
- Return type:
None
- feature_map(x)
Create quantum circuit of YZCX feature map.
- Parameters:
x (np.ndarray) – input data
- Return type:
None