openqasm / qe-compiler

An MLIR based compiler dynamic circuit compiler for real-time control systems supporting OpenQASM 3
Other
38 stars 12 forks source link

Update getPhaseValue to return an mlir::Value. #304

Closed kitbarton closed 3 months ago

kitbarton commented 3 months ago

This PR changes the return value of the Pulse utility method getPhaseValue() to return an mlir::Value instead of a double. This is necessary when using parameters, as the phase offset can be specified as a parameter value in addition to a compile time constant. By returning the mlir::Value, the caller of phaseOffset has the ability to differentiate between the two scenarios and act accordingly.