mindquantum.algorithm.nisq.Ansatz18

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

Ansatz 18 implement from arxiv paper.

../../_images/ansatz18.png

Please refers to Expressibility and entangling capability of parameterized quantum circuits for hybrid quantum-classical algorithms.

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 Ansatz18
>>> Ansatz18(4, 1).circuit
      ┏━━━━━━━━┓ ┏━━━━━━━━┓ ┏━━━━━━━━┓
q0: ──┨ RX(p0) ┠─┨ RZ(p4) ┠─┨ RZ(p8) ┠─────────────────────────────■────────
      ┗━━━━━━━━┛ ┗━━━━━━━━┛ ┗━━━━┳━━━┛                             ┃
      ┏━━━━━━━━┓ ┏━━━━━━━━┓      ┃                            ┏━━━━┻━━━━┓
q1: ──┨ RX(p1) ┠─┨ RZ(p5) ┠──────╂─────────────────────■──────┨ RZ(p11) ┠───
      ┗━━━━━━━━┛ ┗━━━━━━━━┛      ┃                     ┃      ┗━━━━━━━━━┛
      ┏━━━━━━━━┓ ┏━━━━━━━━┓      ┃                ┏━━━━┻━━━━┓
q2: ──┨ RX(p2) ┠─┨ RZ(p6) ┠──────╂──────────■─────┨ RZ(p10) ┠───────────────
      ┗━━━━━━━━┛ ┗━━━━━━━━┛      ┃          ┃     ┗━━━━━━━━━┛
      ┏━━━━━━━━┓ ┏━━━━━━━━┓      ┃     ┏━━━━┻━━━┓
q3: ──┨ RX(p3) ┠─┨ RZ(p7) ┠──────■─────┨ RZ(p9) ┠───────────────────────────
      ┗━━━━━━━━┛ ┗━━━━━━━━┛            ┗━━━━━━━━┛