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

Handle non-real non-symbolic expressions in eval_expr() #273

Merged
merged 3 commits into from
Mar 3, 2022

Conversation

cqc-alec
Copy link
Collaborator

@cqc-alec cqc-alec commented Mar 3, 2022

Even though non-physical, there is no reason to disallow non-real parameters in operations. The current code already allows such operations to be included in circuits; the problem is that it then throws exceptions when evaluating them. This patch catches those exceptions, so that eval_expr() returns std::nullopt as expected.

@cqc-alec cqc-alec requested a review from lmondada March 3, 2022 15:18
@cqc-alec cqc-alec merged commit 18b888d into develop Mar 3, 2022
@cqc-alec cqc-alec deleted the bugfix/complexpr branch March 3, 2022 19:14
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.

2 participants