mindquantum.algorithm.nisq.Ansatz13

查看源文件
class mindquantum.algorithm.nisq.Ansatz13(n_qubits: int, depth: int, prefix: str = '', suffix: str = '')[源代码]

Arxiv 论文中所提及的量子线路13。

../../_images/ansatz13.png

请参考论文 Expressibility and entangling capability of parameterized quantum circuits for hybrid quantum-classical algorithms.

参数:
  • n_qubits (int) - 量子线路的总比特数。

  • depth (int) - ansatz 的循环层数。

  • prefix (str) - 参数的前缀。默认值: ''

  • suffix (str) - 参数的后缀。默认值: ''

样例:

>>> from mindquantum.algorithm.nisq import Ansatz13
>>> Ansatz13(4, 1).circuit
      ┏━━━━━━━━┓ ┏━━━━━━━━┓                                  ┏━━━━━━━━┓
q0: ──┨ RY(p0) ┠─┨ RZ(p4) ┠────────────────────────────■─────┨ RY(p8) ┠──────────────↯─
      ┗━━━━━━━━┛ ┗━━━━┳━━━┛                            ┃     ┗━━━━━━━━┛
      ┏━━━━━━━━┓      ┃                           ┏━━━━┻━━━┓ ┏━━━━━━━━┓
q1: ──┨ RY(p1) ┠──────╂─────────────────────■─────┨ RZ(p7) ┠─┨ RY(p9) ┠──────────────↯─
      ┗━━━━━━━━┛      ┃                     ┃     ┗━━━━━━━━┛ ┗━━━━━━━━┛
      ┏━━━━━━━━┓      ┃                ┏━━━━┻━━━┓            ┏━━━━━━━━━┓ ┏━━━━━━━━━┓
q2: ──┨ RY(p2) ┠──────╂──────────■─────┨ RZ(p6) ┠────────────┨ RY(p10) ┠─┨ RZ(p12) ┠─↯─
      ┗━━━━━━━━┛      ┃          ┃     ┗━━━━━━━━┛            ┗━━━━━━━━━┛ ┗━━━━┳━━━━┛
      ┏━━━━━━━━┓      ┃     ┏━━━━┻━━━┓                       ┏━━━━━━━━━┓      ┃
q3: ──┨ RY(p3) ┠──────■─────┨ RZ(p5) ┠───────────────────────┨ RY(p11) ┠──────■──────↯─
      ┗━━━━━━━━┛            ┗━━━━━━━━┛                       ┗━━━━━━━━━┛
                  ┏━━━━━━━━━┓
q0: ───────■──────┨ RZ(p14) ┠───────────────
           ┃      ┗━━━━┳━━━━┛
           ┃           ┃      ┏━━━━━━━━━┓
q1: ───────╂───────────■──────┨ RZ(p15) ┠───
           ┃                  ┗━━━━┳━━━━┛
           ┃                       ┃
q2: ───────╂───────────────────────■────────

      ┏━━━━┻━━━━┓
q3: ──┨ RZ(p13) ┠───────────────────────────
      ┗━━━━━━━━━┛