[{"data":1,"prerenderedAt":548},["ShallowReactive",2],{"content-query-W4oqCO6QFo":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"cover":11,"type":12,"body":13,"_type":542,"_id":543,"_source":544,"_file":545,"_stem":546,"_extension":547},"/news/zh/3673","zh",false,"","重磅升级！MindSpore Quantum 0.10.0 正式发布，量子算法开发更灵活、更高效","量子计算已进入工程化阶段，发展一日千里，已经具备超越经典计算机的潜力，被认为是未来具有颠覆性影响的新型计算模式。","2025-03-28","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/04/03/d4a44cb28b094decb8b59a59de6fd2f5.png","news",{"type":14,"children":15,"toc":526},"root",[16,24,30,35,40,70,75,80,85,98,106,124,129,134,152,157,167,174,179,188,197,202,207,215,233,241,254,262,270,275,284,292,297,302,315,320,328,335,350,355,360,375,380,388,393,401,410,418,423,428,435,453,466,477,488,496,506,516],{"type":17,"tag":18,"props":19,"children":21},"element","h1",{"id":20},"重磅升级mindspore-quantum-0100-正式发布量子算法开发更灵活更高效",[22],{"type":23,"value":8},"text",{"type":17,"tag":25,"props":26,"children":27},"p",{},[28],{"type":23,"value":29},"量子计算已进入工程化阶段，发展一日千里，已经具备超越经典计算机的潜力，被认为是未来具有颠覆性影响的新型计算模式。要构建一套完整的量子计算机系统，发挥量子计算机的算力，除了量子硬件以外，量子软件和量子算法是必不可缺的组成部分。",{"type":17,"tag":25,"props":31,"children":32},{},[33],{"type":23,"value":34},"Mindspore Quantum是昇思MindSpore社区推出的全新量子经典混合计算框架，能够高效地支持主流的量子算法和经典量子混合算法，不但在量子机器学习、量子化学模拟和量子组合优化等变分量子算法上有着卓越的性能，而且在量子化学模拟规模上也处于领先地位，为量子计算的研究和发展提供了一个高效的开发环境。",{"type":17,"tag":25,"props":36,"children":37},{},[38],{"type":23,"value":39},"MindSpore Quantum的核心优势包括：",{"type":17,"tag":41,"props":42,"children":43},"ul",{},[44,50,55,60,65],{"type":17,"tag":45,"props":46,"children":47},"li",{},[48],{"type":23,"value":49},"**高性能模拟：**推出CPU和GPU架构优化的高性能量子模拟器，支持单/双精度模拟模式切换，满足不同精度需求。",{"type":17,"tag":45,"props":51,"children":52},{},[53],{"type":23,"value":54},"**NISQ算法支持：**高效支持量子机器学习、量子化学模拟和量子组合优化等主流变分量子算法。",{"type":17,"tag":45,"props":56,"children":57},{},[58],{"type":23,"value":59},"**电路编译优化：**内置量子电路编译和量子比特映射算法，确保在真实量子芯片上实现最佳性能。",{"type":17,"tag":45,"props":61,"children":62},{},[63],{"type":23,"value":64},"**简洁易用：**提供丰富且高度集成的量子编程接口，降低开发难度，提升开发效率。",{"type":17,"tag":45,"props":66,"children":67},{},[68],{"type":23,"value":69},"**深度学习集成：**与MindSpore深度结合，让混合量子-经典算法开发更高效。",{"type":17,"tag":25,"props":71,"children":72},{},[73],{"type":23,"value":74},"经过开发者们几个月的精心打磨，MindSpore Quantum 0.10.0 版本终于正式上线！本次版本不仅升级了量子模拟器和线路编译工具，更引入了全新的高维量子系统支持，助力科研创新和实际应用。快来一起看看吧！",{"type":17,"tag":25,"props":76,"children":77},{},[78],{"type":23,"value":79},"新版本的亮点主要包括以下四大方面：",{"type":17,"tag":25,"props":81,"children":82},{},[83],{"type":23,"value":84},"MindSpore Quantum 0.10.0对部分场景下的模拟器性能进行了优化：",{"type":17,"tag":41,"props":86,"children":87},{},[88,93],{"type":17,"tag":45,"props":89,"children":90},{},[91],{"type":23,"value":92},"大幅减少了量子电路首次执行的初始化耗时，使迭代开发和调试过程更加流畅，极大改善了交互式计算体验。",{"type":17,"tag":45,"props":94,"children":95},{},[96],{"type":23,"value":97},"Simulator.sampling()函数在处理大量采样任务时的性能也得到了显著提升，现在采样次数shots的增加将不会再显著增加耗时。",{"type":17,"tag":25,"props":99,"children":100},{},[101],{"type":17,"tag":102,"props":103,"children":105},"img",{"alt":7,"src":104},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/04/03/fbbf0073b59f4ee39a321acfffd3fcf5.png",[],{"type":17,"tag":107,"props":108,"children":110},"h3",{"id":109},"_02-量子线路编译与优化能力提升线路深度减少50",[111,117,119],{"type":17,"tag":112,"props":113,"children":114},"strong",{},[115],{"type":23,"value":116},"# 02",{"type":23,"value":118}," ",{"type":17,"tag":112,"props":120,"children":121},{},[122],{"type":23,"value":123},"量子线路编译与优化能力提升，线路深度减少50%",{"type":17,"tag":25,"props":125,"children":126},{},[127],{"type":23,"value":128},"量子线路优化和编译是量子算法落地的关键步骤之一。更好的线路编译工具，意味着更短的线路深度、更少的门数，从而有效减少量子设备运行时的误差，提升算法成功率。",{"type":17,"tag":25,"props":130,"children":131},{},[132],{"type":23,"value":133},"MindSpore Quantum 0.10.0 新增以下线路编译相关功能：",{"type":17,"tag":41,"props":135,"children":136},{},[137,142,147],{"type":17,"tag":45,"props":138,"children":139},{},[140],{"type":23,"value":141},"U3Fusion功能可以将连续的单量子比特门融合为为单个 U3 门，大幅降低线路复杂度；",{"type":17,"tag":45,"props":143,"children":144},{},[145],{"type":23,"value":146},"通过DecomposeU3功能可以将 U3 门分解为 Z-X-Z-X-Z 旋转序列，实现对指定量子设备的兼容；",{"type":17,"tag":45,"props":148,"children":149},{},[150],{"type":23,"value":151},"新增线路深度计算方法Circuit.depth()，助力开发者快速评估线路复杂度与效率。",{"type":17,"tag":25,"props":153,"children":154},{},[155],{"type":23,"value":156},"示例代码",{"type":17,"tag":158,"props":159,"children":161},"pre",{"code":160},"from mindquantum.core.circuit import Circuit\nfrom mindquantum.algorithm.compiler import U3Fusion, DecomposeU3, compile_circuit\ncirc = Circuit().rx(1.0, 0).ry(0.5, 0).rz(0.7, 0)\nfused_circ = compile_circuit(U3Fusion(), circ)\ndecomposed_circ = compile_circuit(DecomposeU3(), fused_circ)\n",[162],{"type":17,"tag":163,"props":164,"children":165},"code",{"__ignoreMap":7},[166],{"type":23,"value":160},{"type":17,"tag":25,"props":168,"children":169},{},[170],{"type":17,"tag":102,"props":171,"children":173},{"alt":7,"src":172},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/04/03/8cfb1d97f5d6432fa0437fc3c8a8b76f.png",[],{"type":17,"tag":25,"props":175,"children":176},{},[177],{"type":23,"value":178},"通过上述代码，我们可以看到量子线路编译的整个流程：首先将多个连续的单比特门融合为单个U3门，显著减少门数量；然后根据硬件需求，可以将U3门分解为基本旋转门序列，实现对特定量子设备的兼容。这种优化不仅降低了线路深度，还能有效减少量子噪声对计算结果的影响，提高算法在真实量子设备上的成功率。",{"type":17,"tag":107,"props":180,"children":182},{"id":181},"_03",[183],{"type":17,"tag":112,"props":184,"children":185},{},[186],{"type":23,"value":187},"# 03",{"type":17,"tag":107,"props":189,"children":191},{"id":190},"量子模拟器功能增强新增约化密度矩阵计算",[192],{"type":17,"tag":112,"props":193,"children":194},{},[195],{"type":23,"value":196},"量子模拟器功能增强，新增约化密度矩阵计算",{"type":17,"tag":25,"props":198,"children":199},{},[200],{"type":23,"value":201},"量子模拟器是量子算法开发的重要工具，研究人员常常需要分析系统的局部量子态或约化密度矩阵，以深入理解算法表现与纠错效果。",{"type":17,"tag":25,"props":203,"children":204},{},[205],{"type":23,"value":206},"MindSpore Quantum 新版本新增了以下实用功能：",{"type":17,"tag":25,"props":208,"children":209},{},[210],{"type":17,"tag":112,"props":211,"children":212},{},[213],{"type":23,"value":214},"1）特定量子比特子集状态提取 (get_qs_of_qubits)：",{"type":17,"tag":41,"props":216,"children":217},{},[218,223,228],{"type":17,"tag":45,"props":219,"children":220},{},[221],{"type":23,"value":222},"直接关注您感兴趣的量子比特状态",{"type":17,"tag":45,"props":224,"children":225},{},[226],{"type":23,"value":227},"支持以Dirac符号（ket形式）输出，增强可读性（支持混态！）",{"type":17,"tag":45,"props":229,"children":230},{},[231],{"type":23,"value":232},"ket设置为False时，对纯态返回态矢量，对混态返回密度矩阵",{"type":17,"tag":25,"props":234,"children":235},{},[236],{"type":17,"tag":112,"props":237,"children":238},{},[239],{"type":23,"value":240},"2）约化密度矩阵计算 (get_reduced_density_matrix)：",{"type":17,"tag":41,"props":242,"children":243},{},[244,249],{"type":17,"tag":45,"props":245,"children":246},{},[247],{"type":23,"value":248},"通过偏迹运算，获得指定量子比特的约化密度矩阵",{"type":17,"tag":45,"props":250,"children":251},{},[252],{"type":23,"value":253},"在研究量子纠缠、量子信息理论和开放量子系统时不可或缺",{"type":17,"tag":158,"props":255,"children":257},{"code":256},"from mindquantum.simulator import Simulator\nfrom mindquantum.core.circuit import Circuit\n\n# 创建包含量子叠加和量子纠缠的线路\ncircuit = Circuit().h(0).x(1, 0).x(2, 0).h(2)\nsim = Simulator('mqvector', 3)\nsim.apply_circuit(circuit)\n\n# 获取{q0, q2}量子比特子系统的量子态\nstate = sim.get_qs_of_qubits([0, 2], ket=True)\nprint(f\"量子比特0和2的状态:\\n{state}\")\n# 获取约化密度矩阵\nrho = sim.get_reduced_density_matrix([0, 2])\nprint(f\"量子比特0和2的约化密度矩阵:\\n{rho}\")\n",[258],{"type":17,"tag":163,"props":259,"children":260},{"__ignoreMap":7},[261],{"type":23,"value":256},{"type":17,"tag":158,"props":263,"children":265},{"code":264},"量子比特0和2的状态:\n1/2(-√2/2¦00⟩ + -√2/2¦10⟩) +\n1/2(-√2/2¦01⟩ + √2/2¦11⟩) (mixed state)\n量子比特0和2的约化密度矩阵:\n[[ 0.25+0.j  0.  +0.j  0.25+0.j  0.  +0.j]\n [ 0.  +0.j  0.25+0.j  0.  +0.j -0.25+0.j]\n [ 0.25+0.j  0.  +0.j  0.25+0.j  0.  +0.j]\n [ 0.  +0.j -0.25+0.j  0.  +0.j  0.25+0.j]]\n",[266],{"type":17,"tag":163,"props":267,"children":268},{"__ignoreMap":7},[269],{"type":23,"value":264},{"type":17,"tag":25,"props":271,"children":272},{},[273],{"type":23,"value":274},"这个结果表明，量子比特q0和q2构成的子系统处于一个混态，这个混态是由1/2(-√2/2¦00⟩ + -√2/2¦10⟩)和1/2(-√2/2¦01⟩ + √2/2¦11⟩)这两个叠加态组成。",{"type":17,"tag":107,"props":276,"children":278},{"id":277},"_04",[279],{"type":17,"tag":112,"props":280,"children":281},{},[282],{"type":23,"value":283},"# 04",{"type":17,"tag":107,"props":285,"children":287},{"id":286},"全新高维量子态模拟功能上线",[288],{"type":17,"tag":112,"props":289,"children":290},{},[291],{"type":23,"value":286},{"type":17,"tag":25,"props":293,"children":294},{},[295],{"type":23,"value":296},"传统量子计算通常使用二能级量子比特（Qubit）作为基本单元。然而，在量子纠错、量子通信和高维量子模拟等前沿领域中，更高维的量子系统（如三能级的 Qutrit 或更高维的 Qudit）展现出巨大潜力。",{"type":17,"tag":25,"props":298,"children":299},{},[300],{"type":23,"value":301},"MindSpore Quantum 0.10.0 推出了全新的对称编码与解码工具，轻松实现高维量子态与量子比特之间的转换：",{"type":17,"tag":41,"props":303,"children":304},{},[305,310],{"type":17,"tag":45,"props":306,"children":307},{},[308],{"type":23,"value":309},"新增 qudit_symmetric_encoding和 qudit_symmetric_decoding 功能，自动实现 Qudit 与 Qubit 间的高效转换；",{"type":17,"tag":45,"props":311,"children":312},{},[313],{"type":23,"value":314},"新增 qutrit_symmetric_ansatz，自动构造满足对称编码的量子线路，支持ZYZ和U3两种常用基分解。",{"type":17,"tag":25,"props":316,"children":317},{},[318],{"type":23,"value":319},"例如，我们只需简单的几行代码即可实现高维量子态编解码：",{"type":17,"tag":158,"props":321,"children":323},{"code":322},"import numpy as np\nfrom mindquantum.algorithm.library import (\n    qudit_symmetric_encoding,\n    qudit_symmetric_decoding,\n)\n\n# 归一化的qutrit态\nqutrit = np.array([0.5, 0.5, 0.7071])\nqutrit = qutrit / np.linalg.norm(qutrit)\nprint(\"原始qutrit态:\", qutrit)\n\n# 编码为qubit态\nqubit_state = qudit_symmetric_encoding(qutrit)\nprint(\"编码后的qubit态:\", qubit_state)\n\n# 解码回qutrit态\ndecoded_qutrit = qudit_symmetric_decoding(qubit_state)\nprint(\"解码回的qutrit态:\", decoded_qutrit)\n",[324],{"type":17,"tag":163,"props":325,"children":326},{"__ignoreMap":7},[327],{"type":23,"value":322},{"type":17,"tag":25,"props":329,"children":330},{},[331],{"type":17,"tag":102,"props":332,"children":334},{"alt":7,"src":333},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/04/03/ba0cd47d2fd342d784efb272f88f8379.png",[],{"type":17,"tag":107,"props":336,"children":338},{"id":337},"_05-前沿科研应用案例",[339,344,345],{"type":17,"tag":112,"props":340,"children":341},{},[342],{"type":23,"value":343},"# 05",{"type":23,"value":118},{"type":17,"tag":112,"props":346,"children":347},{},[348],{"type":23,"value":349},"前沿科研应用案例：",{"type":17,"tag":25,"props":351,"children":352},{},[353],{"type":23,"value":354},"近期，电子科技大学王子竹团队在论文《Cost of Locally Approximating High-Dimensional Ground States of Contextual Quantum Models》（arxiv:2405.04884）中，利用MindSpore Quantum的高维量子态对称编码与解码工具，成功实现了对高维量子模型基态的局部近似模拟。",{"type":17,"tag":25,"props":356,"children":357},{},[358],{"type":23,"value":359},"该工作聚焦于量子互文性（Contextuality），一种体现量子关联强度的重要特性。研究团队针对具有最近邻和次近邻相互作用的无限一维平移不变哈密顿量模型，探索了其高维基态的局部近似问题。由于这些模型的局部希尔伯特空间维度大于二，传统的量子比特系统难以直接处理。研究人员利用高维量子态对称编码工具，将三维局部希尔伯特空间（qutrit）有效地编码为量子比特（qubit）系统，并构建了保持置换对称性的量子线路，从而实现了高效的量子模拟。",{"type":17,"tag":107,"props":361,"children":363},{"id":362},"_06-快速安装与升级指南",[364,369,370],{"type":17,"tag":112,"props":365,"children":366},{},[367],{"type":23,"value":368},"# 06",{"type":23,"value":118},{"type":17,"tag":112,"props":371,"children":372},{},[373],{"type":23,"value":374},"快速安装与升级指南",{"type":17,"tag":25,"props":376,"children":377},{},[378],{"type":23,"value":379},"首次安装：",{"type":17,"tag":158,"props":381,"children":383},{"code":382},"\npip install mindquantum\n",[384],{"type":17,"tag":163,"props":385,"children":386},{"__ignoreMap":7},[387],{"type":23,"value":382},{"type":17,"tag":25,"props":389,"children":390},{},[391],{"type":23,"value":392},"升级到最新版本：",{"type":17,"tag":158,"props":394,"children":396},{"code":395},"pip install --upgrade mindquantum\n",[397],{"type":17,"tag":163,"props":398,"children":399},{"__ignoreMap":7},[400],{"type":23,"value":395},{"type":17,"tag":107,"props":402,"children":404},{"id":403},"_07",[405],{"type":17,"tag":112,"props":406,"children":407},{},[408],{"type":23,"value":409},"# 07",{"type":17,"tag":107,"props":411,"children":413},{"id":412},"感谢与期待",[414],{"type":17,"tag":112,"props":415,"children":416},{},[417],{"type":23,"value":412},{"type":17,"tag":25,"props":419,"children":420},{},[421],{"type":23,"value":422},"感谢所有为 MindSpore Quantum 0.10.0 版本做出贡献的开发者们！欢迎广大用户下载体验新版本，探索更多全新功能！",{"type":17,"tag":25,"props":424,"children":425},{},[426],{"type":23,"value":427},"如果您有任何建议与反馈，欢迎随时在 Gitee Issue 上告诉我们，助力 MindSpore Quantum 更好地成长！",{"type":17,"tag":25,"props":429,"children":430},{},[431],{"type":17,"tag":102,"props":432,"children":434},{"alt":7,"src":433},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/04/03/82697b12d1a74783b8f7fe6db008aab1.png",[],{"type":17,"tag":25,"props":436,"children":437},{},[438],{"type":17,"tag":112,"props":439,"children":440},{},[441,443,451],{"type":23,"value":442},"参",{"type":17,"tag":112,"props":444,"children":445},{},[446],{"type":17,"tag":112,"props":447,"children":448},{},[449],{"type":23,"value":450},"考",{"type":23,"value":452},"链接",{"type":17,"tag":25,"props":454,"children":455},{},[456,458],{"type":23,"value":457},"[1] ",{"type":17,"tag":459,"props":460,"children":464},"a",{"href":461,"rel":462},"https://www.mindspore.cn/mindquantum/docs/zh-CN/r0.10/mindquantum.simulator.html",[463],"nofollow",[465],{"type":23,"value":461},{"type":17,"tag":25,"props":467,"children":468},{},[469,471],{"type":23,"value":470},"[2] ",{"type":17,"tag":459,"props":472,"children":475},{"href":473,"rel":474},"https://www.mindspore.cn/mindquantum/docs/zh-CN/master/algorithm/mindquantum.algorithm.compiler.html",[463],[476],{"type":23,"value":473},{"type":17,"tag":25,"props":478,"children":479},{},[480,482],{"type":23,"value":481},"[3] ",{"type":17,"tag":459,"props":483,"children":486},{"href":484,"rel":485},"https://www.mindspore.cn/mindquantum/docs/zh-CN/master/algorithm/mindquantum.algorithm.library.html",[463],[487],{"type":23,"value":484},{"type":17,"tag":25,"props":489,"children":490},{},[491],{"type":17,"tag":112,"props":492,"children":493},{},[494],{"type":23,"value":495},"往期回顾",{"type":17,"tag":25,"props":497,"children":498},{},[499],{"type":17,"tag":459,"props":500,"children":503},{"href":501,"rel":502},"https://mp.weixin.qq.com/s?__biz=MzkxMTM2MjMzNg==&mid=2247611416&idx=2&sn=5a526c23a5d2378a080efc85fe10a18e&scene=21#wechat_redirect",[463],[504],{"type":23,"value":505},"MindSpore Quantum 0.9 | 新增密度矩阵和噪声模拟后端！",{"type":17,"tag":25,"props":507,"children":508},{},[509],{"type":17,"tag":459,"props":510,"children":513},{"href":511,"rel":512},"https://mp.weixin.qq.com/s?__biz=MzkxMTM2MjMzNg==&mid=2247593245&idx=1&sn=e0987af0a641daee523300cb74adafa1&scene=21#wechat_redirect",[463],[514],{"type":23,"value":515},"MindSpore Quantum 0.8 | 量子线路模拟器全新升级，新增GPU模拟器，性能倍级提升！",{"type":17,"tag":25,"props":517,"children":518},{},[519],{"type":17,"tag":459,"props":520,"children":523},{"href":521,"rel":522},"https://mp.weixin.qq.com/s?__biz=MzkxMTM2MjMzNg==&mid=2247583191&idx=1&sn=9e76c7328e7644ab4c694fffd52fc125&scene=21#wechat_redirect",[463],[524],{"type":23,"value":525},"MindSpore Quantum 0.7 | 多平台可安装，灵活易用，只为给开发者带来更好的体验！",{"title":7,"searchDepth":527,"depth":527,"links":528},4,[529,532,533,534,535,536,538,540,541],{"id":109,"depth":530,"text":531},3,"# 02 量子线路编译与优化能力提升，线路深度减少50%",{"id":181,"depth":530,"text":187},{"id":190,"depth":530,"text":196},{"id":277,"depth":530,"text":283},{"id":286,"depth":530,"text":286},{"id":337,"depth":530,"text":537},"# 05 前沿科研应用案例：",{"id":362,"depth":530,"text":539},"# 06 快速安装与升级指南",{"id":403,"depth":530,"text":409},{"id":412,"depth":530,"text":412},"markdown","content:news:zh:3673.md","content","news/zh/3673.md","news/zh/3673","md",1776506087171]