Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible data leakage in quantum/docs/tutorials /quantum_data.ipynb #828

Open
OkuyanBoga opened this issue Dec 9, 2024 · 0 comments · May be fixed by #829
Open

Possible data leakage in quantum/docs/tutorials /quantum_data.ipynb #828

OkuyanBoga opened this issue Dec 9, 2024 · 0 comments · May be fixed by #829
Labels
area/docs Concerns documentation – problems, ideas, requests kind/bug-report Something doesn't seem to work

Comments

@OkuyanBoga
Copy link

Hi all,

I think there is a possible data leakage in quantum data tutorial in

"S_pqk, V_pqk = get_spectrum(\n",
" tf.reshape(tf.concat([x_train_pqk, x_test_pqk], 0), [-1, len(qubits) * 3]))\n",
"\n",
"S_original, V_original = get_spectrum(\n",
" tf.cast(tf.concat([x_train, x_test], 0), tf.float32), gamma=0.005)\n",
"\n",
"print('Eigenvectors of pqk kernel matrix:', V_pqk)\n",
"print('Eigenvectors of original kernel matrix:', V_original)"

when calculating

" S, V = tf.linalg.eigh(KC_qs)\n",

train and test data are concatenated in these calculations. I think it is wrong, and those should be separately calculated for each.

@mhucka mhucka added kind/bug-report Something doesn't seem to work area/docs Concerns documentation – problems, ideas, requests labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Concerns documentation – problems, ideas, requests kind/bug-report Something doesn't seem to work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants