From: a Date: Mon, 9 Dec 2024 03:36:02 +0000 (-0500) Subject: Sun 08 Dec 2024 10:36:02 PM EST X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=dd5e1757cce3d26f4cd06a31ac93b2f017851c34;p=QAnsel.git Sun 08 Dec 2024 10:36:02 PM EST --- diff --git a/src/index.html b/src/index.html index b87a792..3814bbe 100644 --- a/src/index.html +++ b/src/index.html @@ -343,14 +343,14 @@ } else { - ret += "born q;\n"; + ret += localStorage.getItem("nmpolicy") + " q;\n"; } } } if (ProgramTrack.STATE[0].length == 0) { ret = "qreg q[" + (ProgramTrack.STATE.length - 1) + "];\n"; - ret += "born q;\n"; + ret += localStorage.getItem("nmpolicy") + " q;\n"; } if (!ret.includes("Duplicate") && !ret.includes("Incomplete") && !ret.includes("born")) @@ -372,7 +372,10 @@ } } } - ret = "shots " + localStorage.getItem("shots") + ";\n" + ret; + if (parseInt(localStorage.getItem("shots")) != shotsmax) + { + ret = "shots " + localStorage.getItem("shots") + ";\n" + ret; + } } return ret; }, @@ -558,6 +561,8 @@ localStorage.setItem("hvar", ""); if (localStorage.getItem("shots") == null) localStorage.setItem("shots", shotsmax); + if (localStorage.getItem("nmpolicy") == null) + localStorage.setItem("nmpolicy", "born"); ProgramTrack.draw(); //$(".program-track")[0].parentNode.style.height = Math.round($(".program-instr")[0].getBoundingClientRect().height) + "px"; $(".program-track")[0].parentNode.style.width = "100%"; @@ -1009,16 +1014,23 @@ $("#modal-main-content")[0].innerHTML = `

API key:


-

Shots:

+

Shots:

+
+

Noise:


-

Noise:

+

No-Measurement Policy:

+
-

Hidden variable:

+

Hidden variable:

`; $("#apikey")[0].style.width = "100%"; $("#noise")[0].style.width = "100%"; $("#hvar")[0].style.width = "100%"; $("#shots")[0].style.width = "100%"; + $("#nmpolicy")[0].style.width = "100%"; $("#apikey")[0].addEventListener("click", () => { $("#apikey")[0].selectionStart = 0; @@ -1061,6 +1073,7 @@ $("#noise")[0].value = localStorage.getItem("noise"); $("#hvar")[0].value = localStorage.getItem("hvar"); $("#shots")[0].value = localStorage.getItem("shots"); + $("#nmpolicy")[0].value = localStorage.getItem("nmpolicy"); $("#modal-main-confirm")[0].style.display = ""; $("#modal-main-cancel")[0].style.display = ""; $("#modal-main-confirm")[0].setAttribute("onclick", @@ -1069,6 +1082,7 @@ localStorage.setItem('noise', $('#noise')[0].value); localStorage.setItem('hvar', $('#hvar')[0].value); localStorage.setItem('shots', $('#shots')[0].value); + localStorage.setItem('nmpolicy', $('#nmpolicy')[0].value); closeModal(); ProgramTrack.draw(); `);