@@ -62,6 +62,20 @@ cc_library(
6262 ],
6363)
6464
65+ cc_library (
66+ name = "cuda" ,
67+ data = [
68+ "@local_config_cuda//cuda:cudart" ,
69+ ],
70+ linkopts = [
71+ "-Wl,-rpath,../local_config_cuda/cuda/lib64" ,
72+ "-Wl,-rpath,../local_config_cuda/cuda/extras/CUPTI/lib64" ,
73+ ],
74+ deps = [
75+ "@local_config_cuda//cuda:cudart" ,
76+ ],
77+ )
78+
6579# Full qsim library, including CUDA
6680cuda_library (
6781 name = "qsim_cuda_lib" ,
@@ -125,6 +139,81 @@ cuda_library(
125139 "vectorspace.h" ,
126140 "vectorspace_cuda.h" ,
127141 ],
142+ deps = [
143+ ":cuda" ,
144+ "@local_config_cuda//cuda:cuda_headers" ,
145+ ]
146+ )
147+
148+ # Full qsim library, including cuQuantum
149+ cuda_library (
150+ name = "qsim_cuquantum_lib" ,
151+ hdrs = [
152+ "bits.h" ,
153+ "bitstring.h" ,
154+ "channel.h" ,
155+ "channels_cirq.h" ,
156+ "circuit_noisy.h" ,
157+ "circuit_qsim_parser.h" ,
158+ "circuit.h" ,
159+ "expect.h" ,
160+ "formux.h" ,
161+ "fuser.h" ,
162+ "fuser_basic.h" ,
163+ "fuser_mqubit.h" ,
164+ "gate.h" ,
165+ "gate_appl.h" ,
166+ "gates_cirq.h" ,
167+ "gates_qsim.h" ,
168+ "hybrid.h" ,
169+ "io_file.h" ,
170+ "io.h" ,
171+ "matrix.h" ,
172+ "mps_simulator.h" ,
173+ "mps_statespace.h" ,
174+ "parfor.h" ,
175+ "qtrajectory.h" ,
176+ "run_qsim.h" ,
177+ "run_qsimh.h" ,
178+ "seqfor.h" ,
179+ "simmux.h" ,
180+ "simmux_gpu.h" ,
181+ "simulator.h" ,
182+ "simulator_avx.h" ,
183+ "simulator_avx512.h" ,
184+ "simulator_basic.h" ,
185+ "simulator_sse.h" ,
186+ "simulator_custatevec.h" ,
187+ "statespace_avx.h" ,
188+ "statespace_avx512.h" ,
189+ "statespace_basic.h" ,
190+ "statespace_sse.h" ,
191+ "statespace_custatevec.h" ,
192+ "statespace.h" ,
193+ "umux.h" ,
194+ "unitaryspace.h" ,
195+ "unitaryspace_avx.h" ,
196+ "unitaryspace_avx512.h" ,
197+ "unitaryspace_basic.h" ,
198+ "unitaryspace_sse.h" ,
199+ "unitary_calculator_avx.h" ,
200+ "unitary_calculator_avx512.h" ,
201+ "unitary_calculator_basic.h" ,
202+ "unitary_calculator_sse.h" ,
203+ "util.h" ,
204+ "util_cpu.h" ,
205+ "util_cuda.h" ,
206+ "util_custatevec.h" ,
207+ "vectorspace.h" ,
208+ "vectorspace_cuda.h" ,
209+ ],
210+ copts = ["-D__CUSTATEVEC__" ],
211+ deps = [
212+ ":cuda" ,
213+ "@local_config_cuda//cuda:cuda_headers" ,
214+ "@local_config_cuquantum//:cuquantum_headers" ,
215+ "@local_config_cuquantum//:libcuquantum" ,
216+ ],
128217)
129218
130219# Library to run qsim with qsim circuit parser and parallel `for`
@@ -248,6 +337,11 @@ cuda_library(
248337 hdrs = ["util_cuda.h" ],
249338)
250339
340+ cuda_library (
341+ name = "util_custatevec" ,
342+ hdrs = ["util_custatevec.h" ],
343+ )
344+
251345### Input/output libraries ###
252346
253347cc_library (
@@ -469,6 +563,18 @@ cuda_library(
469563 ],
470564)
471565
566+ cuda_library (
567+ name = "statespace_custatevec" ,
568+ hdrs = [
569+ "statespace_custatevec.h" ,
570+ ],
571+ deps = [
572+ ":statespace" ,
573+ ":util_custatevec" ,
574+ ":vectorspace_cuda" ,
575+ ],
576+ )
577+
472578### Simulator libraries ###
473579
474580cc_library (
@@ -526,6 +632,19 @@ cuda_library(
526632 ],
527633)
528634
635+ cuda_library (
636+ name = "simulator_custatevec" ,
637+ hdrs = [
638+ "simulator_custatevec.h" ,
639+ "simulator_custatevec_kernels.h" ,
640+ ],
641+ deps = [
642+ ":bits" ,
643+ ":statespace_custatevec" ,
644+ ":util_custatevec" ,
645+ ],
646+ )
647+
529648# All three state-vector simulators with multiplexer
530649cc_library (
531650 name = "simulator" ,
0 commit comments