Problem with 'quantum_density_operation'
Bjoern Butscher
bjoern at epith.de
Fri Jan 7 21:11:20 CET 2005
On Friday 07 January 2005 20:18, Bjoern Butscher wrote:
> So if you want the hadamard-operation to act on the first qubit, just
> change line 24 to
> quantum_density_operation (quantum_hadamard, ro, 0) ;
>
> or, if you want it to act on the second qubit, try
>
> quantum_density_operation (quantum_hadamard, ro, 1) ;
>
>
> I didn't try this for quantum_hadamard, but using quantum_cnot it worked
> for me.
Now I tried this also with quantum_hadamard, but I got another error.
Try to apply the two attached patches using
cd .../quantum/lib
patch -p 1 < diff1.txt
patch -p 1 < diff2.txt
and reinstall the library.
Alternatively, you could wait until a new version is released (should be this
weekend).
Bjoern
-------------- next part --------------
--- old/quantum.h.in 2004-12-31 12:33:56.000000000 +0100
+++ new/quantum.h.in 2005-01-07 21:04:07.000000000 +0100
@@ -29,7 +29,7 @@
#define MAX_UNSIGNED @MU_TYPE@
#define quantum_density_wrapper_ubt(reg, ctl, ...) \
-quantum_unbounded_toffoli(ctl, reg, __VA_ARGS__)
+quantum_unbounded_toffoli(ctl, reg, ##__VA_ARGS__)
#define quantum_density_operation(function, rho, ...) \
do{ \
-------------- next part --------------
--- old/density.h 2004-12-31 12:33:56.000000000 +0100
+++ new/density.h 2005-01-07 20:52:10.000000000 +0100
@@ -28,7 +28,7 @@
#include "qureg.h"
#define quantum_density_wrapper_ubt(reg, ctl, ...) \
-quantum_unbounded_toffoli(ctl, reg, __VA_ARGS__)
+quantum_unbounded_toffoli(ctl, reg, ##__VA_ARGS__)
#define quantum_density_operation(function, rho, ...) \
do{ \
More information about the libquantum-users
mailing list