(defpackage :cl-quantum/math (:documentation "Basic linear algebra subroutines used to implement the quantum operators.") (:use :cl) (:export #:domatrix #:mapmatrix #:matrixp #:minor #:cofactor #:det #:invert #:transpose #:norm #:*mm #:*mv #:*vm #:dot #:+mm #:+vv #:-mm #:-vv #:*ms #:*vs #:/ms #:/vs #:mconj #:vconj #:squarep #:singularp #:mtrace #:make-identity-matrix #:copy-matrix #:nswap-rows #:swap-rows #:nscale-row #:scale-row #:nreplace-row-with-sum #:replace-row-with-sum #:tensor-mm #:tensor-vv #:round-to-place #:round-vector #:round-matrix #:count-digits #:build-float #:mexp #:wholep #:mexpt #:matrix= #:vector=)) (defpackage :cl-quantum/state (:documentation "Functions for creating and applying quantum gates.") (:use :cl :cl-quantum/math) (:export #:define-constant #:+unset-projector+ #:+set-projector+ #:+identity-2x2+ #:+pauli-x-gate+ #:+pauli-y-gate+ #:+pauli-z-gate+ #:+hadamard-gate+ #:+phase-gate+ #:+pi/8-gate+ #:+cnot-gate+ #:+cz-gate+ #:+swap-gate+ #:+ccnot-gate+ #:normal-state-p #:normalize-state #:nnormalize-state #:state-bits #:make-zero-state #:make-normal-state #:make-uniform-normal-state #:bit-unset-index #:bit-set-index #:bit-probability #:nmeasure #:measure #:ncollapse #:collapse #:make-operator #:make-controlled-operator #:make-n-toffoli-operator #:make-n-controlled-z-operator #:replace-state #:apply-gate #:napply-gate #:apply-controlled-gate #:napply-controlled-gate)) (defpackage :cl-quantum/circuit (:documentation "High-level interface for building quantum circuits.") (:use :cl :cl-quantum/math :cl-quantum/state) (:export #:*circuit-measure-places* #:*circuit-operators* #:make-circuit #:add-to-circuit #:with-build-circuit #:run-circuit)) (defpackage :cl-quantum/pprint (:documentation "High-level interface for building quantum circuits.") (:use :cl :cl-quantum/math :cl-quantum/state) (:export #:pprint-complex #:pprint-format-bits #:pprint-format-linear #:pprint-state))