1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
| | (define-module (gnu packages quantum)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages commencement)
#:use-module (gnu packages lisp-check)
#:use-module (gnu packages lisp-xyz)
#:use-module (gnu packages maths)
#:use-module (guix build-system asdf)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix packages))
(define-public sbcl-magicl
(package
(name "sbcl-magicl")
(version "0.9.1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/quil-lang/magicl")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "0x9p55qin399jhr5md88nij8fv78b64xjhww7ys364pkjnx8ak9v"))))
(build-system asdf-build-system/sbcl)
(inputs (list sbcl-alexandria
sbcl-abstract-classes
sbcl-policy-cond
sbcl-interface
sbcl-static-vectors
sbcl-trivial-garbage
lapack
gfortran-toolchain
sbcl-fiasco))
(arguments
(list
#:phases #~(modify-phases %standard-phases
(add-after 'unpack 'fix-paths
(lambda* (#:key inputs #:allow-other-keys)
(let ((lapack (assoc-ref inputs "lapack")))
(substitute* "src/extensions/blas/load-libs.lisp"
(("libblas.so")
(string-append lapack "/lib/libblas.so")))
(substitute* "src/extensions/lapack/load-libs.lisp"
(("liblapack.so")
(string-append lapack "/lib/liblapack.so")))))))))
(synopsis "Matrix Algebra proGrams In Common Lisp")
(description "Matrix Algebra proGrams In Common Lisp by Rigetti Computing.
(née FLAIL: Finally, Linear Algebra In Lisp!)")
(home-page "https://github.com/quil-lang/magicl")
(license license:asl2.0)))
(define-public cl-magicl
(sbcl-package->cl-source-package sbcl-magicl))
(define-public sbcl-rpcq
(package
(name "sbcl-rpcq")
(version "3.10.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/rigetti/rpcq")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1bvppxlacvp0pfdbpn7ls1zxd127jacl225ds7lph5s8f8cyvf17"))))
(build-system asdf-build-system/sbcl)
(inputs (list sbcl-alexandria
sbcl-parse-float
sbcl-yason
sbcl-cl-ppcre
sbcl-pzmq
sbcl-cl-messagepack
sbcl-bordeaux-threads
sbcl-local-time
sbcl-uuid
sbcl-cl-syslog
sbcl-flexi-streams
sbcl-trivial-backtrace
sbcl-fiasco))
(synopsis
"RPC framework and message specification for rigetti Quantum Cloud Services")
(description
"The asynchronous RPC client-server framework and
message specification for Rigetti Quantum Cloud Services (QCS).
Implements an efficient transport protocol by using ZeroMQ (ZMQ) sockets
and MessagePack (msgpack) serialization.")
(home-page "https://github.com/rigetti/rpcq")
(license license:asl2.0)))
(define-public ecl-rpcq
(sbcl-package->ecl-package sbcl-rpcq))
(define-public cl-rpcq
(sbcl-package->cl-source-package sbcl-rpcq))
(define-public sbcl-cl-quil
(package
(name "sbcl-cl-quil")
(version "1.26.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/quil-lang/quilc")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1s99lk456sw9hhsx5cf3x9r97iw9s3ydqsd94zz3bjnq77wmkhz5"))))
(build-system asdf-build-system/sbcl)
(arguments
(list
;; Requires cyclic dependency with qvm
#:tests? #f))
(inputs (list sbcl-alexa
sbcl-cl-yacc
sbcl-alexandria
sbcl-parse-float
sbcl-abstract-classes
sbcl-split-sequence
sbcl-cl-algebraic-data-type
sbcl-cl-permutation
sbcl-trivial-garbage
sbcl-magicl
sbcl-global-vars
sbcl-salza2
sbcl-optima
sbcl-cl-grnm
sbcl-yason
sbcl-cl-heap
sbcl-queues))
(synopsis "The optimizing Quil compiler")
(description "Quil is the quantum instruction language,
originally developed at Rigetti Computing.
In Quil quantum algorithms are expressed using
Quil's standard gates and instructions")
(home-page "https://github.com/quil-lang/quilc")
(license license:asl2.0)))
(define-public cl-quil
(sbcl-package->cl-source-package sbcl-cl-quil))
(define-public sbcl-qvm
(package
(name "sbcl-qvm")
(version "1.17.2")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/quil-lang/qvm")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1cvmkqfcy7rv5jlim4kh4dvqhd3jk6mw1kwrphaqghjymrf72yp8"))))
(build-system asdf-build-system/sbcl)
(outputs '("out" "bin"))
(inputs (list sbcl-alexandria
sbcl-abstract-classes
sbcl-ieee-floats
sbcl-lparallel
sbcl-magicl
sbcl-trivial-garbage
sbcl-global-vars
sbcl-cffi
sbcl-static-vectors
sbcl-trivial-garbage
sbcl-cl-quil
sbcl-mt19937
sbcl-trivial-features
;; qvm-app
sbcl-command-line-arguments
sbcl-trivial-benchmark
sbcl-hunchentoot
sbcl-slime-swank
sbcl-cl-syslog))
(arguments
(list
#:asd-systems ''("qvm" "qvm-app")
;; Requires cyclic dependency with quilc
#:tests? #f
#:phases #~(modify-phases %standard-phases
(add-after 'unpack 'remove-git-dependency
(lambda _
(substitute* "app/src/qvm-app-version.lisp"
(("\\(git-hash '#:qvm-app\\)")
"\"unknown\""))))
(add-after 'create-asdf-configuration 'build-program
(lambda* (#:key outputs #:allow-other-keys)
(build-program (string-append (assoc-ref outputs "bin")
"/bin/qvm")
outputs
#:dependencies '("qvm-app")
#:entry-program '((qvm-app::asdf-entry-point))
#:compress? #t))))))
(synopsis "The high-performance and featureful Quil simulator")
(description
"This is the official Quil-Lang Quantum Virtual Machine (QVM),
a flexible and efficient simulator for Quil")
(home-page "https://github.com/quil-lang/qvm")
(license license:asl2.0)))
(define-public cl-qvm
(sbcl-package->cl-source-package sbcl-qvm))
|