Users of quil-rs can use InstructionHandler to override how instructions are associated with frames, but this is not considered by Program::into_simplified. This PR adds a method, InstructionHandler::simplify_program, that uses the frame matching of InstructionHandler to determine which frames to retain in the program.
Users of
quil-rs
can useInstructionHandler
to override how instructions are associated with frames, but this is not considered byProgram::into_simplified
. This PR adds a method,InstructionHandler::simplify_program
, that uses the frame matching ofInstructionHandler
to determine which frames to retain in the program.