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

Waiters Feedback #150

Closed
wants to merge 0 commits into from
Closed

Waiters Feedback #150

wants to merge 0 commits into from

Conversation

hanakl
Copy link

@hanakl hanakl commented Sep 10, 2024

This is mostly proof-of-concept to make sure that I'm on the right track. The main idea is to create an empty resource (Store from ConcurrentSim) when condition is not met, followed by !take. This information is saved in waiters field in register, and !tag (and !untag) checks whether relevant conditions are met after tag has been changed, and push the corresponding qbit (slot).

Here are a few questions/problems that I wanted to address:

  1. How expensive is it to make a query? Currently, waiters is a nested dictionary; the keys are tags, and the values are dictionaries mapping tuples of queries (functions) and their arguments to lists of Stores waiting on those queries. I wanted to minimize the number of queries made by only checking ones that are relevant to the tag that is being changed. Using a lock instead of a Store might be beneficial since only one lock would be needed per query, though I think this approach would require re-running the query.

  2. In the example protocol, saving the query along with its arguments feels a bit awkward. I wanted to implement something that could handle any queries, but I think since prot is not accessible in tag! , passing the arguments directly isn't possible. Implementing this waiter feature for specific tags (the ones in current protocols) might be easier. Do you think this is the right direction?

  3. As I'm relatively new to Julia, I realize my syntax may be incorrect or awkward. I expect to resolve most of these issues once I can run the code, but I'd appreciate any feedback on obvious mistakes or good practices I might be missing.

Thanks a lot for your help!

@hanakl hanakl closed this Sep 10, 2024
@hanakl hanakl reopened this Sep 10, 2024
@hanakl hanakl closed this Sep 10, 2024
@hanakl hanakl deleted the waiters branch September 10, 2024 03:09
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.

1 participant