mindquantum.algorithm.nisq.Ansatz14
- class mindquantum.algorithm.nisq.Ansatz14(n_qubits, depth, prefix='', suffix='')[源代码]
- Arxiv 论文中所提及的量子线路14。   - 参数:
- n_qubits (int) - 量子线路的总比特数。 
- depth (int) - ansatz 的循环层数。 
- prefix (str) - 参数的前缀。默认值: - ''。
- suffix (str) - 参数的后缀。默认值: - ''。
 
 - 样例: - >>> from mindquantum.algorithm.nisq import Ansatz14 >>> Ansatz14(4, 1).circuit ┏━━━━━━━━┓ ┏━━━━━━━━┓ ┏━━━━━━━━┓ q0: ──┨ RY(p0) ┠─┨ RX(p4) ┠────────────────────────────■─────┨ RY(p8) ┠──────────────↯─ ┗━━━━━━━━┛ ┗━━━━┳━━━┛ ┃ ┗━━━━━━━━┛ ┏━━━━━━━━┓ ┃ ┏━━━━┻━━━┓ ┏━━━━━━━━┓ q1: ──┨ RY(p1) ┠──────╂─────────────────────■─────┨ RX(p7) ┠─┨ RY(p9) ┠──────────────↯─ ┗━━━━━━━━┛ ┃ ┃ ┗━━━━━━━━┛ ┗━━━━━━━━┛ ┏━━━━━━━━┓ ┃ ┏━━━━┻━━━┓ ┏━━━━━━━━━┓ ┏━━━━━━━━━┓ q2: ──┨ RY(p2) ┠──────╂──────────■─────┨ RX(p6) ┠────────────┨ RY(p10) ┠─┨ RX(p12) ┠─↯─ ┗━━━━━━━━┛ ┃ ┃ ┗━━━━━━━━┛ ┗━━━━━━━━━┛ ┗━━━━┳━━━━┛ ┏━━━━━━━━┓ ┃ ┏━━━━┻━━━┓ ┏━━━━━━━━━┓ ┃ q3: ──┨ RY(p3) ┠──────■─────┨ RX(p5) ┠───────────────────────┨ RY(p11) ┠──────■──────↯─ ┗━━━━━━━━┛ ┗━━━━━━━━┛ ┗━━━━━━━━━┛ ┏━━━━━━━━━┓ q0: ───────■──────┨ RX(p14) ┠─────────────── ┃ ┗━━━━┳━━━━┛ ┃ ┃ ┏━━━━━━━━━┓ q1: ───────╂───────────■──────┨ RX(p15) ┠─── ┃ ┗━━━━┳━━━━┛ ┃ ┃ q2: ───────╂───────────────────────■──────── ┃ ┏━━━━┻━━━━┓ q3: ──┨ RX(p13) ┠─────────────────────────── ┗━━━━━━━━━┛