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

Check types and do casting in classical declarations #205

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

jlapeyre
Copy link
Collaborator

Implement checking compatibility of types of lhs and rhs in classical assignment statement. If an implicit cast is needed, add an explicit cast.

Prior to this commit there was essentially nothing in place to do these things (just a very small amount, and broken at that). This is certainly not the end of the story. There will be edge cases. But this is a good start which should capture many common scenarios.

Since we are developing quickly and writing tests for this ASG is very tedious and verbose, we have not been testing very carefully. However, the kind of thing done in this commit is inherently fragile, so we need to begin with more testing.

Closes #203

Implement checking compatibility of types of lhs and rhs in classical
assignment statement. If an implicit cast is needed, add an explicit
cast.

Prior to this commit there was essentially nothing in place to do
these things (just a very small amount, and broken at that). This is
certainly not the end of the story. There will be edge cases. But this
is a good start which should capture many common scenarios.

Since we are developing quickly and writing tests for this ASG is
very tedious and verbose, we have not been testing very carefully.
However, the kind of thing done in this commit is inherently fragile,
so we need to begin with more testing.

Closes Qiskit#203
@jlapeyre jlapeyre merged commit 88de376 into Qiskit:main Mar 28, 2024
7 checks passed
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.

Type checking and casting in classical declaration statements
1 participant