Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented one, two, and three bit quantum gates
Added a source file for testing Created a Makefile for the project Modified the quantum_reg to contain an arraylist of quantum_state structs
- Loading branch information
Showing
7 changed files
with
349 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
CC=gcc | ||
CFLAGS=-g | ||
LDFLAGS=-lm | ||
|
||
all: libquantum.a | ||
|
||
libquantum.a: complex.o quantum_reg.o quantum_gates.o | ||
ar rcs libquantum.a complex.o quantum_reg.o quantum_gates.o | ||
|
||
complex.o: complex.c complex.h | ||
$(CC) $(CFLAGS) -c complex.c | ||
|
||
quantum_reg.o: quantum_reg.c quantum_reg.h | ||
$(CC) $(CFLAGS) -c quantum_reg.c | ||
|
||
quantum_gates.o: quantum_gates.c quantum_gates.h complex.h | ||
$(CC) $(CFLAGS) -c quantum_gates.c | ||
|
||
test: libquantum.a test.c complex.h quantum_reg.h quantum_gates.h | ||
$(CC) $(CFLAGS) $(LDFLAGS) -o test test.c libquantum.a | ||
|
||
clean: | ||
rm test libquantum.a *.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.