Ai
1.8K Star 3.1K Fork 4.3K

GVPMindSpore/mindquantum
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mindquantum.algorithm.compiler.DecomposeU3.rst 834 Bytes
一键复制 编辑 原始数据 按行查看 历史
宦晓玲 提交于 2025-09-08 18:39 +08:00 . delete data type contents

mindquantum.algorithm.compiler.DecomposeU3

.. py:class:: mindquantum.algorithm.compiler.DecomposeU3(method='standard')

    将U3门分解为Z-X-Z-X-Z旋转序列。

    分解可以遵循以下两种方法之一:

    1. 标准方法: U3(θ,φ,λ) = Rz(φ)Rx(-π/2)Rz(θ)Rx(π/2)Rz(λ)
    2. 替代方法: U3(θ,φ,λ) = Rz(φ)Rx(π/2)Rz(π-θ)Rx(π/2)Rz(λ-π)

    参数:
        - **method** (str) - 使用的分解方法,可选'standard'或'alternative'。默认值:'standard'。

    .. py:method:: do(dag_circuit)

        执行U3门分解规则。

        参数:
            - **dag_circuit** (:class:`~.algorithm.compiler.DAGCircuit`) - 量子线路的DAG图。

        返回:
            bool,如果执行了任何分解操作则返回True,否则返回False。
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mindspore/mindquantum.git
git@gitee.com:mindspore/mindquantum.git
mindspore
mindquantum
mindquantum
master

搜索帮助