mindquantum.algorithm.nisq.RYLinear
- class mindquantum.algorithm.nisq.RYLinear(n_qubits: int, depth: int, prefix: str = '', suffix: str = '')[source]
HEA with
RY
as single qubit gate and linearly mapped CNOT gate as entanglement gate.For more information about this ansatz, please refer to Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets.
- Parameters
Examples
>>> from mindquantum.algorithm.nisq import RYLinear >>> RYLinear(3, 2, prefix='a').circuit ┏━━━━━━━━━━┓ ┏━━━━━━━━━━┓ ┏━━━━━━━━━━┓ q0: ──┨ RY(a_p0) ┠───■─────────┨ RY(a_p3) ┠───■─────────┨ RY(a_p6) ┠─── ┗━━━━━━━━━━┛ ┃ ┗━━━━━━━━━━┛ ┃ ┗━━━━━━━━━━┛ ┏━━━━━━━━━━┓ ┏━┻━┓ ┏━━━━━━━━━━┓ ┏━┻━┓ ┏━━━━━━━━━━┓ q1: ──┨ RY(a_p1) ┠─┨╺╋╸┠───■───┨ RY(a_p4) ┠─┨╺╋╸┠───■───┨ RY(a_p7) ┠─── ┗━━━━━━━━━━┛ ┗━━━┛ ┃ ┗━━━━━━━━━━┛ ┗━━━┛ ┃ ┗━━━━━━━━━━┛ ┏━━━━━━━━━━┓ ┏━┻━┓ ┏━━━━━━━━━━┓ ┏━┻━┓ ┏━━━━━━━━━━┓ q2: ──┨ RY(a_p2) ┠───────┨╺╋╸┠─┨ RY(a_p5) ┠───────┨╺╋╸┠─┨ RY(a_p8) ┠─── ┗━━━━━━━━━━┛ ┗━━━┛ ┗━━━━━━━━━━┛ ┗━━━┛ ┗━━━━━━━━━━┛