I have a structure like this
struct quantum_reg_struct
{
int width; /* number of qubits in the qureg */
int size; /* number of non-zero vectors */
int hashw; /* width of the hash array */
COMPLEX_FLOAT *amplitude;
};
typedef struct quantum_reg_struct quantum_reg;
quantum_reg reg;
If *amplitude is pointing to the start of array of type COMPLEX_FLOAT then I want to be able to store this in a an array of type Complex_float. Is it possible for me?
Secondly I need to understand the usage of -> operator. What happens if something like this is written .
reg->amplitude[1] *= -1;
amplitudeis pointing. Not*amplitude.