Skip to content

add Challenge 7 [unitaryHACK]#39

Merged
amirebrahimi merged 16 commits into
qosf:mainfrom
MaldoAlberto:main
Jun 14, 2021
Merged

add Challenge 7 [unitaryHACK]#39
amirebrahimi merged 16 commits into
qosf:mainfrom
MaldoAlberto:main

Conversation

@MaldoAlberto

Copy link
Copy Markdown
Collaborator

I added a problem proposal for challenge 7 by UnitaryHack, likewise for tasks 3 and 4 I made a private repository with the solution.

@MaldoAlberto MaldoAlberto changed the title add Challenge 7 add Challenge 7 [unitaryHACK] May 30, 2021
@diemilio

diemilio commented Jun 2, 2021

Copy link
Copy Markdown
Collaborator

Thanks for your submission @MaldoAlberto. By looking at your proposal, it would seem to me this problem is almost identical to challenge #2, but, where instead of finding the min Hamming distance, you're basically finding two identical bit-strings. Wouldn't this make what you're proposing a subset of a problem we have already explored?

Thanks!

@MaldoAlberto

Copy link
Copy Markdown
Collaborator Author

Hi @diemilio ! the objective of this proposal is to find a way to design a general circuit independent of the number of inputs, although if it is very similar, it would be as the next step since it considered the time of 4 hours, it would be the goal to see that they are sought or identified as a design pattern to solve general problems. I can still change the theme if they do not consider it correct. I wait for your comments and opinions 😄

@diemilio

diemilio commented Jun 3, 2021

Copy link
Copy Markdown
Collaborator

Thanks for the response @MaldoAlberto. Yes, I think the problem is too similar to challenge 2, so perhaps a different theme would be better.

@amirebrahimi

Copy link
Copy Markdown
Collaborator

@MaldoAlberto, if you'd still like to make use of Grover's algorithm, then perhaps this article might provide some inspiration.

Besides what @diemilio mentioned, I think the challenge should be more than just implementing one of the standard algorithms (Grover's, BV, Shor's), since there are already so many implementations out there. Based on what I saw in your submission it seems to be the most straightforward way to use Grover's algorithm.

A few more things worth mentioning:

  • The numbers seem somewhat arbitrary, so it might be worth explaining why these choices were made (e.g. n is only 2 or 4? why not 3? Values from 0 to 32 -- how come?). Instead you could have some code to generate a sample based on a seed or just state that you need to handle an array of size n with values ranging from 0 to k, where you have specified n and k. It's okay to show examples, but probably not necessary to fix the numbers specifically.
  • Double-check for typos - In example 2, number 55 is mentioned, but isn't in the list
  • Your PR has removed files from other challenge directories. Please don't do that or modify the original challenge files.

@MaldoAlberto

Copy link
Copy Markdown
Collaborator Author

@diemilio and @amirebrahimi Thank you very much for your observations, in fact, I am thinking about the implementation of the nearest neighbor, its implementation with the iris dataset, and proposing a solution scheme, on the other hand, @amirebrahimi you are right I saw that I had a conflict in the challenge 4 so I think this error, I will modify it to reverse that part thank you very much for your advice and observations if you think it is relevant I will make the proposal and the solution 😃

@amirebrahimi

Copy link
Copy Markdown
Collaborator

@MaldoAlberto - by nearest neighbor, do you mean k-nearest neighbor (kNN) and what would be an equivalent qkNN? If so, then there is already a paper that does that and a related pennylane demo that works with the Iris dataset. What do you find particularly interesting about this challenge? Is there a way you could vary it up by using a different dataset or revealing something interesting about a nearest-neighbor approach between classical and quantum?

@MaldoAlberto

Copy link
Copy Markdown
Collaborator Author

@amirebrahimi The pennylane proposal is a variational circuit, the proposal of the article you mention is the proposal of centroids, other it could be using the Euclidean distance using the swap test, for the idea to use few qubits I suggest the iris dataset, but it could use the MNIST or another data set, and it would be to consider as you say the advantages of each one with respect to the classical part.

@amirebrahimi

amirebrahimi commented Jun 5, 2021

Copy link
Copy Markdown
Collaborator

We discussed as a group and are open to you pursuing this challenge further. Feel free to run any early drafts by us. There are a few concerns about how easy this might end up being with the use of a swap test, so consider either not mentioning some of these in the challenge and/or adding restrictions on how to solve the problem.

@crazy4pi314

Copy link
Copy Markdown

Hey @MaldoAlberto and the QOSF team! I wanted to let folks know I am extending the unitaryHACK deadline till the end of this week for PRs that were already in progress to give some time to iterate with maintainers. Let me know if you have questions, or if I can be of help in getting this issue closed!

@MaldoAlberto

Copy link
Copy Markdown
Collaborator Author

Hi @amirebrahimi I have just uploaded the new version of my work proposal using the k-nn with the swap test, I look forward to your comments and feedback.

@amirebrahimi

amirebrahimi commented Jun 11, 2021

Copy link
Copy Markdown
Collaborator

Hi @MaldoAlberto. You are close, but there are a few improvements needed:

  1. Please explain what the k represents in k-NN.
  2. In the task definition, please clarify what 1-nn, 3-nn, 5-nn, 7-nn mean, possibly with an example, or re-word as "perform a k-NN classification with k = 1, 3, 5, and 7". Also, why have you chosen these specific k values?
  3. Please define what a “class” is.
  4. Maybe provide an example? For a newcomer, all these concepts will be rather vague if not explained in detail.
  5. Provide links to the MNIST dataset, and GOOD detailed references on how to access that data (port into, let’s say a numpy matrix). Maybe something like this, for python users?
  6. You mention, "decrease the number of qubits that can hold the image information (using a classical preprocessing)." I haven't gone through your references, but have you listed any that can help with that as this will be key to completing the challenge? This might even be a good first subtask prior to completing the classification part. For more guidelines, see "Task 2" from this month's challenge doc
  7. Please clarify what “Consider more classes” means, following naturally from defining what a class is.
  8. Rename "References" to "Resources", unless you want to specifically refer to the numbered references in the body of your document. For an example distinguishing the two, take a look at [this previous challenge(https://github.com/qosf/monthly-challenges/blob/main/challenge-05/qosf-monthly-challenge-05.ipynb)
  9. If you can add links directly to your references that would be preferred to save people time from having to search for them.

@MaldoAlberto

Copy link
Copy Markdown
Collaborator Author

Hi, @amirebrahimi I added to the explanation of the k, why the use of 1,3,5,7.

I added the section of references of the concepts that are given in the background.

I added the section of resources and their links, in the same way, I made reference to the challenge 05 since this can help to reduce the number of qubits.

I added some links of how to obtain the dataset (for example TensorFlow) and the source in case of downloading it.

I wait for your comments and opinions 😄

@amirebrahimi

Copy link
Copy Markdown
Collaborator

LGTM @MaldoAlberto. There are a few small fixes (e.g. using markdown for images rather than IPython), but I can make those. Thanks for the contribution!

@amirebrahimi amirebrahimi merged commit 94344b7 into qosf:main Jun 14, 2021
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

Successfully merging this pull request may close these issues.

4 participants