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

update registerhandling to use i1* pointer #61

Merged
merged 11 commits into from
Aug 9, 2023
Merged

Conversation

cqc-melf
Copy link
Collaborator

@cqc-melf cqc-melf commented Aug 7, 2023

No description provided.

@cqc-melf cqc-melf force-pushed the feature/regpointer branch 5 times, most recently from e6ec0b1 to 31a0ede Compare August 7, 2023 10:04
@cqc-melf cqc-melf marked this pull request as ready for review August 8, 2023 16:25
@cqc-melf
Copy link
Collaborator Author

cqc-melf commented Aug 8, 2023

The discussed changes for the classical register handling

Copy link
Member

@qartik qartik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we talked about settling on better names for the API functions. I have left some suggestions. Perhaps it makes sense to list them out all together:

i1*  create_creg      (i64 size                     )
void set_creg_to_int  (i1* creg, i64 value          )
i64  get_int_from_creg(i1* creg                     )
void set_creg_bit     (i1* creg, i64 index, i1 value)
i1   get_creg_bit     (i1* creg, i64 index          )

Note that in the backend compiler, a notion of creg is prevalent so perhaps it makes sense to also use it for this API.

I am open to hear about other suggestions. cc: @peter-campora

pytket/qir/conversion/conversion.py Outdated Show resolved Hide resolved
pytket/qir/conversion/conversion.py Outdated Show resolved Hide resolved
pytket/qir/conversion/conversion.py Outdated Show resolved Hide resolved
pytket/qir/conversion/conversion.py Outdated Show resolved Hide resolved
pytket/qir/conversion/conversion.py Outdated Show resolved Hide resolved
@cqc-melf
Copy link
Collaborator Author

cqc-melf commented Aug 9, 2023

I think we talked about settling on better names for the API functions. I have left some suggestions. Perhaps it makes sense to list them out all together:

i1*  create_creg      (i64 size                     )
void set_creg_to_int  (i1* creg, i64 value          )
i64  get_int_from_creg(i1* creg                     )
void set_creg_bit     (i1* creg, i64 index, i1 value)
i1   get_creg_bit     (i1* creg, i64 index          )

Note that in the backend compiler, a notion of creg is prevalent so perhaps it makes sense to also use it for this API.

I am open to hear about other suggestions. cc: @peter-campora

I have done a search and replace as suggested, I have replaced that in all of the ll files for the tests as well.

See @cqc-melf
rename functions as suggested
867e2a8

And @cqc-melf
rename reg to creg in comments
3a4cfdd

@cqc-melf cqc-melf requested a review from qartik August 9, 2023 06:52
Copy link
Member

@qartik qartik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the careful changes!

@cqc-melf cqc-melf merged commit 026a07c into develop Aug 9, 2023
7 checks passed
@qartik qartik mentioned this pull request Oct 24, 2023
@qartik qartik deleted the feature/regpointer branch February 7, 2024 22:57
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.

3 participants