Update README.md

This commit is contained in:
Alexander Rosenberg 2024-12-09 13:31:56 -08:00
parent 9b8584bd6f
commit f702251949
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
2 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,10 @@
# cl-quantum # cl-quantum
This is just some experiments with quantum computing emulation that I am doing `cl-quantum` is a quantum circuit simulator for common lisp. It also has a basic
for a school project. vector and matrix algebra library included. `cl-quantum` has external
requirements to use the main simulator, however, `cl-ppcre` is required to parse
back pretty-printed states. `cl-quantum` has been tested with SBCL 2.4.9 on
ArchLinux and was able to perform a simple Grover's search algorithm with 11
qbits in about 5 minutes.
I wrote this for a final project for my PHYSICS-103 class a LACC.

View File

@ -16,10 +16,10 @@ bits and finds when the state is equal to TARGET."
;; Setup ;; Setup
(loop for i below bits do (:h i)) (loop for i below bits do (:h i))
;; Oracle
(loop (loop
repeat (count-grover-iterations bits 1) repeat (count-grover-iterations bits 1)
do do
;; Oracle
(loop for i below bits (loop for i below bits
for cur = (logand (ash target (- i)) 1) for cur = (logand (ash target (- i)) 1)
when (zerop cur) when (zerop cur)