deepvqe icon indicating copy to clipboard operation
deepvqe copied to clipboard

about the feature extraction

Open jackyyigao opened this issue 1 year ago • 3 comments

Hi, Xiaobin, the FE block in you implementation seems a kind of normalization to the complex spectra, could you help introduce the paper to describle it? Seems it's not the power law compressed complex spectra as mentioned in the deepVQE paper? thanks for any info.

jackyyigao avatar Aug 14 '24 07:08 jackyyigao

Hi, I think the codes below actually play the role of power law compressing.

x_mag = torch.sqrt(x[...,[0]]**2 + x[...,[1]]**2 + 1e-12)
x_c = torch.div(x, x_mag.pow(1-self.c) + 1e-12)

Actually, the codes are equal to such a version, which may be more intuitional.

x_mag = torch.sqrt(x[...,[0]]**2 + x[...,[1]]**2 + 1e-12)
x_c_mag = x_mag.pow(self.c)
x_c_real = x_c_mag * x[...,[0]] / (x_mag + 1e-12)
x_c_imag = x_c_mag * x[...,[1]] / (x_mag + 1e-12)
x_c = torch.cat([x_c_real, x_c_imag], dim=-1)

I hope I have clarified your confuse, If not, feel free to ask me.

Xiaobin-Rong avatar Aug 14 '24 08:08 Xiaobin-Rong

thank you very much for your so quick response! BTW, your latest work on GTCRN seems very promising for real-time implementation for commercial products. hope could will have change to communicate with you later.

jackyyigao avatar Aug 14 '24 10:08 jackyyigao

Thank you for your appreciation, and I'm glad to keep in touch with you

Xiaobin-Rong avatar Aug 14 '24 10:08 Xiaobin-Rong