mindquantum.algorithm.qaia.CFC ============================== .. 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/qaia/mindquantum.algorithm.qaia.CFC.rst :alt: 查看源文件 .. py:class:: mindquantum.algorithm.qaia.CFC(J, h=None, x=None, n_iter=1000, batch_size=1, dt=0.1) 混沌振幅反馈算法。 参考文献:`Coherent Ising machines with optical error correction circuits `_。 .. note:: 为了内存效率,输入数组 'x' 不会被复制,并且会在优化过程中被原地修改。 如果需要保留原始数据,请使用 `x.copy()` 传入副本。 参数: - **J** (Union[numpy.array, scipy.sparse.spmatrix]) - 耦合矩阵,维度为 :math:`(N \times N)`。 - **h** (numpy.array) - 外场强度,维度为 :math:`(N, )`。 - **x** (numpy.array) - 自旋初始化配置,维度为 :math:`(N \times batch\_size)`。会在优化过程中被修改。如果不提供(``None``),将被初始化为服从正态分布 N(0, 0.1) 的随机值。默认值: ``None``。 - **n_iter** (int) - 迭代步数。默认值: ``1000``。 - **batch_size** (int) - 样本个数。默认值为: ``1``。 - **dt** (float) - 迭代步长。默认值: ``0.1``。 .. py:method:: initialize() 初始化自旋和错误变量。 .. py:method:: update() 动力学演化。