[go: nahoru, domu]

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

Equation of Geometric Difference #6

Open
Squigspear opened this issue Mar 14, 2023 · 1 comment
Open

Equation of Geometric Difference #6

Squigspear opened this issue Mar 14, 2023 · 1 comment

Comments

@Squigspear
Copy link

Hi,

I would like to clarify the following code that was used to implement geometric difference from the paper: "The power of data in quantum machine learning".

def calculate_geometric_difference(k_1, k_2, normalization_lambda=0.001):
"""
Calculate the geometric difference g(K_1 || K_2), which is equation F9 in
"The power of data in quantum machine learning" (https://arxiv.org/abs/2011.01938)
and characterize the separation between classical and quantum kernels.
Args:
k_1: Quantum kernel Gram matrix
k_2: Classical kernel Gram matrix
normalization_lambda: normalization factor, must be close to zero
Returns:
geometric difference between the two kernel functions (float).
"""

In the paper, geometric difference between classical and quantum (gcq ) is defined with k1 = classical kernel and k2 = quantum kernel. However, in your code implementation, k1 is quantum and k2 is classical. As the equation is asymmetric to the order of the matrices k1 and k2, could there be an error in the code implementation?

Thanks for taking the time to read this!

@Fradm98
Copy link
Collaborator
Fradm98 commented May 31, 2023

Hi @Squigspear, thanks for your insight, we fixed this issue in the branch package, we are going soon to merge it to the main one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants