Skip to content

Commit 5da96ec

Browse files
authored
Merge pull request #37 from PESchoenberg/develop
Develop
2 parents 87fde0b + c8c15f0 commit 5da96ec

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

g2q1.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
(display "4 - ibmqx_real.")
9494
(newline)
9595
(set! res1 (read))
96+
; Not elegant, but works for now.
9697
(if (< res1 0)(set! res1 0))
9798
(if (> res1 4)(set! res1 0))
9899
(if (= res1 0)(set! res "none"))

g2q2.scm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@
260260
; - p_l3: quantum register name 3.
261261
; - p_y3: target qubit 3.
262262
;
263+
; Sources:
264+
; - https://quantumcomputing.stackexchange.com/questions/2177/how-can-i-implement-an-n-bit-toffoli-gate
265+
; - http://www.cs.princeton.edu/courses/archive/fall04/cos576/papers/bennett73.html
266+
; - Elementary gates for quantum computation - Barenco, Bennet et al. (1995) - https://arxiv.org/pdf/quant-ph/9503016.pdf
267+
;
263268
(define (ccx p_l1 p_y1 p_l2 p_y2 p_l3 p_y3)
264269
(g1 "h" p_l3 p_y3)
265270
(cx p_l2 p_y2 p_l3 p_y3)

g2q3.scm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,10 @@
144144
; - p_qpu: qpu for which the declaration is intended for.
145145
; - p_d: declaration in the form of a string.
146146
;
147-
; Otput:
147+
; Output:
148148
; - A commented-out string that will be placed in compiled QADM2 code.
149149
;
150150
(define (qdeclare p_qpu p_d)
151151
(qcomm (strings-append (list "qdeclare " p_qpu " " p_d) 0)))
152152

153153

154-

0 commit comments

Comments
 (0)