mindquantum.algorithm.nisq.RYRZFull

class mindquantum.algorithm.nisq.RYRZFull(n_qubits: int, depth: int, prefix: str = '', suffix: str = '')[source]

HEA with RY and RZ as single qubit gate and fully mapped CNOT gate as entangle gate.

../../_images/RYRZFull.png
Parameters
  • n_qubits (int) – total qubits number of this ansatz.

  • depth (int) – depth of ansatz.

  • prefix (str) – prefix of parameters. Default: ''.

  • suffix (str) – suffix of parameters. Default: ''.

Examples

>>> from mindquantum.algorithm.nisq import RYRZFull
>>> RYRZFull(3, 1, prefix='a').circuit
      ┏━━━━━━━━━━┓ ┏━━━━━━━━━━┓                   ┏━━━━━━━━━━┓ ┏━━━━━━━━━━┓
q0: ──┨ RY(a_p0) ┠─┨ RZ(a_p3) ┠───■─────■─────────┨ RY(a_p6) ┠─┨ RZ(a_p9) ┠────
      ┗━━━━━━━━━━┛ ┗━━━━━━━━━━┛   ┃     ┃         ┗━━━━━━━━━━┛ ┗━━━━━━━━━━┛
      ┏━━━━━━━━━━┓ ┏━━━━━━━━━━┓ ┏━┻━┓   ┃         ┏━━━━━━━━━━┓ ┏━━━━━━━━━━━┓
q1: ──┨ RY(a_p1) ┠─┨ RZ(a_p4) ┠─┨╺╋╸┠───╂─────■───┨ RY(a_p7) ┠─┨ RZ(a_p10) ┠───
      ┗━━━━━━━━━━┛ ┗━━━━━━━━━━┛ ┗━━━┛   ┃     ┃   ┗━━━━━━━━━━┛ ┗━━━━━━━━━━━┛
      ┏━━━━━━━━━━┓ ┏━━━━━━━━━━┓       ┏━┻━┓ ┏━┻━┓ ┏━━━━━━━━━━┓ ┏━━━━━━━━━━━┓
q2: ──┨ RY(a_p2) ┠─┨ RZ(a_p5) ┠───────┨╺╋╸┠─┨╺╋╸┠─┨ RY(a_p8) ┠─┨ RZ(a_p11) ┠───
      ┗━━━━━━━━━━┛ ┗━━━━━━━━━━┛       ┗━━━┛ ┗━━━┛ ┗━━━━━━━━━━┛ ┗━━━━━━━━━━━┛