1.3K Star 2K Fork 3.5K

GVPMindSpore / mindquantum

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mindquantum.core.circuit.change_param_name.rst 864 Bytes
一键复制 编辑 原始数据 按行查看 历史
donghufeng 提交于 2023-11-02 16:11 . fix docing

mindquantum.core.circuit.change_param_name

.. py:function:: mindquantum.core.circuit.change_param_name(circuit_fn, name_map)

    更改含参量子线路或含参量子算子(可以生成含参量子线路的函数)里的参数名称。

    参数:
        - **circuit_fn** (Union[Circuit, FunctionType, MethodType]) - 量子线路,或可以生成量子线路的函数。
        - **name_map** (dict) - 参数名称映射的dict。

    返回:
        Circuit,或可以生成Circuit的函数。

    异常:
        - **TypeError** - 如果 `name_map` 不是映射。
        - **TypeError** - 如果 `name_map` 的 `key` 不是字符串。
        - **TypeError** - 如果 `name_map` 的 `value` 不是字符串。
        - **TypeError** - 如果 `circuit_fn` 不是Circuit或不能返回Circuit。
Python
1
https://gitee.com/mindspore/mindquantum.git
git@gitee.com:mindspore/mindquantum.git
mindspore
mindquantum
mindquantum
master

搜索帮助