mindquantum.core.circuit.SwapParts =================================== .. 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/core/circuit/mindquantum.core.circuit.SwapParts.rst :alt: 查看源文件 .. py:class:: mindquantum.core.circuit.SwapParts(a: Iterable, b: Iterable, maps_ctrl=None) 交换量子线路中两个不同的部分,可以增加控制比特,也可以不加。 参数: - **a** (Iterable) - 您需要交换的第一部分。 - **b** (Iterable) - 您需要交换的第二部分。 - **maps_ctrl** (int, Iterable) - 通过单个量子比特或不同量子比特来控制交换,或者不加控制量子比特。默认值: ``None``。