mindquantum.algorithm.nisq.Ansatz1
- class mindquantum.algorithm.nisq.Ansatz1(n_qubits: int, depth: int, prefix: str = '', suffix: str = '')[source]
Ansatz 1 implement from arxiv paper.
Please refers to Expressibility and entangling capability of parameterized quantum circuits for hybrid quantum-classical algorithms.
- Parameters
Examples
>>> from mindquantum.algorithm.nisq import Ansatz1 >>> Ansatz1(3, 2).circuit ┏━━━━━━━━┓ ┏━━━━━━━━┓ ┏━━━━━━━━┓ ┏━━━━━━━━┓ q0: ──┨ RX(p0) ┠─┨ RZ(p3) ┠─┨ RX(p6) ┠─┨ RZ(p9) ┠──── ┗━━━━━━━━┛ ┗━━━━━━━━┛ ┗━━━━━━━━┛ ┗━━━━━━━━┛ ┏━━━━━━━━┓ ┏━━━━━━━━┓ ┏━━━━━━━━┓ ┏━━━━━━━━━┓ q1: ──┨ RX(p1) ┠─┨ RZ(p4) ┠─┨ RX(p7) ┠─┨ RZ(p10) ┠─── ┗━━━━━━━━┛ ┗━━━━━━━━┛ ┗━━━━━━━━┛ ┗━━━━━━━━━┛ ┏━━━━━━━━┓ ┏━━━━━━━━┓ ┏━━━━━━━━┓ ┏━━━━━━━━━┓ q2: ──┨ RX(p2) ┠─┨ RZ(p5) ┠─┨ RX(p8) ┠─┨ RZ(p11) ┠─── ┗━━━━━━━━┛ ┗━━━━━━━━┛ ┗━━━━━━━━┛ ┗━━━━━━━━━┛