代码拉取完成,页面将自动刷新
.. py:class:: mindquantum.algorithm.nisq.IQPEncoding(n_feature, first_rotation_gate=RZ, second_rotation_gate=RZ, num_repeats=1, prefix: str = '', suffix: str = '') 通用IQP编码。 更多信息请参考 `Supervised learning with quantum-enhanced feature spaces. <https://www.nature.com/articles/s41586-019-0980-2>`_。 参数: - **n_feature** (int) - IQP编码所需编码的数据的特征数。 - **first_rotation_gate** (ParameterGate) - 旋转门RX、RY或RZ之一。 - **second_rotation_gate** (ParameterGate) - 旋转门RX、RY或RZ之一。 - **num_repeats** (int) - 编码迭代次数。 - **prefix** (str) - 参数的前缀。默认值: ``''``。 - **suffix** (str) - 参数的后缀。默认值: ``''``。 .. py:method:: data_preparation(data) IQP编码的ansatz能够将经典数据编码为量子态。 这种方法将经典数据准备成适合IQP编码的维数。 假设源数据具有 :math:`n` 特征,那么输出数据将具有 :math:`2n-1` 特征,前 :math:`n` 个特征是原始数据。对于 :math:`m > n` 。 .. math:: \text{data}_m = \text{data}_{m - n} * \text{data}_{m - n - 1} 参数: - **data** ([list, numpy.ndarray]) - IQP编码了解更多详细信息所需要的经典数据。 返回: numpy.ndarray,适合此ansatz维度的数据。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。