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