Problem with 'quantum_density_operation'

Jaroslaw Miszczak miszczak at iitis.gliwice.pl
Fri Jan 7 15:31:11 CET 2005


Hi,
I have started using libquantum and I have problem with
'quantum_density_operation' macro.

Here is the source:
--- starts here
      1 #include <quantum.h>
      2 #include <stdio.h>
      3 () {
      4 int main() { ro;
      5   quantum_density_op ro;
      6   quantum_reg x, y, z;
      7 ts = 3;
      8   int qbts = 3;
      9   quantum_reg tab[3];0.4};
     10   float prbs[3] = {0.1, 0.5, 0.4};
     11 antum_new_qureg(1,2);
     12   x = quantum_new_qureg(1,2);
     13   y = quantum_new_qureg(0,2);
     14   z = quantum_new_qureg(2,2);
     15   tab[0] = x;
     16   tab[1] = y;
     17   tab[2] = z;
     18 uantum_new_density_op (qbts,prbs,tab);
     19   ro = quantum_new_density_op (qbts,prbs,tab);
     20   puts("Initial density operator");
     21   quantum_print_density_matrix (&ro);
     22 m_set_decoherence(0.1);
     23   quantum_set_decoherence(0.1);damard, ro ) ;
     24   quantum_density_operation (quantum_hadamard, ro ) ;
     25   quantum_print_density_matrix (&ro);
     26   return(0);
     27 }
--- end

After compilation I get error:
$ gcc -lquantum -o dmop dmop.c -Wall
dmop.c: In function `main':
dmop.c:24: error: syntax error before ',' token
dmop.c:24: error: syntax error before ',' token

and line 24 after preprocessing is
--cut
do{ int quantum_int; if ((void *) quantum_hadamard ==
quantum_unbounded_toffoli) { for(quantum_int=0; quantum_int < ro.num;
quantum_int++) quantum_unbounded_toffoli(, &ro.reg[quantum_int], ); }
else { for(quantum_int=0; quantum_int < ro.num; quantum_int++)
quantum_hadamard(, &ro.reg[quantum_int]); } } while(0) ;
--cut

My compiler:
gcc (GCC) 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk) for i386
or
gcc (GCC) 3.3.4 (Debian 1:3.3.4-13) for sparc

Is it a bug??

--
Jaroslaw Miszczak
Research assistant
IITiS PAN
Gliwice, Baltycka 5
POLAND




More information about the libquantum-users mailing list