(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))