mindquantum.algorithm.nisq.Ansatz ================================== .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.5.0/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindquantum/blob/r0.10/docs/api_python/algorithm/nisq/mindquantum.algorithm.nisq.Ansatz.rst :alt: 查看源文件 .. py:class:: mindquantum.algorithm.nisq.Ansatz(name, n_qubits, *args, **kwargs) Ansatz的基类。 参数: - **name** (str) - ansatz的名字。 - **n_qubits** (int) - ansatz作用于多少个量子比特。 .. py:method:: circuit :property: 获取ansatz的量子线路。 返回: Circuit,ansatz的量子线路。