1.8K Star 3.1K Fork 4.3K

GVPMindSpore/mindquantum

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.github
.gitlab
.jenkins
_build
ccsrc
cmake
docs
api_python
algorithm
core
device
dtype
engine
framework
layer
operations
mindquantum.framework.MQAnsatzOnlyOps.rst
mindquantum.framework.MQEncoderOnlyOps.rst
mindquantum.framework.MQN2AnsatzOnlyOps.rst
mindquantum.framework.MQN2EncoderOnlyOps.rst
mindquantum.framework.MQN2Ops.rst
mindquantum.framework.MQOps.rst
mindquantum.framework.QRamVecOps.rst
io
simulator
utils
mindquantum.algorithm.rst
mindquantum.core.rst
mindquantum.device.rst
mindquantum.dtype.rst
mindquantum.engine.rst
mindquantum.framework.rst
mindquantum.io.rst
mindquantum.simulator.rst
mindquantum.utils.rst
overview.rst
api_python_en
source
CMakeLists.txt
Doxyfile
Makefile
MindQuantum-architecture.png
MindQuantum-architecture_EN.png
README.md
circuit_svg.png
index.html.in
mindquantum
mindquantum_config
scripts
tests
third_party
.clang-format
.clangd
.cmake-format.yaml
.codespell.allow
.cppcheck.suppressions
.gitignore
.gitlab-ci.yml
.pre-commit-config-format-gitee.yml
.pre-commit-config-format.yml
.pre-commit-config-gitee.yaml
.pre-commit-config.yaml
.readthedocs.yaml
.whitelizard.txt
.yamllint
CMakeLists.txt
CONTRIBUTING.md
CONTRIBUTING_CN.md
CPPLINT.cfg
INSTALL.md
INSTALL_cn.md
LICENSE
MANIFEST.in
NOTICE
README.md
README_CN.md
RELEASE.md
RELEASE_CN.md
VERSION.txt
build.bat
build.ps1
build.sh
build_locally.bat
build_locally.ps1
build_locally.sh
install_with_docker.md
install_with_docker_en.md
pyproject.toml
requirements.txt
requirements_test.txt
setup.cfg
setup.py
克隆/下载
mindquantum.framework.MQN2EncoderOnlyOps.rst 756 Bytes
一键复制 编辑 原始数据 按行查看 历史
donghufeng 提交于 2年前 . re-organize docs

mindquantum.framework.MQN2EncoderOnlyOps

.. py:class:: mindquantum.framework.MQN2EncoderOnlyOps(expectation_with_grad)

    仅包含encoder线路的量子线路演化算子,算子返回参数化量子线路(PQC)演化出的量子态上哈密顿量期望绝对值的平方。此算子只能在 `PYNATIVE_MODE` 下执行。

    参数:
        - **expectation_with_grad** (GradOpsWrapper) - 接收encoder数据和ansatz数据,并返回期望值和参数相对于期望的梯度值。

    输入:
        - **ans_data** (Tensor) - shape为 :math:`N` 的Tensor,用于ansatz电路,其中 :math:`N` 表示ansatz参数的数量。

    输出:
        Tensor,hamiltonian期望绝对值的平方。
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mindspore/mindquantum.git
git@gitee.com:mindspore/mindquantum.git
mindspore
mindquantum
mindquantum
r0.9

搜索帮助