Skip to content

Commit

Permalink
Ignoring ApplyIdleNoise for partial evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Vasilevsky committed Nov 7, 2024
1 parent 742aa32 commit 121bfaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions compiler/qsc_partial_eval/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,7 @@ impl<'a> PartialEvaluator<'a> {
| "AccountForEstimatesInternal"
| "BeginRepeatEstimatesInternal"
| "EndRepeatEstimatesInternal"
| "ApplyIdleNoise"
| "GlobalPhase" => Ok(Value::unit()),
// The following intrinsic functions and operations should never make it past conditional compilation and
// the capabilities check pass.
Expand Down
4 changes: 3 additions & 1 deletion compiler/qsc_partial_eval/src/management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ impl Backend for QuantumIntrinsicsChecker {
) -> Option<std::result::Result<Value, String>> {
match name {
"BeginEstimateCaching" => Some(Ok(Value::Bool(true))),
"EndEstimateCaching" | "GlobalPhase" | "ConfigurePauliNoise" => Some(Ok(Value::unit())),
"EndEstimateCaching" | "GlobalPhase" | "ConfigurePauliNoise" | "ApplyIdleNoise" => {
Some(Ok(Value::unit()))
}
_ => None,
}
}
Expand Down

0 comments on commit 121bfaa

Please sign in to comment.