mindquantum.algorithm.nisq.StronglyEntangling
- class mindquantum.algorithm.nisq.StronglyEntangling(n_qubits, depth, entangle_gate, prefix='', suffix='')[源代码]
- 强纠缠ansatz。请参考 Circuit-centric quantum classifiers。 - 参数:
- n_qubits (int) - ansatz作用于多少个量子比特。 
- depth (int) - ansatz的深度。 
- entangle_gate (BasicGate) - 产生纠缠的量子门。 如果传入单量子比特门,则会添加一个控制量子比特, 如果传入双量子比特门,则该双量子比特门将作用于不同的量子比特。 
- prefix (str) - 参数的前缀。默认值: - ''。
- suffix (str) - 参数的后缀。默认值: - ''。
 
 - 样例: - >>> from mindquantum.core.gates import X >>> from mindquantum.algorithm.nisq import StronglyEntangling >>> ansatz = StronglyEntangling(3, 2, X) >>> ansatz.circuit ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┏━━━┓ q0: ──┨ U3(θ=l0_a0, φ=l0_b0, λ=l0_c0) ┠───■─────────┨╺╋╸┠─↯─ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┃ ┗━┳━┛ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┏━┻━┓ ┃ q1: ──┨ U3(θ=l0_a1, φ=l0_b1, λ=l0_c1) ┠─┨╺╋╸┠───■─────╂───↯─ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┗━━━┛ ┃ ┃ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┏━┻━┓ ┃ q2: ──┨ U3(θ=l0_a2, φ=l0_b2, λ=l0_c2) ┠───────┨╺╋╸┠───■───↯─ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┗━━━┛ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┏━━━┓ q0: ──┨ U3(θ=l1_a0, φ=l1_b0, λ=l1_c0) ┠───■───┨╺╋╸┠───────── ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┃ ┗━┳━┛ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┏━━━┓ q1: ──┨ U3(θ=l1_a1, φ=l1_b1, λ=l1_c1) ┠───╂─────■───┨╺╋╸┠─── ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┃ ┗━┳━┛ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┏━┻━┓ ┃ q2: ──┨ U3(θ=l1_a2, φ=l1_b2, λ=l1_c2) ┠─┨╺╋╸┠─────────■───── ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┗━━━┛