function Quant_mtx = Compute_Quant_mtx(User,Chn,Sim,Cells,Num_Cell,BS)


Quant_mtx = zeros(Sim.Num_BS * Sim.Num_Cell, Sim.Num_BS * Sim.Num_Cell);

Quant_wgt =  zeros(Sim.Num_BS * Sim.Num_Cell, 1);
for m = 1:Num_Cell
    for b = 1:Sim.Num_BS
        idx = (m-1)*Sim.Num_BS + b;
        
        Quant_wgt(idx) = BS(m,b).quant_wgt;
        
    end
end




for l = 1:Num_Cell
    for ik = 1:length(Cells(l).Scheduled_User)
        k = Cells(l).Scheduled_User(ik);
        
        h = Get_Chn(Chn, User(l,k).ServingCluster, l, k, Sim) * User(l,k).beam_rx;
        
        Quant_vec = real(h.*conj(h)) * User(l,k).wgt_mse .* Quant_wgt;
        
        Quant_mtx = Quant_mtx + diag(Quant_vec);
        
    end
end

Quant_mtx = Quant_mtx * Sim.snr_gap;