From: miha-q <>
Date: Sun, 4 Aug 2024 00:33:00 +0000 (-0400)
Subject: Sat Aug 3 08:33:00 PM EDT 2024
X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=c049fedd227ff0673f1ea1cb8a5282465573d1a1;p=QAnsel.git
Sat Aug 3 08:33:00 PM EDT 2024
---
diff --git a/examples/ghz.txt b/examples/ghz.txt
index 5872d9e..7cc4b47 100644
--- a/examples/ghz.txt
+++ b/examples/ghz.txt
@@ -1,4 +1,3 @@
qreg q[1];
-rx(pi/3) q[0];
-
-born q;
\ No newline at end of file
+rx(1/3pi) q[0];
+sample q;
\ No newline at end of file
diff --git a/src/imports/istina-editor.js b/src/imports/istina-editor.js
index f9d9156..ac65281 100644
--- a/src/imports/istina-editor.js
+++ b/src/imports/istina-editor.js
@@ -287,6 +287,21 @@ IstinaEditor.highlightForQAnsel = function(txt)
}
);
txt = txt.replaceAll
+ (
+ /if[(].*?[)]/g,
+ x =>
+ {
+ var rhs = x.split("(")[1].split(")")[0];
+ x = "if";
+ x += "(";
+ x += rhs;
+ x += ")";
+ x = x.replace("==0", "==0");
+ x = x.replace("==1", "==1");
+ return x;
+ }
+ );
+ txt = txt.replaceAll
(
/[/][/].*?([<]div|[<]br|$)/g,
x =>
diff --git a/src/index.html b/src/index.html
index a7bc52c..4f28239 100644
--- a/src/index.html
+++ b/src/index.html
@@ -684,7 +684,6 @@
{
onComplete: function()
{
- console.log('Chart update complete');
}
}
}
diff --git a/src/src.zip b/src/src.zip
index 42d78fd..6128211 100644
Binary files a/src/src.zip and b/src/src.zip differ