I am completely stuck when I am trying to put the value of 2D vector into another 2D vector. The code execution just exit. Putting a little extra code to make things more clear.
int data_size_val= 8;
int n_qubits_val = ceil(log2(data_size_val));
int n_states_val = pow(2, n_qubits_val);
vector<vector<float, aligned_allocator<float> >> source_phi;
vector<vector<float>> phi_val;
for(int i=0;i< n_states_val/2;i++){
vector<float> temp;
for(int j=0;j< n_qubits_val;j++){
temp.push_back(0);
}
phi_val.push_back(temp);
}
for(int i=0;i< n_states_val/2;i++){
for(int j=0;j< n_qubits_val;j++){
source_phi[i][j]= phi_val[i][j]; // This is where Code Exit execution
}
}
It would be really great if I can be helped to resolve this issue. I think, there is some problem with syntax of 2D vector "source_phi".