@holoscript/core 8.0.7 → 8.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/holoscript.cjs +5 -1
- package/dist/GLTFPipeline-L76YTXKA.js +15 -0
- package/dist/GLTFPipeline-ZWJN7GI6.cjs +36 -0
- package/dist/HoloCompositionParser-K76KTEEE.js +12 -0
- package/dist/HoloCompositionParser-UZH6Y4HO.cjs +45 -0
- package/dist/HoloScriptCodeParser-2D4ERFUZ.js +6 -0
- package/dist/HoloScriptCodeParser-UDRLDA7I.cjs +23 -0
- package/dist/HoloScriptPlusParser-FTMCGWXD.js +13 -0
- package/dist/HoloScriptPlusParser-LQR5GIKF.cjs +30 -0
- package/dist/HoloScriptRuntime-UTRLJI5L.js +12 -0
- package/dist/HoloScriptRuntime-YBYXJHJN.cjs +21 -0
- package/dist/SceneIRCompiler-63KA3M2F.js +17 -0
- package/dist/SceneIRCompiler-KWUFHZ4O.cjs +42 -0
- package/dist/{USDZExporter-AUHZODOF.cjs → USDZExporter-ML4UMIGC.cjs} +3 -3
- package/dist/{USDZExporter-GXB4AUSG.js → USDZExporter-ZFKLQ76G.js} +3 -3
- package/dist/agents/index.cjs +1 -1
- package/dist/agents/index.js +1 -1
- package/dist/audit/AuditLogger.d.ts +106 -0
- package/dist/audit/AuditQueryBuilder.d.ts +79 -0
- package/dist/audit/ComplianceReporter.d.ts +90 -0
- package/dist/audit/index.d.ts +13 -0
- package/dist/{chunk-FGMDMJM7.js → chunk-2BYAUHBO.js} +3 -3
- package/dist/{chunk-EDPYCLRC.cjs → chunk-2E6PP5UE.cjs} +83 -59
- package/dist/{chunk-GASCWJK5.js → chunk-2EGGAZT3.js} +65 -287
- package/dist/{chunk-SIEXCILW.js → chunk-2I3XAGMF.js} +3 -3
- package/dist/{chunk-OS533P33.cjs → chunk-2KKOYZYI.cjs} +1074 -1655
- package/dist/chunk-2MQKNDNH.js +51 -0
- package/dist/{chunk-7DMMMBCY.cjs → chunk-2X3IPCBK.cjs} +10 -10
- package/dist/chunk-2ZOTBO25.cjs +202 -0
- package/dist/chunk-356N4NPM.cjs +152 -0
- package/dist/{chunk-X3GJPRVK.cjs → chunk-36NPLOI4.cjs} +92 -81
- package/dist/{chunk-SLU6UPJI.cjs → chunk-37HHY7RH.cjs} +5 -5
- package/dist/{chunk-YDPEHCCI.cjs → chunk-3CDDRUER.cjs} +3 -118
- package/dist/chunk-3F7ZZWIN.js +1651 -0
- package/dist/chunk-3ILD7TKP.cjs +187 -0
- package/dist/{chunk-X27QRG4C.cjs → chunk-3IUHTGDD.cjs} +153 -41
- package/dist/{chunk-PXNZ6TME.js → chunk-4376VHNJ.js} +60 -36
- package/dist/{chunk-YKGPCZEE.cjs → chunk-4FIBOJW6.cjs} +10 -10
- package/dist/chunk-4Q7RKQQI.cjs +14195 -0
- package/dist/{chunk-YCM6QQRT.cjs → chunk-566ZB4LZ.cjs} +180 -8
- package/dist/{chunk-2Y3V22SG.js → chunk-5CURIYGT.js} +3 -3
- package/dist/{chunk-QBWNJXNR.js → chunk-5FYMCVBY.js} +5 -5
- package/dist/{chunk-ZA34AN3R.js → chunk-5LVFTGKH.js} +841 -12
- package/dist/chunk-63AUAIL6.js +48 -0
- package/dist/chunk-655FATJU.js +110 -0
- package/dist/{chunk-TQ377OLB.cjs → chunk-65S62L4D.cjs} +28 -22
- package/dist/chunk-6NTAZN5Z.cjs +502 -0
- package/dist/chunk-6TRX6AR2.js +9376 -0
- package/dist/chunk-6ZCCLKS2.cjs +51 -0
- package/dist/{chunk-MDR235RZ.js → chunk-734OB5SK.js} +721 -8
- package/dist/{chunk-Q2Q34NF3.js → chunk-77QI552M.js} +6 -6
- package/dist/{chunk-WKX5AMOY.js → chunk-7I74JWPW.js} +3 -3
- package/dist/{chunk-5FSKKMR7.cjs → chunk-7IDJDMPU.cjs} +232 -4
- package/dist/chunk-7VBKRGIZ.cjs +847 -0
- package/dist/{chunk-KCPHASCO.js → chunk-AATYYLYK.js} +5 -5
- package/dist/{chunk-WFKVS2K4.cjs → chunk-AUZRKIHQ.cjs} +1101 -55
- package/dist/{chunk-DTGBOSEM.cjs → chunk-AWXFEAQL.cjs} +12 -12
- package/dist/{chunk-THCK6ECW.js → chunk-B3CWTCK2.js} +231 -3
- package/dist/chunk-BCP4E7MD.cjs +997 -0
- package/dist/chunk-BG7RPYJP.js +91 -0
- package/dist/{chunk-VF257YKO.js → chunk-BP4KTMLY.js} +117 -5
- package/dist/{chunk-YN6IETRZ.js → chunk-BQJ3YBF3.js} +6424 -987
- package/dist/{chunk-KOUAQL2B.cjs → chunk-CANAL6CT.cjs} +1569 -168
- package/dist/{chunk-FDSGHPAK.js → chunk-CBSDJF3B.js} +3 -3
- package/dist/{chunk-FEWUHQNM.cjs → chunk-CFVK26P4.cjs} +4 -4
- package/dist/{chunk-M7K4LE66.cjs → chunk-CI33NINL.cjs} +4 -4
- package/dist/{chunk-2OWDB4FB.js → chunk-CKV5NYAE.js} +6 -6
- package/dist/{chunk-LPS5AMQD.cjs → chunk-CM4NHXVO.cjs} +24 -24
- package/dist/chunk-D3HSRXYB.js +115 -0
- package/dist/{chunk-FNHJRI32.js → chunk-DBH3D2MU.js} +1561 -160
- package/dist/{chunk-GW3LKD5C.js → chunk-DJNH4HFW.js} +3 -3
- package/dist/{chunk-2GCNOI2U.cjs → chunk-DN6F4DHH.cjs} +9 -3
- package/dist/chunk-DQRJ5RJG.js +432 -0
- package/dist/{chunk-C7ZBSV2Q.js → chunk-DUG3OQAS.js} +106 -43
- package/dist/chunk-ECUYJOJ2.cjs +199 -0
- package/dist/chunk-EEMTCAK7.js +182 -0
- package/dist/{chunk-3SKLAUDD.cjs → chunk-EI3J6LTW.cjs} +359 -581
- package/dist/{chunk-SSSN7VAM.js → chunk-EM2OGPYE.js} +4 -4
- package/dist/{chunk-56VOWURB.cjs → chunk-ENZCIQZC.cjs} +522 -453
- package/dist/chunk-ESBXUYOC.cjs +836 -0
- package/dist/{chunk-L5U4W6JC.js → chunk-ESSEF6U2.js} +4 -4
- package/dist/chunk-ET3AN4W3.js +824 -0
- package/dist/chunk-EXKSFGSX.cjs +14 -14
- package/dist/{chunk-I76GIKN7.cjs → chunk-F3YT6GUF.cjs} +17 -17
- package/dist/{chunk-WRWEX5ZF.js → chunk-F75DZBBI.js} +3 -3
- package/dist/{chunk-4JGRWHZJ.js → chunk-FG6PYGIZ.js} +12 -6
- package/dist/chunk-FGGJQRLZ.js +14 -14
- package/dist/{chunk-SXOSDZD6.js → chunk-FWCHPCD4.js} +128 -10
- package/dist/{chunk-XW6IXEQH.cjs → chunk-G35CAQ7I.cjs} +5 -5
- package/dist/{chunk-7VMGP2FW.js → chunk-G6KACNMO.js} +132 -188
- package/dist/{chunk-FJPADH77.cjs → chunk-GAWJJAGT.cjs} +6 -6
- package/dist/chunk-GGR7QUKK.cjs +4724 -0
- package/dist/chunk-GIBF4BHH.js +14098 -0
- package/dist/{chunk-AWB7QYY6.cjs → chunk-GILYQ5VH.cjs} +6 -6
- package/dist/{chunk-FWVYAMNW.cjs → chunk-GKFCHGCM.cjs} +4 -4
- package/dist/{chunk-Y3ZFVUUU.js → chunk-GLEJ2TLS.js} +3 -3
- package/dist/{chunk-3GWWJT7L.js → chunk-GP3OKSKT.js} +13 -13
- package/dist/chunk-GTIPOEHN.js +196 -0
- package/dist/{chunk-LMJ5EBV7.cjs → chunk-GZPUA2TL.cjs} +16 -15
- package/dist/{chunk-IELX2OKI.js → chunk-H4LJ4HEA.js} +3 -115
- package/dist/{chunk-ACVWFGBI.cjs → chunk-HCX4SMFK.cjs} +3 -3
- package/dist/{chunk-HYNTS5CP.js → chunk-HHRZ6STP.js} +24 -2
- package/dist/chunk-HIDEIEFG.js +48 -0
- package/dist/{chunk-W6RW64BB.cjs → chunk-HSWBIDZM.cjs} +228 -5
- package/dist/{chunk-GSOUNWEL.js → chunk-HVX7QQYK.js} +1035 -1616
- package/dist/{chunk-TRCGG42I.cjs → chunk-IFW5IW4L.cjs} +6502 -1019
- package/dist/{chunk-F5LKJ6F5.cjs → chunk-IJU6AS67.cjs} +32 -28
- package/dist/{chunk-TVANHNJ7.js → chunk-IK6Z2HNC.js} +173 -3
- package/dist/{chunk-QGMUTVVH.cjs → chunk-IS7NTKY5.cjs} +20 -20
- package/dist/{chunk-YFVQWSNJ.js → chunk-IXWGYWH6.js} +3 -3
- package/dist/chunk-J2DAS2PL.js +148 -0
- package/dist/chunk-JBQXZIWB.js +148 -0
- package/dist/chunk-JBYBMBMW.js +261 -0
- package/dist/{chunk-LWUOUCYL.js → chunk-JEJ7TT54.js} +5 -5
- package/dist/{chunk-DUCB6LGL.js → chunk-JOTCTHN5.js} +211 -5
- package/dist/{chunk-47RUFYKR.js → chunk-K56UVEXV.js} +3 -3
- package/dist/{chunk-XSFNHP2E.js → chunk-KB26H447.js} +3 -3
- package/dist/{chunk-3NGDZZR4.js → chunk-KEYG7HGY.js} +430 -37
- package/dist/{chunk-DY72BMU5.js → chunk-KFVNCW4Q.js} +4 -4
- package/dist/chunk-KPGC7SK2.js +192 -0
- package/dist/chunk-KROXXBK5.cjs +53 -0
- package/dist/{chunk-ZPZAVHXL.cjs → chunk-LB3ZZMKT.cjs} +137 -19
- package/dist/chunk-LDYZWNJW.cjs +1654 -0
- package/dist/{chunk-ULMSSHCJ.cjs → chunk-LMB555QB.cjs} +405 -38
- package/dist/{chunk-CBJY23VL.js → chunk-MD4IVS42.js} +3 -3
- package/dist/{chunk-VMLKSV26.js → chunk-MDDWEBCX.js} +226 -3
- package/dist/chunk-MUWH4QK5.cjs +94 -0
- package/dist/{chunk-T6W3Z3SH.cjs → chunk-N2ILK7BF.cjs} +4 -4
- package/dist/{chunk-6EX3I5P4.cjs → chunk-N74QRJGP.cjs} +6 -6
- package/dist/chunk-NFFHLX37.cjs +132 -0
- package/dist/chunk-NJSYWX7H.js +190 -0
- package/dist/{chunk-SH5PPVK7.cjs → chunk-NQN5LFN4.cjs} +165 -221
- package/dist/chunk-NTQRFOPP.cjs +56 -0
- package/dist/{chunk-YFWRJW4B.js → chunk-NWMJPTVL.js} +51 -55
- package/dist/{chunk-63ZGNR2T.cjs → chunk-OC6GV5QH.cjs} +42 -42
- package/dist/{chunk-7E7GCQCK.js → chunk-OG3MBHM3.js} +9 -3
- package/dist/chunk-OMNHTCS4.cjs +264 -0
- package/dist/chunk-OQXB6NNC.cjs +117 -0
- package/dist/{chunk-Y57W2CT5.cjs → chunk-OV46CCA2.cjs} +51 -55
- package/dist/{chunk-6PRZIHGL.cjs → chunk-OV6HHKLE.cjs} +21 -266
- package/dist/{chunk-C37BHB7N.cjs → chunk-P26YYPOO.cjs} +5 -5
- package/dist/{chunk-2BZHWUSR.cjs → chunk-P7JEKJTZ.cjs} +16 -16
- package/dist/{chunk-NGBXXZLL.cjs → chunk-PDXX5UI4.cjs} +45 -45
- package/dist/{chunk-FHQFPYV4.js → chunk-PJFTTSKE.js} +8 -7
- package/dist/{chunk-GVFJ6T4S.cjs → chunk-PVODJEJ7.cjs} +721 -8
- package/dist/{chunk-ZZ7RO2UQ.js → chunk-Q265VZJ4.js} +3 -3
- package/dist/{chunk-E7JP3BS3.cjs → chunk-Q47JEE2C.cjs} +4 -4
- package/dist/chunk-QBY7LRN2.js +281 -0
- package/dist/{chunk-Z6PMDS4G.js → chunk-QDQWKSU3.js} +1090 -53
- package/dist/{chunk-GH6C2QGW.cjs → chunk-QEDMOGF3.cjs} +857 -16
- package/dist/{chunk-5WUNN6ZN.cjs → chunk-QHSAVOOL.cjs} +24 -2
- package/dist/chunk-QJNCDVYM.cjs +137 -0
- package/dist/chunk-QM7FJB5W.js +4717 -0
- package/dist/chunk-QQFB4RT2.cjs +448 -0
- package/dist/chunk-QSYBHQAD.cjs +196 -0
- package/dist/{chunk-UGXHYIWT.cjs → chunk-QUJ3ZB55.cjs} +28 -28
- package/dist/{chunk-2YSNA2F2.cjs → chunk-QVJMDVYZ.cjs} +5 -5
- package/dist/chunk-RAJMAX6D.js +131 -0
- package/dist/{chunk-VVKVQZI6.js → chunk-RAN3ECAS.js} +3 -3
- package/dist/chunk-RKGUZBOC.js +79 -0
- package/dist/{chunk-HLFDZ35S.cjs → chunk-RRQIAJLQ.cjs} +8 -8
- package/dist/{chunk-PABONWKI.js → chunk-RXQNRZ5F.js} +3 -3
- package/dist/{chunk-7ZHYEITD.cjs → chunk-S4O7CFHQ.cjs} +10 -11
- package/dist/chunk-SE7ANBGN.js +128 -0
- package/dist/{chunk-X2AVEAZM.cjs → chunk-SJIRCTIS.cjs} +176 -2
- package/dist/{chunk-WXQ57LAO.js → chunk-SQXAZHDG.js} +4 -4
- package/dist/chunk-SR73L5ZP.cjs +84 -0
- package/dist/{chunk-OABEO6HH.js → chunk-SZOLTWWD.js} +2349 -214
- package/dist/{chunk-5JEU52DW.js → chunk-TPZ3BN2D.js} +3 -3
- package/dist/{chunk-QFU53KRH.js → chunk-TSTFYGGX.js} +4 -5
- package/dist/{chunk-EBS32AJI.cjs → chunk-TZCFKZ6Z.cjs} +5 -5
- package/dist/chunk-UCVZXQ63.js +724 -0
- package/dist/chunk-UGQ3QNV6.js +992 -0
- package/dist/chunk-UNMVGZVW.js +142 -0
- package/dist/{chunk-TEVX443G.js → chunk-UTUD6GJI.js} +178 -6
- package/dist/chunk-UXBYA7DV.cjs +155 -0
- package/dist/chunk-V6GXFSK7.cjs +443 -0
- package/dist/chunk-VHORVGCG.cjs +761 -0
- package/dist/{chunk-B4EKV6HQ.js → chunk-VKCTYLDN.js} +500 -442
- package/dist/{chunk-O3MGZDCT.cjs → chunk-VTEXJOSD.cjs} +63 -63
- package/dist/chunk-VVAAZITA.cjs +287 -0
- package/dist/{chunk-V7AKE5VT.cjs → chunk-W2GA3EQB.cjs} +435 -42
- package/dist/chunk-W4GABFCR.js +37 -0
- package/dist/chunk-WKEK4NCA.js +490 -0
- package/dist/{chunk-5A4TCHOC.cjs → chunk-WNYXT4TE.cjs} +4 -4
- package/dist/{chunk-S762UEV5.js → chunk-WTH23ISI.js} +6 -6
- package/dist/{chunk-BTKZGHAV.js → chunk-WWNCM473.js} +10 -6
- package/dist/{chunk-7X5PNIQJ.js → chunk-X3YFRH6K.js} +27 -25
- package/dist/{chunk-4YNYPHH3.cjs → chunk-X75H75UY.cjs} +2351 -213
- package/dist/{chunk-LYJJI7ZK.cjs → chunk-XCUDDFKC.cjs} +216 -9
- package/dist/chunk-YAO4HPJL.cjs +120 -0
- package/dist/chunk-YKY2JBER.cjs +9443 -0
- package/dist/chunk-YP5CHEYU.cjs +154 -0
- package/dist/{chunk-WRNEH5MO.js → chunk-YW3I2FQL.js} +18 -7
- package/dist/{chunk-BRNUPDHJ.js → chunk-Z557DVYN.js} +386 -19
- package/dist/{chunk-VSACG2AR.js → chunk-Z6LZUYZF.js} +21 -264
- package/dist/chunk-ZHPMP447.cjs +43 -0
- package/dist/{chunk-LODTHGST.cjs → chunk-ZK7KX5CD.cjs} +133 -70
- package/dist/{chunk-CCPSNT6B.cjs → chunk-ZRPALBQB.cjs} +5 -5
- package/dist/chunk-ZVFHPMC5.js +824 -0
- package/dist/chunk-ZVQMKUGJ.js +443 -0
- package/dist/cli/holoscript-runner.cjs +86 -48
- package/dist/cli/holoscript-runner.js +54 -16
- package/dist/codebase/index.cjs +1 -1
- package/dist/codebase/index.js +1 -1
- package/dist/compiler/agent-inference.cjs +11 -11
- package/dist/compiler/agent-inference.js +9 -6
- package/dist/compiler/android-xr.cjs +13 -12
- package/dist/compiler/android-xr.js +11 -10
- package/dist/compiler/android.cjs +12 -12
- package/dist/compiler/android.js +10 -10
- package/dist/compiler/business-quest.cjs +10 -10
- package/dist/compiler/business-quest.js +2 -2
- package/dist/compiler/coco.cjs +1 -1
- package/dist/compiler/coco.js +1 -1
- package/dist/compiler/context.cjs +9 -9
- package/dist/compiler/context.js +6 -6
- package/dist/compiler/daimon-seed.cjs +36 -0
- package/dist/compiler/daimon-seed.js +12 -0
- package/dist/compiler/domain-block-utils.cjs +205 -156
- package/dist/compiler/domain-block-utils.js +8 -7
- package/dist/compiler/dtdl.cjs +10 -10
- package/dist/compiler/dtdl.js +7 -7
- package/dist/compiler/gltf-pipeline.cjs +9 -9
- package/dist/compiler/gltf-pipeline.js +2 -2
- package/dist/compiler/godot.cjs +10 -9
- package/dist/compiler/godot.js +9 -8
- package/dist/compiler/incremental.cjs +11 -11
- package/dist/compiler/incremental.js +6 -6
- package/dist/compiler/index.cjs +2585 -3273
- package/dist/compiler/index.d.ts +149 -35
- package/dist/compiler/index.js +2197 -3102
- package/dist/compiler/ios.cjs +11 -11
- package/dist/compiler/ios.js +9 -9
- package/dist/compiler/llm-provider-capabilities.cjs +9 -9
- package/dist/compiler/llm-provider-capabilities.js +6 -6
- package/dist/compiler/nodetoy.cjs +1 -1
- package/dist/compiler/nodetoy.js +1 -1
- package/dist/compiler/openxr.cjs +11 -10
- package/dist/compiler/openxr.js +10 -9
- package/dist/compiler/remotion.cjs +1 -1
- package/dist/compiler/remotion.js +1 -1
- package/dist/compiler/reproducibility.cjs +1 -1
- package/dist/compiler/reproducibility.js +1 -1
- package/dist/compiler/sdf.cjs +11 -10
- package/dist/compiler/sdf.js +9 -8
- package/dist/compiler/semantic-scene.cjs +7 -7
- package/dist/compiler/semantic-scene.js +2 -2
- package/dist/compiler/state.cjs +9 -9
- package/dist/compiler/state.js +7 -7
- package/dist/compiler/trait-composition.cjs +11 -11
- package/dist/compiler/trait-composition.js +7 -7
- package/dist/compiler/traits/ProvenanceSemiring.d.ts +167 -0
- package/dist/compiler/traits/Semiring.d.ts +26 -0
- package/dist/compiler/unity.cjs +11 -10
- package/dist/compiler/unity.js +10 -9
- package/dist/compiler/unreal.cjs +12 -11
- package/dist/compiler/unreal.js +10 -9
- package/dist/compiler/urdf.cjs +18 -17
- package/dist/compiler/urdf.js +9 -8
- package/dist/compiler/usd-physics.cjs +11 -10
- package/dist/compiler/usd-physics.js +8 -7
- package/dist/compiler/visionos.cjs +11 -10
- package/dist/compiler/visionos.js +10 -9
- package/dist/compiler/vrchat.cjs +11 -10
- package/dist/compiler/vrchat.js +9 -8
- package/dist/compiler/wasm.cjs +14 -13
- package/dist/compiler/wasm.js +9 -8
- package/dist/compiler/webgpu.cjs +10 -9
- package/dist/compiler/webgpu.js +9 -8
- package/dist/constants.cjs +398 -0
- package/dist/constants.js +9 -0
- package/dist/coordinators/index.cjs +4 -1
- package/dist/coordinators/index.js +4 -1
- package/dist/debugger.cjs +11 -9
- package/dist/debugger.js +9 -7
- package/dist/{dist-ACXG6IH5.cjs → dist-GRMOP2UL.cjs} +341 -65
- package/dist/{dist-VD4L6V7Q.js → dist-ZBUKU2JG.js} +333 -63
- package/dist/entries/interop.cjs +23 -23
- package/dist/entries/interop.js +3 -3
- package/dist/entries/scripting.cjs +12 -11
- package/dist/entries/scripting.js +8 -7
- package/dist/evolution/index.cjs +66 -0
- package/dist/evolution/index.d.ts +162 -0
- package/dist/evolution/index.js +17 -0
- package/dist/hololand/index.cjs +41 -37
- package/dist/hololand/index.js +3 -3
- package/dist/index.cjs +12394 -3224
- package/dist/index.d.ts +260 -18
- package/dist/index.js +10755 -2182
- package/dist/keyword-registry/PluginKeywordRegistry.d.ts +138 -0
- package/dist/keyword-registry/index.cjs +29 -0
- package/dist/keyword-registry/index.d.ts +1 -0
- package/dist/keyword-registry/index.js +4 -0
- package/dist/math/tropical-spmv.cjs +11 -11
- package/dist/math/tropical-spmv.d.ts +1 -0
- package/dist/math/tropical-spmv.js +2 -2
- package/dist/math/tropicalSpmv.d.ts +43 -0
- package/dist/math/vec3.cjs +1 -1
- package/dist/math/vec3.js +1 -1
- package/dist/matter/StagedMatter.d.ts +82 -0
- package/dist/matter/index.cjs +17 -0
- package/dist/matter/index.d.ts +1 -0
- package/dist/matter/index.js +4 -0
- package/dist/{ml-dsa-Z7JDKW4L.js → ml-dsa-J6VKVT4K.js} +3 -3
- package/dist/{ml-dsa-FSKBTE3W.cjs → ml-dsa-MTIK4ZUQ.cjs} +23 -23
- package/dist/paper-0c-spike/index.cjs +1 -1
- package/dist/paper-0c-spike/index.js +1 -1
- package/dist/parameter-envelope/ParameterEnvelope.d.ts +128 -0
- package/dist/parameter-envelope/index.cjs +17 -0
- package/dist/parameter-envelope/index.d.ts +2 -0
- package/dist/parameter-envelope/index.js +4 -0
- package/dist/parser/HoloCompositionTypes.d.ts +2013 -0
- package/dist/parser/PipelineParser.d.ts +162 -0
- package/dist/parser.cjs +36 -20
- package/dist/parser.js +13 -9
- package/dist/plugin-manifest/ManifestAutoLoader.d.ts +35 -0
- package/dist/plugin-manifest/PluginManifest.d.ts +156 -0
- package/dist/plugin-manifest/index.cjs +25 -0
- package/dist/plugin-manifest/index.d.ts +2 -0
- package/dist/plugin-manifest/index.js +4 -0
- package/dist/plugin-solver-contract/PluginSolverContract.d.ts +288 -0
- package/dist/plugin-solver-contract/index.cjs +41 -0
- package/dist/plugin-solver-contract/index.d.ts +1 -0
- package/dist/plugin-solver-contract/index.js +4 -0
- package/dist/policy/ContentPolicyGate.d.ts +51 -0
- package/dist/policy/PolicyPack.d.ts +120 -0
- package/dist/policy/blocklist.d.ts +32 -0
- package/dist/policy/defaults.d.ts +44 -0
- package/dist/policy/index.cjs +106 -0
- package/dist/policy/index.d.ts +17 -0
- package/dist/policy/index.js +5 -0
- package/dist/policy/jsonLogic.d.ts +31 -0
- package/dist/policy/types.d.ts +174 -0
- package/dist/proof-composition/ProofCompositionLaw.d.ts +93 -0
- package/dist/proof-composition/index.cjs +25 -0
- package/dist/proof-composition/index.d.ts +1 -0
- package/dist/proof-composition/index.js +4 -0
- package/dist/receipts/hash-policy.d.ts +85 -0
- package/dist/reconstruction/index.cjs +75 -47
- package/dist/reconstruction/index.js +5 -5
- package/dist/runtime/plugin-trait-registrar.d.ts +36 -0
- package/dist/runtime.cjs +81 -79
- package/dist/runtime.js +9 -7
- package/dist/scene-presets-EDKYZ5GW.js +4 -0
- package/dist/scene-presets-NCW2CFRS.cjs +17 -0
- package/dist/self-improvement/index.cjs +1 -1
- package/dist/self-improvement/index.js +1 -1
- package/dist/{src-PT2FERDV.cjs → src-G3D7ZATQ.cjs} +545 -21
- package/dist/{src-J6CM4AUR.js → src-UXYA7HM6.js} +539 -16
- package/dist/storage/index.cjs +10 -10
- package/dist/storage/index.js +3 -3
- package/dist/testing.cjs +1 -1
- package/dist/testing.js +1 -1
- package/dist/tools/index.cjs +3631 -0
- package/dist/tools/index.js +3581 -0
- package/dist/traitDocs/traitDocs.cjs +9 -9
- package/dist/traitDocs/traitDocs.d.ts +1 -0
- package/dist/traitDocs/traitDocs.js +3 -3
- package/dist/traits/ControlLoopTrait.d.ts +154 -0
- package/dist/traits/KinematicChainTrait.d.ts +116 -0
- package/dist/traits/SensorSamplingTrait.d.ts +154 -0
- package/dist/traits/TraitTypes.d.ts +270 -0
- package/dist/traits/TransactionTrait.d.ts +121 -0
- package/dist/traits/botanical-lotus.cjs +54 -50
- package/dist/traits/botanical-lotus.js +2 -5
- package/dist/traits/control-loop.cjs +21 -0
- package/dist/traits/control-loop.d.ts +1 -0
- package/dist/traits/control-loop.js +4 -0
- package/dist/traits/engines/cloth-verlet.d.ts +65 -0
- package/dist/traits/engines/index.cjs +19 -19
- package/dist/traits/engines/index.d.ts +15 -275
- package/dist/traits/engines/index.js +3 -3
- package/dist/traits/engines/motion-data-schema.d.ts +119 -0
- package/dist/traits/engines/motion-matching.d.ts +102 -0
- package/dist/traits/engines/noise.d.ts +25 -0
- package/dist/traits/engines/onnx-adapter.d.ts +173 -0
- package/dist/traits/engines/onnx-motion-matching.d.ts +163 -0
- package/dist/traits/engines/pfnn-network.d.ts +92 -0
- package/dist/traits/engines/synthetic-walk-cycle.d.ts +38 -0
- package/dist/traits/engines/tensor-ops.d.ts +15 -0
- package/dist/traits/index.cjs +2789 -1259
- package/dist/traits/index.d.ts +35 -0
- package/dist/traits/index.js +1692 -411
- package/dist/traits/kinematic-chain.cjs +25 -0
- package/dist/traits/kinematic-chain.d.ts +1 -0
- package/dist/traits/kinematic-chain.js +4 -0
- package/dist/traits/sensor-sampling.cjs +33 -0
- package/dist/traits/sensor-sampling.d.ts +1 -0
- package/dist/traits/sensor-sampling.js +4 -0
- package/dist/traits/simulation-solver-factory.cjs +1 -1
- package/dist/traits/simulation-solver-factory.js +1 -1
- package/dist/traits/transaction.cjs +29 -0
- package/dist/traits/transaction.d.ts +1 -0
- package/dist/traits/transaction.js +4 -0
- package/dist/traits/webcam-gaze.cjs +1 -1
- package/dist/traits/webcam-gaze.js +1 -1
- package/dist/type-checker.cjs +7 -6
- package/dist/type-checker.js +5 -4
- package/dist/types/AdvancedTypeSystem.d.ts +489 -0
- package/dist/types/HoloScriptPlus.d.ts +810 -0
- package/dist/types/base.d.ts +248 -0
- package/dist/types.d.ts +799 -0
- package/dist/world/index.cjs +3 -4
- package/dist/world/index.js +3 -4
- package/dist/world-model/index.cjs +1 -1
- package/dist/world-model/index.js +1 -1
- package/dist/wot/index.cjs +1 -1
- package/dist/wot/index.js +1 -1
- package/package.json +80 -13
- package/dist/GLTFPipeline-3EJLL3TS.cjs +0 -38
- package/dist/GLTFPipeline-3OWJV2VK.js +0 -17
- package/dist/HoloScriptPlusParser-ADWRY5OS.cjs +0 -698
- package/dist/HoloScriptPlusParser-JLJDXHSC.js +0 -693
- package/dist/HoloScriptPlusParser-QCGFPWIL.cjs +0 -27
- package/dist/HoloScriptPlusParser-WENAFEFV.js +0 -10
- package/dist/HoloScriptRuntime-GGRVEU4T.cjs +0 -19
- package/dist/HoloScriptRuntime-GJK6VJPH.js +0 -10
- package/dist/chunk-22Q5A6RV.js +0 -979
- package/dist/chunk-4C57PR42.js +0 -468
- package/dist/chunk-4W5G5QVL.cjs +0 -847
- package/dist/chunk-5ET6L4NS.js +0 -487
- package/dist/chunk-C4GSLCHE.cjs +0 -7153
- package/dist/chunk-F2G6CWFT.js +0 -7089
- package/dist/chunk-G6PNEASF.cjs +0 -814
- package/dist/chunk-GTA4Q3A3.js +0 -1491
- package/dist/chunk-HCCQLAA4.cjs +0 -74
- package/dist/chunk-HFSVMKM3.cjs +0 -72
- package/dist/chunk-KAIVDEIG.cjs +0 -4539
- package/dist/chunk-KQU64CIX.cjs +0 -1508
- package/dist/chunk-MSYSQ2AJ.js +0 -4533
- package/dist/chunk-NHJLP37F.js +0 -70
- package/dist/chunk-NHYRRAGI.cjs +0 -490
- package/dist/chunk-OIQYIIO3.cjs +0 -473
- package/dist/chunk-OL46QLBJ.js +0 -61
- package/dist/chunk-SKZPC5AG.cjs +0 -984
- package/dist/chunk-SLHLXUMO.js +0 -445
- package/dist/chunk-UOIGFQXC.cjs +0 -9750
- package/dist/chunk-UOL6Y5TD.cjs +0 -759
- package/dist/chunk-UVFI7XIR.cjs +0 -452
- package/dist/chunk-VEPGBETF.js +0 -844
- package/dist/chunk-XQ5MWMP2.js +0 -756
- package/dist/chunk-XT6JY5W5.js +0 -9684
- package/dist/chunk-YRRAUB35.js +0 -811
- package/dist/compiler/GasOptimizationAnalyzer.d.ts +0 -73
- package/dist/compiler/NFTMarketplaceCompiler.d.ts +0 -23
- package/dist/compiler/ar.cjs +0 -23
- package/dist/compiler/ar.js +0 -11
- package/dist/compiler/babylon.cjs +0 -21
- package/dist/compiler/babylon.js +0 -15
- package/dist/compiler/multi-layer.cjs +0 -24
- package/dist/compiler/multi-layer.js +0 -15
- package/dist/compiler/playcanvas.cjs +0 -19
- package/dist/compiler/playcanvas.js +0 -13
- package/dist/compiler/r3f.cjs +0 -39
- package/dist/compiler/r3f.d.ts +0 -22
- package/dist/compiler/r3f.js +0 -17
- package/dist/compiler/vrr.cjs +0 -24
- package/dist/compiler/vrr.js +0 -12
- package/dist/parser/NFTMarketplaceTypes.d.ts +0 -191
- package/dist/playwright-3AT3AKTV.cjs +0 -98673
- package/dist/playwright-VZPDVUEQ.js +0 -98660
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkZHPMP447_cjs = require('./chunk-ZHPMP447.cjs');
|
|
4
4
|
|
|
5
5
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
6
6
|
// ../plugins/qm-bridge/src/QmSolver.ts
|
|
@@ -13,7 +13,7 @@ function requireCapability(backend, capability) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
exports.QM_BACKEND_CAPABILITIES = void 0;
|
|
16
|
-
var init_QmSolver =
|
|
16
|
+
var init_QmSolver = chunkZHPMP447_cjs.__esm({
|
|
17
17
|
"../plugins/qm-bridge/src/QmSolver.ts"() {
|
|
18
18
|
exports.QM_BACKEND_CAPABILITIES = {
|
|
19
19
|
psi4: {
|
|
@@ -80,6 +80,19 @@ var init_QmSolver = chunkHCCQLAA4_cjs.__esm({
|
|
|
80
80
|
qmMm: false,
|
|
81
81
|
// Stage 3
|
|
82
82
|
maxAtoms: 200
|
|
83
|
+
},
|
|
84
|
+
quantinuum: {
|
|
85
|
+
molecular: true,
|
|
86
|
+
// logical-qubit VQE for small molecules
|
|
87
|
+
periodic: false,
|
|
88
|
+
semiEmpirical: false,
|
|
89
|
+
nmrGiao: false,
|
|
90
|
+
tdDft: false,
|
|
91
|
+
postHf: false,
|
|
92
|
+
transitionStates: false,
|
|
93
|
+
qmMm: false,
|
|
94
|
+
maxAtoms: 8
|
|
95
|
+
// logical qubits are scarce; small molecules on encoded qubits
|
|
83
96
|
}
|
|
84
97
|
};
|
|
85
98
|
}
|
|
@@ -87,11 +100,11 @@ var init_QmSolver = chunkHCCQLAA4_cjs.__esm({
|
|
|
87
100
|
|
|
88
101
|
// ../plugins/qm-bridge/src/backends/ibm-quantum.ts
|
|
89
102
|
var ibm_quantum_exports = {};
|
|
90
|
-
|
|
103
|
+
chunkZHPMP447_cjs.__export(ibm_quantum_exports, {
|
|
91
104
|
IBMQuantumBackend: () => exports.IBMQuantumBackend
|
|
92
105
|
});
|
|
93
106
|
exports.IBMQuantumBackend = void 0;
|
|
94
|
-
var init_ibm_quantum =
|
|
107
|
+
var init_ibm_quantum = chunkZHPMP447_cjs.__esm({
|
|
95
108
|
"../plugins/qm-bridge/src/backends/ibm-quantum.ts"() {
|
|
96
109
|
init_QmSolver();
|
|
97
110
|
exports.IBMQuantumBackend = class {
|
|
@@ -355,7 +368,7 @@ var init_ibm_quantum = chunkHCCQLAA4_cjs.__esm({
|
|
|
355
368
|
const { execFile } = await import('child_process');
|
|
356
369
|
const { promisify } = await import('util');
|
|
357
370
|
const execFileAsync = promisify(execFile);
|
|
358
|
-
const scriptPath = this.config.scriptPath ?? new URL("../../../../../../scripts/quantum_execute.py", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('src-
|
|
371
|
+
const scriptPath = this.config.scriptPath ?? new URL("../../../../../../scripts/quantum_execute.py", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('src-G3D7ZATQ.cjs', document.baseURI).href))).pathname;
|
|
359
372
|
const pythonExe = process.env.QISKIT_PYTHON ?? (process.platform === "win32" ? "C:\\Python314\\python.exe" : "python3");
|
|
360
373
|
const bridgeInput = { ...input };
|
|
361
374
|
delete bridgeInput["api_token"];
|
|
@@ -463,6 +476,336 @@ var init_ibm_quantum = chunkHCCQLAA4_cjs.__esm({
|
|
|
463
476
|
}
|
|
464
477
|
});
|
|
465
478
|
|
|
479
|
+
// ../plugins/qm-bridge/src/backends/quantinuum.ts
|
|
480
|
+
var quantinuum_exports = {};
|
|
481
|
+
chunkZHPMP447_cjs.__export(quantinuum_exports, {
|
|
482
|
+
QuantinuumBackend: () => exports.QuantinuumBackend
|
|
483
|
+
});
|
|
484
|
+
exports.QuantinuumBackend = void 0;
|
|
485
|
+
var init_quantinuum = chunkZHPMP447_cjs.__esm({
|
|
486
|
+
"../plugins/qm-bridge/src/backends/quantinuum.ts"() {
|
|
487
|
+
init_QmSolver();
|
|
488
|
+
exports.QuantinuumBackend = class {
|
|
489
|
+
constructor(config) {
|
|
490
|
+
this.mode = "steady-state";
|
|
491
|
+
this.fieldNames = ["total_energy"];
|
|
492
|
+
this.scale = "quantum";
|
|
493
|
+
this.backend = "quantinuum";
|
|
494
|
+
this.lastEnergy = null;
|
|
495
|
+
this.lastResult = null;
|
|
496
|
+
this.config = config;
|
|
497
|
+
this.qmConfig = config;
|
|
498
|
+
}
|
|
499
|
+
// ── SimSolver lifecycle ──────────────────────────────────────────────────
|
|
500
|
+
step(_dt) {
|
|
501
|
+
}
|
|
502
|
+
solve() {
|
|
503
|
+
}
|
|
504
|
+
getField(name) {
|
|
505
|
+
if (name === "total_energy") {
|
|
506
|
+
if (this.lastEnergy === null) {
|
|
507
|
+
throw new Error(
|
|
508
|
+
"[quantinuum] No energy computed yet. Call computeEnergy or runLogicalVQE first."
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
return new Float64Array([this.lastEnergy]);
|
|
512
|
+
}
|
|
513
|
+
throw new Error(`[quantinuum] Unknown field '${name}'. Available fields: total_energy`);
|
|
514
|
+
}
|
|
515
|
+
getStats() {
|
|
516
|
+
return {
|
|
517
|
+
backend: this.backend,
|
|
518
|
+
executionMode: this.config.executionMode ?? "sim",
|
|
519
|
+
codeFamily: this.config.codeFamily ?? "steane",
|
|
520
|
+
codeDistance: this.config.codeDistance ?? 3,
|
|
521
|
+
lastEnergy: this.lastEnergy,
|
|
522
|
+
lastConverged: this.lastResult?.converged ?? null,
|
|
523
|
+
lastLogicalErrorRate: this.lastResult?.logicalErrorRate ?? null,
|
|
524
|
+
lastAcceptanceFraction: this.lastResult?.postSelection.acceptanceFraction ?? null
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
dispose() {
|
|
528
|
+
this.lastEnergy = null;
|
|
529
|
+
this.lastResult = null;
|
|
530
|
+
}
|
|
531
|
+
reset() {
|
|
532
|
+
this.dispose();
|
|
533
|
+
}
|
|
534
|
+
// ── Implemented capabilities ────────────────────────────────────────────
|
|
535
|
+
/**
|
|
536
|
+
* Compute ground-state energy via logical-qubit VQE.
|
|
537
|
+
*
|
|
538
|
+
* Drop-in compatible with the QmEnergyResult shape so a logical run can stand
|
|
539
|
+
* in for Psi4 in energy-only workflows. Nuclear repulsion is estimated
|
|
540
|
+
* classically from the geometry (same approach as the IBM backend).
|
|
541
|
+
*/
|
|
542
|
+
async computeEnergy(molecule) {
|
|
543
|
+
requireCapability("quantinuum", "molecular");
|
|
544
|
+
const vqe = await this.runLogicalVQE(molecule);
|
|
545
|
+
const nucRepulsion = this._estimateNuclearRepulsion(molecule);
|
|
546
|
+
const result = {
|
|
547
|
+
totalEnergy: vqe.groundStateEnergy,
|
|
548
|
+
electronicEnergy: vqe.groundStateEnergy - nucRepulsion,
|
|
549
|
+
nuclearRepulsionEnergy: nucRepulsion,
|
|
550
|
+
scfIterations: vqe.optimizerIterations,
|
|
551
|
+
converged: vqe.converged,
|
|
552
|
+
solverConfig: this.qmConfig,
|
|
553
|
+
wallTimeSeconds: vqe.wallTimeSeconds
|
|
554
|
+
};
|
|
555
|
+
this.lastEnergy = result.totalEnergy;
|
|
556
|
+
return result;
|
|
557
|
+
}
|
|
558
|
+
/** Geometry optimisation is not supported — use Psi4, then validate energy here. */
|
|
559
|
+
async optimizeGeometry(_molecule) {
|
|
560
|
+
throw new Error(
|
|
561
|
+
"[quantinuum] Quantinuum backend does not support geometry optimization. Use Psi4 for optimization, then quantinuum for logical-qubit energy validation."
|
|
562
|
+
);
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Run VQE on logical (error-corrected) qubits and return the full QEC bookkeeping.
|
|
566
|
+
*
|
|
567
|
+
* Builds a JSON payload describing the molecule + encoding, invokes
|
|
568
|
+
* quantinuum_execute.py, and maps the response onto QuantinuumQECResult — which
|
|
569
|
+
* carries logical-vs-physical error AND the post-selection acceptance fraction.
|
|
570
|
+
*/
|
|
571
|
+
async runLogicalVQE(molecule) {
|
|
572
|
+
requireCapability("quantinuum", "molecular");
|
|
573
|
+
const startTime = performance.now();
|
|
574
|
+
const executionMode = this.config.executionMode ?? "sim";
|
|
575
|
+
const input = {
|
|
576
|
+
task: "logical_vqe",
|
|
577
|
+
molecule: {
|
|
578
|
+
atoms: molecule.atoms.map((a) => ({ symbol: a.symbol, x: a.x, y: a.y, z: a.z })),
|
|
579
|
+
charge: molecule.charge ?? 0,
|
|
580
|
+
multiplicity: molecule.multiplicity ?? 1,
|
|
581
|
+
units: molecule.units ?? "angstrom"
|
|
582
|
+
},
|
|
583
|
+
method: this.qmConfig.basis ?? "sto-3g",
|
|
584
|
+
ansatz_layers: this.config.ansatzLayers ?? 1,
|
|
585
|
+
max_iterations: this.config.maxOptimizerIterations ?? 100,
|
|
586
|
+
execution_mode: executionMode,
|
|
587
|
+
device: this.config.device ?? null,
|
|
588
|
+
code_family: this.config.codeFamily ?? "steane",
|
|
589
|
+
code_distance: this.config.codeDistance ?? 3,
|
|
590
|
+
rounds: this.config.rounds ?? 1,
|
|
591
|
+
physical_error_rate: this.config.physicalErrorRate ?? 1e-3
|
|
592
|
+
};
|
|
593
|
+
const raw = await this._runPythonBridge(input);
|
|
594
|
+
if (raw.error) {
|
|
595
|
+
throw new Error(`[quantinuum] logical VQE failed: ${raw.error}`);
|
|
596
|
+
}
|
|
597
|
+
const wallTime = raw.wall_time_seconds ?? (performance.now() - startTime) / 1e3;
|
|
598
|
+
const executionBackend = raw.execution_backend === "quantinuum" ? "quantinuum" : "quantinuum-sim";
|
|
599
|
+
const result = {
|
|
600
|
+
groundStateEnergy: raw.ground_state_energy ?? 0,
|
|
601
|
+
converged: raw.converged ?? false,
|
|
602
|
+
optimizerIterations: raw.optimizer_iterations ?? 0,
|
|
603
|
+
finalCost: raw.final_cost ?? 0,
|
|
604
|
+
numQubits: raw.num_qubits ?? raw.physical_qubits ?? 0,
|
|
605
|
+
circuitDepth: raw.circuit_depth ?? 0,
|
|
606
|
+
executionBackend,
|
|
607
|
+
jobId: raw.job_id,
|
|
608
|
+
wallTimeSeconds: wallTime,
|
|
609
|
+
solverConfig: this.qmConfig,
|
|
610
|
+
logicalQubits: raw.logical_qubits ?? 0,
|
|
611
|
+
physicalQubits: raw.physical_qubits ?? 0,
|
|
612
|
+
codeFamily: raw.code_family ?? (this.config.codeFamily ?? "steane"),
|
|
613
|
+
codeDistance: raw.code_distance ?? (this.config.codeDistance ?? 3),
|
|
614
|
+
rounds: raw.rounds ?? (this.config.rounds ?? 1),
|
|
615
|
+
physicalErrorRate: raw.physical_error_rate ?? (this.config.physicalErrorRate ?? 1e-3),
|
|
616
|
+
logicalErrorRate: raw.logical_error_rate ?? 0,
|
|
617
|
+
postSelection: {
|
|
618
|
+
used: raw.post_selection_used ?? false,
|
|
619
|
+
acceptanceFraction: raw.acceptance_fraction ?? 1
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
this.lastResult = result;
|
|
623
|
+
this.lastEnergy = result.groundStateEnergy;
|
|
624
|
+
return result;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* VQERunnerTrait / QmSolver compatibility shim: returns the plain VQEResult slice
|
|
628
|
+
* of the logical run, so the Quantinuum backend is usable anywhere `runVQE` is.
|
|
629
|
+
*/
|
|
630
|
+
async runVQE(molecule, _ansatzLayers = 1) {
|
|
631
|
+
return this.runLogicalVQE(molecule);
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Map a logical-VQE result onto a `cael-quantum-v1.qec` receipt — the honest,
|
|
635
|
+
* cross-vendor record. A post-selected result keeps `post_selection.used=true`
|
|
636
|
+
* and a sub-1.0 acceptance fraction, so the suppression figure can never be
|
|
637
|
+
* quoted without the discard rate that produced it.
|
|
638
|
+
*/
|
|
639
|
+
async toQecReceipt(result) {
|
|
640
|
+
const isHw = result.executionBackend === "quantinuum";
|
|
641
|
+
const suppression = result.logicalErrorRate > 0 ? result.physicalErrorRate / result.logicalErrorRate : null;
|
|
642
|
+
const base = {
|
|
643
|
+
schema: "cael-quantum-v1.qec",
|
|
644
|
+
kind: "qec_logical_vqe_receipt",
|
|
645
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
646
|
+
tier: isHw ? "hardware" : "simulate",
|
|
647
|
+
claim_boundary: isHw ? "Logical-qubit VQE on real Quantinuum H-series hardware (error-corrected)." : "Local classical surrogate of logical-qubit error suppression; NOT hardware and NOT a full stabiliser simulation. Verifies pipeline + receipt only.",
|
|
648
|
+
code: {
|
|
649
|
+
family: result.codeFamily,
|
|
650
|
+
name: `${result.codeFamily}-d${result.codeDistance}`,
|
|
651
|
+
distance: result.codeDistance,
|
|
652
|
+
logical_qubits: result.logicalQubits,
|
|
653
|
+
physical_qubits: result.physicalQubits
|
|
654
|
+
},
|
|
655
|
+
noise_model: isHw ? "hardware" : "depolarizing-surrogate",
|
|
656
|
+
decoder: result.codeFamily === "none" ? "none" : "lookup-table",
|
|
657
|
+
rounds: result.rounds,
|
|
658
|
+
measurement: {
|
|
659
|
+
physical_error_rate: result.physicalErrorRate,
|
|
660
|
+
logical_error_rate: result.logicalErrorRate,
|
|
661
|
+
suppression_factor_physical_over_logical: suppression,
|
|
662
|
+
ground_state_energy: result.groundStateEnergy,
|
|
663
|
+
converged: result.converged
|
|
664
|
+
},
|
|
665
|
+
post_selection: {
|
|
666
|
+
used: result.postSelection.used,
|
|
667
|
+
acceptance_fraction: result.postSelection.acceptanceFraction,
|
|
668
|
+
note: "A fair logical-vs-physical suppression figure must be scaled by acceptance_fraction; a sub-1.0 fraction means shots were discarded."
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
const { createHash } = await import('crypto');
|
|
672
|
+
const payload_hash = createHash("sha256").update(
|
|
673
|
+
JSON.stringify({
|
|
674
|
+
schema: base.schema,
|
|
675
|
+
code: base.code,
|
|
676
|
+
noise_model: base.noise_model,
|
|
677
|
+
decoder: base.decoder,
|
|
678
|
+
rounds: base.rounds,
|
|
679
|
+
measurement: base.measurement,
|
|
680
|
+
post_selection: base.post_selection
|
|
681
|
+
})
|
|
682
|
+
).digest("hex");
|
|
683
|
+
return { ...base, payload_hash, receipt_id: `qec-${payload_hash.slice(0, 16)}` };
|
|
684
|
+
}
|
|
685
|
+
// ── Unsupported classical QM methods ─────────────────────────────────────
|
|
686
|
+
async computeVibrations() {
|
|
687
|
+
throw new Error(this._unsupportedMsg("computeVibrations"));
|
|
688
|
+
}
|
|
689
|
+
async computeChargeDensity() {
|
|
690
|
+
throw new Error(this._unsupportedMsg("computeChargeDensity"));
|
|
691
|
+
}
|
|
692
|
+
async computeBandStructure() {
|
|
693
|
+
throw new Error(this._unsupportedMsg("computeBandStructure"));
|
|
694
|
+
}
|
|
695
|
+
async computeDipoleMoment() {
|
|
696
|
+
throw new Error(this._unsupportedMsg("computeDipoleMoment"));
|
|
697
|
+
}
|
|
698
|
+
async computeDftMaterials() {
|
|
699
|
+
throw new Error(this._unsupportedMsg("computeDftMaterials"));
|
|
700
|
+
}
|
|
701
|
+
async computeNmrSpectrum() {
|
|
702
|
+
throw new Error(this._unsupportedMsg("computeNmrSpectrum"));
|
|
703
|
+
}
|
|
704
|
+
async computeSemiEmpiricalEnergy() {
|
|
705
|
+
throw new Error(this._unsupportedMsg("computeSemiEmpiricalEnergy"));
|
|
706
|
+
}
|
|
707
|
+
async computeTransitionState() {
|
|
708
|
+
throw new Error(this._unsupportedMsg("computeTransitionState"));
|
|
709
|
+
}
|
|
710
|
+
async computeQmMm() {
|
|
711
|
+
throw new Error(this._unsupportedMsg("computeQmMm"));
|
|
712
|
+
}
|
|
713
|
+
// ── Private helpers ──────────────────────────────────────────────────────
|
|
714
|
+
/**
|
|
715
|
+
* Invoke the Python bridge with a JSON payload. The token is passed through the
|
|
716
|
+
* child environment (QUANTINUUM_API_KEY), never the argv JSON, so it cannot leak
|
|
717
|
+
* into process listings or logs. Mirrors the IBM backend's secret discipline.
|
|
718
|
+
*/
|
|
719
|
+
async _runPythonBridge(input) {
|
|
720
|
+
const { execFile } = await import('child_process');
|
|
721
|
+
const { promisify } = await import('util');
|
|
722
|
+
const execFileAsync = promisify(execFile);
|
|
723
|
+
const scriptPath = this.config.scriptPath ?? new URL("../../../../../../scripts/quantinuum_execute.py", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('src-G3D7ZATQ.cjs', document.baseURI).href))).pathname;
|
|
724
|
+
const pythonExe = process.env.QISKIT_PYTHON ?? (process.platform === "win32" ? "C:\\Python314\\python.exe" : "python3");
|
|
725
|
+
const bridgeInput = { ...input };
|
|
726
|
+
delete bridgeInput["api_token"];
|
|
727
|
+
delete bridgeInput["apiToken"];
|
|
728
|
+
const apiToken = this._resolveApiToken();
|
|
729
|
+
const childEnv = apiToken ? { ...process.env, QUANTINUUM_API_KEY: apiToken } : process.env;
|
|
730
|
+
const { stdout, stderr } = await execFileAsync(
|
|
731
|
+
pythonExe,
|
|
732
|
+
[scriptPath, JSON.stringify(bridgeInput)],
|
|
733
|
+
{ maxBuffer: 10 * 1024 * 1024, env: childEnv }
|
|
734
|
+
);
|
|
735
|
+
if (stderr) {
|
|
736
|
+
const fatal = stderr.split("\n").filter(
|
|
737
|
+
(l) => l.includes("Error:") || l.includes("Traceback") || l.includes("SyntaxError")
|
|
738
|
+
);
|
|
739
|
+
if (fatal.length > 0) {
|
|
740
|
+
throw new Error(`[quantinuum] Python bridge error: ${fatal.join("\n")}`);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
return JSON.parse(stdout);
|
|
744
|
+
}
|
|
745
|
+
_resolveApiToken() {
|
|
746
|
+
if (this.config.apiToken) {
|
|
747
|
+
return this.config.apiToken;
|
|
748
|
+
}
|
|
749
|
+
if (typeof process !== "undefined" && process.env["QUANTINUUM_API_KEY"]) {
|
|
750
|
+
return process.env["QUANTINUUM_API_KEY"];
|
|
751
|
+
}
|
|
752
|
+
return null;
|
|
753
|
+
}
|
|
754
|
+
/** Estimate nuclear repulsion from pairwise Coulomb (Hartree, a.u.). */
|
|
755
|
+
_estimateNuclearRepulsion(molecule) {
|
|
756
|
+
const ANGSTROM_TO_BOHR = 1.8897259886;
|
|
757
|
+
const atomicNumbers = {
|
|
758
|
+
H: 1,
|
|
759
|
+
He: 2,
|
|
760
|
+
Li: 3,
|
|
761
|
+
Be: 4,
|
|
762
|
+
B: 5,
|
|
763
|
+
C: 6,
|
|
764
|
+
N: 7,
|
|
765
|
+
O: 8,
|
|
766
|
+
F: 9,
|
|
767
|
+
Ne: 10,
|
|
768
|
+
Na: 11,
|
|
769
|
+
Mg: 12,
|
|
770
|
+
Al: 13,
|
|
771
|
+
Si: 14,
|
|
772
|
+
P: 15,
|
|
773
|
+
S: 16,
|
|
774
|
+
Cl: 17,
|
|
775
|
+
Ar: 18,
|
|
776
|
+
K: 19,
|
|
777
|
+
Ca: 20,
|
|
778
|
+
Fe: 26,
|
|
779
|
+
Co: 27,
|
|
780
|
+
Ni: 28,
|
|
781
|
+
Cu: 29,
|
|
782
|
+
Zn: 30
|
|
783
|
+
};
|
|
784
|
+
const atoms = molecule.atoms;
|
|
785
|
+
let repulsion = 0;
|
|
786
|
+
for (let i = 0; i < atoms.length; i++) {
|
|
787
|
+
for (let j = i + 1; j < atoms.length; j++) {
|
|
788
|
+
const ai = atoms[i];
|
|
789
|
+
const aj = atoms[j];
|
|
790
|
+
if (ai === void 0 || aj === void 0) continue;
|
|
791
|
+
const zi = atomicNumbers[ai.symbol] ?? 6;
|
|
792
|
+
const zj = atomicNumbers[aj.symbol] ?? 6;
|
|
793
|
+
const dx = (ai.x - aj.x) * ANGSTROM_TO_BOHR;
|
|
794
|
+
const dy = (ai.y - aj.y) * ANGSTROM_TO_BOHR;
|
|
795
|
+
const dz = (ai.z - aj.z) * ANGSTROM_TO_BOHR;
|
|
796
|
+
const r = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
797
|
+
if (r > 0) repulsion += zi * zj / r;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
return repulsion;
|
|
801
|
+
}
|
|
802
|
+
_unsupportedMsg(methodName) {
|
|
803
|
+
return `[quantinuum] ${methodName} is not supported. Quantinuum backend supports logical-qubit VQE (computeEnergy / runLogicalVQE / runVQE) only. Use Psi4 or TBLite for classical QM methods.`;
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
});
|
|
808
|
+
|
|
466
809
|
// ../plugins/qm-bridge/src/index.ts
|
|
467
810
|
init_QmSolver();
|
|
468
811
|
|
|
@@ -890,9 +1233,21 @@ var Psi4Backend = class {
|
|
|
890
1233
|
"1H": 31.882,
|
|
891
1234
|
"13C": 184.133
|
|
892
1235
|
};
|
|
893
|
-
const
|
|
894
|
-
|
|
895
|
-
|
|
1236
|
+
const nmrIsotopeLabel = (symbol) => {
|
|
1237
|
+
switch (symbol) {
|
|
1238
|
+
case "H":
|
|
1239
|
+
return "1H";
|
|
1240
|
+
case "C":
|
|
1241
|
+
return "13C";
|
|
1242
|
+
case "N":
|
|
1243
|
+
return "15N";
|
|
1244
|
+
case "P":
|
|
1245
|
+
return "31P";
|
|
1246
|
+
default:
|
|
1247
|
+
return symbol;
|
|
1248
|
+
}
|
|
1249
|
+
};
|
|
1250
|
+
const nucleusLabels = molecule.atoms.map((a) => nmrIsotopeLabel(a.symbol));
|
|
896
1251
|
const shieldings = raw.shieldings ?? new Array(molecule.atoms.length).fill(0);
|
|
897
1252
|
const chemicalShifts = shieldings.map((s, i) => {
|
|
898
1253
|
const label = nucleusLabels[i]?.replace(/\d+/, "") || "1H";
|
|
@@ -968,15 +1323,57 @@ var Psi4Backend = class {
|
|
|
968
1323
|
/**
|
|
969
1324
|
* Run a Psi4 input script and parse the JSON result.
|
|
970
1325
|
*
|
|
971
|
-
*
|
|
972
|
-
* the
|
|
973
|
-
*
|
|
1326
|
+
* When psi4Path is '__mock__' or unset, returns synthesised mock data so
|
|
1327
|
+
* the CAEL recording pipeline can be validated end-to-end without a Psi4
|
|
1328
|
+
* installation. When psi4Path is any other value (a real binary path),
|
|
1329
|
+
* the script is written to a temp file, psi4 is spawned as a subprocess,
|
|
1330
|
+
* and the %%QM_RESULT%% marker is parsed from stdout. If the spawn fails
|
|
1331
|
+
* (e.g. binary not found), an error is thrown — silent fallback to mock
|
|
1332
|
+
* would be "verifier theater" (a bridge that always returns mock data is
|
|
1333
|
+
* indistinguishable from a broken bridge).
|
|
974
1334
|
*/
|
|
975
1335
|
async runPsi4(inputScript) {
|
|
976
1336
|
if (!this.psi4Path || this.psi4Path === "__mock__") {
|
|
977
1337
|
return this.mockPsi4Result(inputScript);
|
|
978
1338
|
}
|
|
979
|
-
|
|
1339
|
+
const { execFile } = await import('child_process');
|
|
1340
|
+
const { promisify } = await import('util');
|
|
1341
|
+
const os = await import('os');
|
|
1342
|
+
const path = await import('path');
|
|
1343
|
+
const fs = await import('fs/promises');
|
|
1344
|
+
const execFileAsync = promisify(execFile);
|
|
1345
|
+
const tmpDir = os.tmpdir();
|
|
1346
|
+
const inputPath = path.join(tmpDir, `holoscript_psi4_${Date.now()}.py`);
|
|
1347
|
+
const outputPath = path.join(tmpDir, `holoscript_psi4_${Date.now()}.out`);
|
|
1348
|
+
try {
|
|
1349
|
+
await fs.writeFile(inputPath, inputScript, "utf8");
|
|
1350
|
+
const { stdout, stderr } = await execFileAsync(
|
|
1351
|
+
this.psi4Path,
|
|
1352
|
+
["-i", inputPath, "-o", outputPath],
|
|
1353
|
+
{ maxBuffer: 10 * 1024 * 1024 }
|
|
1354
|
+
);
|
|
1355
|
+
if (stderr) {
|
|
1356
|
+
const fatal = stderr.split("\n").filter(
|
|
1357
|
+
(l) => l.includes("Error:") || l.includes("Traceback") || l.includes("SyntaxError")
|
|
1358
|
+
);
|
|
1359
|
+
if (fatal.length > 0) {
|
|
1360
|
+
throw new Error(`[psi4] Subprocess error: ${fatal.join("\n")}`);
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
const marker = "%%QM_RESULT%%";
|
|
1364
|
+
const markerIdx = stdout.indexOf(marker);
|
|
1365
|
+
if (markerIdx === -1) {
|
|
1366
|
+
throw new Error("[psi4] Output did not contain %%QM_RESULT%% marker");
|
|
1367
|
+
}
|
|
1368
|
+
const jsonStr = stdout.slice(markerIdx + marker.length).trim().split("\n")[0] ?? "";
|
|
1369
|
+
return JSON.parse(jsonStr);
|
|
1370
|
+
} catch (err) {
|
|
1371
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1372
|
+
throw new Error(`[psi4] Failed to run psi4 at '${this.psi4Path}': ${msg}`);
|
|
1373
|
+
} finally {
|
|
1374
|
+
await fs.unlink(inputPath).catch(() => void 0);
|
|
1375
|
+
await fs.unlink(outputPath).catch(() => void 0);
|
|
1376
|
+
}
|
|
980
1377
|
}
|
|
981
1378
|
/** Mock result for testing without Psi4 installed. */
|
|
982
1379
|
mockPsi4Result(_input) {
|
|
@@ -1235,11 +1632,74 @@ var QuantumEspressoBackend = class {
|
|
|
1235
1632
|
throw new Error("[qm-bridge] Quantum ESPRESSO does not support QM/MM. Use psi4 backend.");
|
|
1236
1633
|
}
|
|
1237
1634
|
// ── Subprocess bridge ──────────────────────────────────────────────────
|
|
1238
|
-
|
|
1635
|
+
/**
|
|
1636
|
+
* Run pw.x with the given SCF input and parse the output.
|
|
1637
|
+
*
|
|
1638
|
+
* When pwPath is '__mock__', returns synthesised results for testing
|
|
1639
|
+
* without a QE installation. When pwPath is any other value, the input is
|
|
1640
|
+
* written to a temp directory, pw.x is spawned with stdin redirect, and
|
|
1641
|
+
* the output is parsed for total energy, Fermi energy, and band gap.
|
|
1642
|
+
* If the spawn fails, an error is thrown — silent fallback to mock would
|
|
1643
|
+
* be verifier theater.
|
|
1644
|
+
*
|
|
1645
|
+
* Output parsing targets QE 7.x XML output (in the ./tmp/holoscript_qm.save/
|
|
1646
|
+
* directory) or falls back to stdout pattern matching.
|
|
1647
|
+
*/
|
|
1648
|
+
async runQe(input) {
|
|
1239
1649
|
if (this.pwPath === "__mock__") {
|
|
1240
1650
|
return this.mockQeResult();
|
|
1241
1651
|
}
|
|
1242
|
-
|
|
1652
|
+
const { execFile } = await import('child_process');
|
|
1653
|
+
const { promisify } = await import('util');
|
|
1654
|
+
const os = await import('os');
|
|
1655
|
+
const path = await import('path');
|
|
1656
|
+
const fs = await import('fs/promises');
|
|
1657
|
+
const execFileAsync = promisify(execFile);
|
|
1658
|
+
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "holoscript_qe_"));
|
|
1659
|
+
const inputPath = path.join(tmpDir, "pw.in");
|
|
1660
|
+
const outputPath = path.join(tmpDir, "pw.out");
|
|
1661
|
+
try {
|
|
1662
|
+
const patchedInput = input.replace("outdir = './tmp'", `outdir = '${tmpDir}/tmp'`);
|
|
1663
|
+
await fs.writeFile(inputPath, patchedInput, "utf8");
|
|
1664
|
+
const { stdout, stderr } = await execFileAsync(
|
|
1665
|
+
this.pwPath,
|
|
1666
|
+
["-in", inputPath],
|
|
1667
|
+
{
|
|
1668
|
+
cwd: tmpDir,
|
|
1669
|
+
maxBuffer: 50 * 1024 * 1024,
|
|
1670
|
+
env: { ...process.env, OMP_NUM_THREADS: "1" }
|
|
1671
|
+
}
|
|
1672
|
+
);
|
|
1673
|
+
await fs.writeFile(outputPath, stdout, "utf8").catch(() => void 0);
|
|
1674
|
+
if (stderr) {
|
|
1675
|
+
const fatal = stderr.split("\n").filter((l) => l.includes("Error") || l.includes("Traceback") || l.includes("forrtl"));
|
|
1676
|
+
if (fatal.length > 0) {
|
|
1677
|
+
throw new Error(`[quantum-espresso] pw.x stderr: ${fatal.join("\n")}`);
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
const energyMatch = stdout.match(/!\s+total energy\s+=\s+([-\d.]+)\s+Ry/);
|
|
1681
|
+
const totalEnergy = energyMatch?.[1] !== void 0 ? parseFloat(energyMatch[1]) : void 0;
|
|
1682
|
+
const fermiMatch = stdout.match(/the Fermi energy is\s+([-\d.]+)\s+ev/i);
|
|
1683
|
+
const fermiEnergy = fermiMatch?.[1] !== void 0 ? parseFloat(fermiMatch[1]) : void 0;
|
|
1684
|
+
const convMatch = stdout.match(/convergence has been achieved in\s+(\d+)/i);
|
|
1685
|
+
const converged = convMatch !== null;
|
|
1686
|
+
const scfIterations = convMatch?.[1] !== void 0 ? parseInt(convMatch[1], 10) : 0;
|
|
1687
|
+
return {
|
|
1688
|
+
total_energy: totalEnergy,
|
|
1689
|
+
fermi_energy: fermiEnergy,
|
|
1690
|
+
band_gap: void 0,
|
|
1691
|
+
// Requires post-processing with bands.x
|
|
1692
|
+
is_metallic: fermiEnergy !== void 0 && totalEnergy !== void 0,
|
|
1693
|
+
scf_iterations: scfIterations,
|
|
1694
|
+
converged,
|
|
1695
|
+
band_energies: []
|
|
1696
|
+
};
|
|
1697
|
+
} catch (err) {
|
|
1698
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1699
|
+
throw new Error(`[quantum-espresso] Failed to run pw.x at '${this.pwPath}': ${msg}`);
|
|
1700
|
+
} finally {
|
|
1701
|
+
await fs.rm(tmpDir, { recursive: true, force: true }).catch(() => void 0);
|
|
1702
|
+
}
|
|
1243
1703
|
}
|
|
1244
1704
|
mockQeResult() {
|
|
1245
1705
|
return {
|
|
@@ -1358,12 +1818,61 @@ var TBLiteBackend = class {
|
|
|
1358
1818
|
throw new Error("[qm-bridge] TBLite does not support QM/MM. Use psi4 backend.");
|
|
1359
1819
|
}
|
|
1360
1820
|
// ── Subprocess bridge ──────────────────────────────────────────────────
|
|
1821
|
+
/**
|
|
1822
|
+
* Invoke xtb for a single-point (--sp) or geometry optimisation (--opt).
|
|
1823
|
+
*
|
|
1824
|
+
* When xtbPath is '__mock__', returns synthesised results so tests that do
|
|
1825
|
+
* not have xtb installed can still exercise the interface. When xtbPath is
|
|
1826
|
+
* any other value, the XYZ input is written to a temp directory, xtb is
|
|
1827
|
+
* spawned, and the JSON output (xtb --json writes xtbout.json) is parsed.
|
|
1828
|
+
* If the spawn fails, an error is thrown — silent fallback to mock would
|
|
1829
|
+
* be verifier theater.
|
|
1830
|
+
*/
|
|
1361
1831
|
async runXtb(molecule, task) {
|
|
1362
|
-
this.moleculeToXyz(molecule);
|
|
1363
1832
|
if (this.xtbPath === "__mock__") {
|
|
1364
1833
|
return this.mockXtbResult(molecule, task);
|
|
1365
1834
|
}
|
|
1366
|
-
|
|
1835
|
+
const xyz = this.moleculeToXyz(molecule);
|
|
1836
|
+
const { execFile } = await import('child_process');
|
|
1837
|
+
const { promisify } = await import('util');
|
|
1838
|
+
const os = await import('os');
|
|
1839
|
+
const path = await import('path');
|
|
1840
|
+
const fs = await import('fs/promises');
|
|
1841
|
+
const execFileAsync = promisify(execFile);
|
|
1842
|
+
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "holoscript_xtb_"));
|
|
1843
|
+
const inputPath = path.join(tmpDir, "input.xyz");
|
|
1844
|
+
const jsonOutputPath = path.join(tmpDir, "xtbout.json");
|
|
1845
|
+
try {
|
|
1846
|
+
await fs.writeFile(inputPath, xyz, "utf8");
|
|
1847
|
+
const args = [inputPath, task, "--json", "--namespace", "xtbout"];
|
|
1848
|
+
if (this.xtbMethod === "GFN0-xTB") args.push("--gfn", "0");
|
|
1849
|
+
else if (this.xtbMethod === "GFN1-xTB") args.push("--gfn", "1");
|
|
1850
|
+
const { stderr } = await execFileAsync(this.xtbPath, args, {
|
|
1851
|
+
cwd: tmpDir,
|
|
1852
|
+
maxBuffer: 10 * 1024 * 1024
|
|
1853
|
+
});
|
|
1854
|
+
if (stderr) {
|
|
1855
|
+
const fatal = stderr.split("\n").filter((l) => l.includes("ERROR") || l.includes("Traceback"));
|
|
1856
|
+
if (fatal.length > 0) {
|
|
1857
|
+
throw new Error(`[tblite] xtb stderr: ${fatal.join("\n")}`);
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
const jsonRaw = await fs.readFile(jsonOutputPath, "utf8");
|
|
1861
|
+
const parsed = JSON.parse(jsonRaw);
|
|
1862
|
+
return {
|
|
1863
|
+
total_energy: typeof parsed["total energy"] === "number" ? parsed["total energy"] : void 0,
|
|
1864
|
+
converged: true,
|
|
1865
|
+
scf_iterations: typeof parsed["number of iterations taken for SCC"] === "number" ? parsed["number of iterations taken for SCC"] : void 0,
|
|
1866
|
+
dipole_moment: Array.isArray(parsed["dipole"]) ? parsed["dipole"] : void 0,
|
|
1867
|
+
gradient_norm: typeof parsed["gradient norm"] === "number" ? parsed["gradient norm"] : void 0,
|
|
1868
|
+
opt_steps: typeof parsed["optimization steps"] === "number" ? parsed["optimization steps"] : void 0
|
|
1869
|
+
};
|
|
1870
|
+
} catch (err) {
|
|
1871
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1872
|
+
throw new Error(`[tblite] Failed to run xtb at '${this.xtbPath}': ${msg}`);
|
|
1873
|
+
} finally {
|
|
1874
|
+
await fs.rm(tmpDir, { recursive: true, force: true }).catch(() => void 0);
|
|
1875
|
+
}
|
|
1367
1876
|
}
|
|
1368
1877
|
/** Convert molecule to XYZ format for xtb input. */
|
|
1369
1878
|
moleculeToXyz(molecule) {
|
|
@@ -1915,7 +2424,7 @@ var PySCFBackend = class {
|
|
|
1915
2424
|
const { execFile } = await import('child_process');
|
|
1916
2425
|
const { promisify } = await import('util');
|
|
1917
2426
|
const execFileAsync = promisify(execFile);
|
|
1918
|
-
const resolvedScript = scriptPath || new URL("../../../../../scripts/quantum_materials_execute.py", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('src-
|
|
2427
|
+
const resolvedScript = scriptPath || new URL("../../../../../scripts/quantum_materials_execute.py", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('src-G3D7ZATQ.cjs', document.baseURI).href))).pathname;
|
|
1919
2428
|
const { stdout, stderr } = await execFileAsync(
|
|
1920
2429
|
pythonExe,
|
|
1921
2430
|
[resolvedScript, JSON.stringify(input)],
|
|
@@ -2048,11 +2557,17 @@ var PySCFBackend = class {
|
|
|
2048
2557
|
};
|
|
2049
2558
|
|
|
2050
2559
|
// ../plugins/qm-bridge/src/index.ts
|
|
2560
|
+
init_quantinuum();
|
|
2051
2561
|
init_ibm_quantum();
|
|
2562
|
+
init_quantinuum();
|
|
2052
2563
|
function createIBMQuantumBackend(config) {
|
|
2053
|
-
const { IBMQuantumBackend: IBMQuantumBackend2 } = (init_ibm_quantum(),
|
|
2564
|
+
const { IBMQuantumBackend: IBMQuantumBackend2 } = (init_ibm_quantum(), chunkZHPMP447_cjs.__toCommonJS(ibm_quantum_exports));
|
|
2054
2565
|
return new IBMQuantumBackend2(config);
|
|
2055
2566
|
}
|
|
2567
|
+
function createQuantinuumBackend(config) {
|
|
2568
|
+
const { QuantinuumBackend: QuantinuumBackend2 } = (init_quantinuum(), chunkZHPMP447_cjs.__toCommonJS(quantinuum_exports));
|
|
2569
|
+
return new QuantinuumBackend2(config);
|
|
2570
|
+
}
|
|
2056
2571
|
function createQmSolver(config) {
|
|
2057
2572
|
switch (config.backend) {
|
|
2058
2573
|
case "psi4":
|
|
@@ -2065,14 +2580,19 @@ function createQmSolver(config) {
|
|
|
2065
2580
|
return new exports.IBMQuantumBackend(config);
|
|
2066
2581
|
case "pyscf":
|
|
2067
2582
|
return new PySCFBackend(config);
|
|
2583
|
+
case "quantinuum":
|
|
2584
|
+
return new exports.QuantinuumBackend(config);
|
|
2068
2585
|
default:
|
|
2069
2586
|
throw new Error(
|
|
2070
|
-
`[qm-bridge] Unknown backend: '${config.backend}'. Supported: psi4, quantum-espresso, tblite, ibm-quantum, pyscf`
|
|
2587
|
+
`[qm-bridge] Unknown backend: '${config.backend}'. Supported: psi4, quantum-espresso, tblite, ibm-quantum, pyscf, quantinuum`
|
|
2071
2588
|
);
|
|
2072
2589
|
}
|
|
2073
2590
|
}
|
|
2074
2591
|
function selectQmBackend(questionType) {
|
|
2075
2592
|
const q = questionType.toLowerCase();
|
|
2593
|
+
if (q.includes("quantinuum") || q.includes("logical qubit") || q.includes("error-corrected") || q.includes("error corrected") || q.includes("error correction") || q.includes("qec") || q.includes("carbon code") || q.includes("tesseract") || q.includes("h-series") || q.includes("fault-tolerant") || q.includes("fault tolerant")) {
|
|
2594
|
+
return "quantinuum";
|
|
2595
|
+
}
|
|
2076
2596
|
if (q.includes("vqe") || q.includes("variational quantum") || q.includes("quantum circuit") || q.includes("qaoa") || q.includes("qubo") || q.includes("ibm quantum") || q.includes("quantum hardware")) {
|
|
2077
2597
|
return "ibm-quantum";
|
|
2078
2598
|
}
|
|
@@ -2111,6 +2631,9 @@ function getDefaultQmConfig(backend, questionType) {
|
|
|
2111
2631
|
case "ibm-quantum": {
|
|
2112
2632
|
return { backend: "ibm-quantum", method: "vqe", basis: "sto-3g" };
|
|
2113
2633
|
}
|
|
2634
|
+
case "quantinuum": {
|
|
2635
|
+
return { backend: "quantinuum", method: "vqe", basis: "sto-3g" };
|
|
2636
|
+
}
|
|
2114
2637
|
case "pyscf": {
|
|
2115
2638
|
if (q.includes("phonon") || q.includes("dos") || q.includes("density of states")) {
|
|
2116
2639
|
return { backend: "pyscf", method: "pbe", basis: "sto-3g" };
|
|
@@ -2138,6 +2661,7 @@ exports.VERSION = VERSION;
|
|
|
2138
2661
|
exports.computeMeasurementBasis = computeMeasurementBasis;
|
|
2139
2662
|
exports.createIBMQuantumBackend = createIBMQuantumBackend;
|
|
2140
2663
|
exports.createQmSolver = createQmSolver;
|
|
2664
|
+
exports.createQuantinuumBackend = createQuantinuumBackend;
|
|
2141
2665
|
exports.estimateMeasurementCost = estimateMeasurementCost;
|
|
2142
2666
|
exports.getDefaultQmConfig = getDefaultQmConfig;
|
|
2143
2667
|
exports.groupPauliTerms = groupPauliTerms;
|
|
@@ -2148,5 +2672,5 @@ exports.qmResultToCaelSummary = qmResultToCaelSummary;
|
|
|
2148
2672
|
exports.requireCapability = requireCapability;
|
|
2149
2673
|
exports.selectQmBackend = selectQmBackend;
|
|
2150
2674
|
exports.verifyQmAcceptance = verifyQmAcceptance;
|
|
2151
|
-
//# sourceMappingURL=src-
|
|
2152
|
-
//# sourceMappingURL=src-
|
|
2675
|
+
//# sourceMappingURL=src-G3D7ZATQ.cjs.map
|
|
2676
|
+
//# sourceMappingURL=src-G3D7ZATQ.cjs.map
|