mindquantum.algorithm.nisq.Ansatz6

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

Ansatz 6 implement from arxiv paper.

../../_images/ansatz6.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 Ansatz6
>>> Ansatz6(3, 1).circuit
      ┏━━━━━━━━┓ ┏━━━━━━━━┓            ┏━━━━━━━━┓            ┏━━━━━━━━┓
q0: ──┨ RX(p0) ┠─┨ RZ(p3) ┠────────────┨ RX(p7) ┠────────────┨ RX(p9) ┠──────■──────↯─
      ┗━━━━━━━━┛ ┗━━━━━━━━┛            ┗━━━━┳━━━┛            ┗━━━━┳━━━┛      ┃
      ┏━━━━━━━━┓ ┏━━━━━━━━┓ ┏━━━━━━━━┓      ┃                     ┃          ┃
q1: ──┨ RX(p1) ┠─┨ RZ(p4) ┠─┨ RX(p6) ┠──────╂──────────■──────────■──────────╂──────↯─
      ┗━━━━━━━━┛ ┗━━━━━━━━┛ ┗━━━━┳━━━┛      ┃          ┃                     ┃
      ┏━━━━━━━━┓ ┏━━━━━━━━┓      ┃          ┃     ┏━━━━┻━━━┓            ┏━━━━┻━━━━┓
q2: ──┨ RX(p2) ┠─┨ RZ(p5) ┠──────■──────────■─────┨ RX(p8) ┠────────────┨ RX(p10) ┠─↯─
      ┗━━━━━━━━┛ ┗━━━━━━━━┛                       ┗━━━━━━━━┛            ┗━━━━━━━━━┛
                  ┏━━━━━━━━━┓ ┏━━━━━━━━━┓
q0: ───────■──────┨ RX(p12) ┠─┨ RZ(p15) ┠───
           ┃      ┗━━━━━━━━━┛ ┗━━━━━━━━━┛
      ┏━━━━┻━━━━┓ ┏━━━━━━━━━┓ ┏━━━━━━━━━┓
q1: ──┨ RX(p11) ┠─┨ RX(p13) ┠─┨ RZ(p16) ┠───
      ┗━━━━━━━━━┛ ┗━━━━━━━━━┛ ┗━━━━━━━━━┛
                  ┏━━━━━━━━━┓ ┏━━━━━━━━━┓
q2: ──────────────┨ RX(p14) ┠─┨ RZ(p17) ┠───
                  ┗━━━━━━━━━┛ ┗━━━━━━━━━┛