mirror of
https://github.com/libquantum/libquantum.git
synced 2025-10-03 08:42:01 +00:00
updated libquantum 0.2.4 source files
This commit is contained in:
17
quantum.h.in
17
quantum.h.in
@@ -1,6 +1,6 @@
|
||||
/* quantum.h: Header file for libquantum
|
||||
|
||||
Copyright 2003, 2004 Bjoern Butscher, Hendrik Weimer
|
||||
Copyright 2003-2005 Bjoern Butscher, Hendrik Weimer
|
||||
|
||||
This file is part of libquantum
|
||||
|
||||
@@ -28,22 +28,11 @@
|
||||
#define COMPLEX_FLOAT @CF_TYPE@
|
||||
#define MAX_UNSIGNED @MU_TYPE@
|
||||
|
||||
#define quantum_density_wrapper_ubt(reg, ctl, ...) \
|
||||
quantum_unbounded_toffoli(ctl, reg, __VA_ARGS__)
|
||||
|
||||
#define quantum_density_operation(function, rho, ...) \
|
||||
do{ \
|
||||
int quantum_int; \
|
||||
if ((void *) function == quantum_unbounded_toffoli) \
|
||||
{ \
|
||||
for(quantum_int=0; quantum_int < rho.num; quantum_int++) \
|
||||
quantum_density_wrapper_ubt(&rho.reg[quantum_int], __VA_ARGS__); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
for(quantum_int=0; quantum_int < rho.num; quantum_int++) \
|
||||
function(__VA_ARGS__, &rho.reg[quantum_int]); \
|
||||
} \
|
||||
for(quantum_int=0; quantum_int < rho.num; quantum_int++) \
|
||||
function(__VA_ARGS__, &rho.reg[quantum_int]); \
|
||||
} while(0)
|
||||
|
||||
/* A ROWS x COLS matrix with complex elements */
|
||||
|
Reference in New Issue
Block a user