mindquantum.algorithm.nisq.Ansatz9#
- class mindquantum.algorithm.nisq.Ansatz9(n_qubits: int, depth: int, prefix: str = '', suffix: str = '')#
Ansatz 9 implement from arxiv paper.
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 Ansatz9 >>> Ansatz9(4, 2).circuit ┏━━━┓ ┏━━━┓ ┏━━━━━━━━┓ ┏━━━┓ ┏━━━┓ ┏━━━━━━━━┓ q0: ──┨ H ┠─────────────┨ Z ┠─┨ RX(p0) ┠─┨ H ┠─────────────┨ Z ┠─┨ RX(p4) ┠─── ┗━━━┛ ┗━┳━┛ ┗━━━━━━━━┛ ┗━━━┛ ┗━┳━┛ ┗━━━━━━━━┛ ┏━━━┓ ┏━━━┓ ┃ ┏━━━━━━━━┓ ┏━━━┓ ┏━━━┓ ┃ ┏━━━━━━━━┓ q1: ──┨ H ┠───────┨ Z ┠───■───┨ RX(p1) ┠─┨ H ┠───────┨ Z ┠───■───┨ RX(p5) ┠─── ┗━━━┛ ┗━┳━┛ ┗━━━━━━━━┛ ┗━━━┛ ┗━┳━┛ ┗━━━━━━━━┛ ┏━━━┓ ┏━━━┓ ┃ ┏━━━━━━━━┓ ┏━━━┓ ┏━━━┓ ┃ ┏━━━━━━━━┓ q2: ──┨ H ┠─┨ Z ┠───■─────────┨ RX(p2) ┠─┨ H ┠─┨ Z ┠───■─────────┨ RX(p6) ┠─── ┗━━━┛ ┗━┳━┛ ┗━━━━━━━━┛ ┗━━━┛ ┗━┳━┛ ┗━━━━━━━━┛ ┏━━━┓ ┃ ┏━━━━━━━━┓ ┏━━━┓ ┃ ┏━━━━━━━━┓ q3: ──┨ H ┠───■───────────────┨ RX(p3) ┠─┨ H ┠───■───────────────┨ RX(p7) ┠─── ┗━━━┛ ┗━━━━━━━━┛ ┗━━━┛ ┗━━━━━━━━┛