summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/libquantum/distinfo3
-rw-r--r--misc/libquantum/patches/patch-aa36
2 files changed, 38 insertions, 1 deletions
diff --git a/misc/libquantum/distinfo b/misc/libquantum/distinfo
index 68d105bcfe8..ed8f59a7277 100644
--- a/misc/libquantum/distinfo
+++ b/misc/libquantum/distinfo
@@ -1,4 +1,5 @@
-$NetBSD: distinfo,v 1.1 2005/02/01 20:52:38 augustss Exp $
+$NetBSD: distinfo,v 1.2 2005/02/02 11:22:42 augustss Exp $
SHA1 (libquantum-0.2.4.tar.gz) = dbd76434b7d4026db96aedcd16ae4cd01fb341cd
Size (libquantum-0.2.4.tar.gz) = 211403 bytes
+SHA1 (patch-aa) = 734170cbc1a30815e89311f0a2d2df5a8d30b3d2
diff --git a/misc/libquantum/patches/patch-aa b/misc/libquantum/patches/patch-aa
new file mode 100644
index 00000000000..e6ef630fead
--- /dev/null
+++ b/misc/libquantum/patches/patch-aa
@@ -0,0 +1,36 @@
+*** measure.c.old Tue Jan 11 22:12:21 2005
+--- measure.c Wed Feb 2 12:17:54 2005
+***************
+*** 39,45 ****
+ double
+ quantum_frand()
+ {
+! return (double) rand() / RAND_MAX;
+ }
+
+ /* Measure the contents of a quantum register */
+--- 39,45 ----
+ double
+ quantum_frand()
+ {
+! return (double) random() / RAND_MAX;
+ }
+
+ /* Measure the contents of a quantum register */
+***************
+*** 64,70 ****
+ result. Otherwise, continue with the next base state. */
+
+ r -= quantum_prob_inline(reg.node[i].amplitude);
+! if(quantum_prob_inline(reg.node[i].amplitude) >= r)
+ return reg.node[i].state;
+ }
+
+--- 64,70 ----
+ result. Otherwise, continue with the next base state. */
+
+ r -= quantum_prob_inline(reg.node[i].amplitude);
+! if(0 >= r)
+ return reg.node[i].state;
+ }
+