Skip to content

Commit

Permalink
using decimal value of waveform when visiting Record node to fix is…
Browse files Browse the repository at this point in the history
…sues with rounding. (#602)
  • Loading branch information
weinbe58 authored Sep 20, 2023
1 parent 56ee04f commit dcb475a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bloqade/codegen/common/assignment_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, assignments: Dict[str, numbers.Real] = {}):
def visit_record(self, ast: waveform.Record):
duration = ast.waveform.duration(**self.assignments)
var = ast.var
value = ast.waveform(duration, **self.assignments)
value = ast.waveform.eval_decimal(duration, **self.assignments)
self.assignments[var.name] = value
self.visit(ast.waveform)

Expand Down

0 comments on commit dcb475a

Please sign in to comment.