The multiplier number for a multi-bit op is not stored anywhere in the MultiBitOp class. Having this number available as a property would make handling the case in pytket-phir more elegant and efficient.
suggest the following:
class MultiBitOp(ClassicalEvalOp):
"""
An operation to apply a classical op multiple times in parallel.
"""
def __init__(self, op: ClassicalEvalOp, multiplier: int) -> None:
"""
Construct from a basic operation and a multiplier.
"""
@property
def basic_op(self) -> ClassicalEvalOp:
"""
Underlying bitwise op.
"""
@property
def multiplier(self) -> int:
"""
Number of times the multi-bit operation is applied.
"""
The multiplier number for a multi-bit op is not stored anywhere in the MultiBitOp class. Having this number available as a property would make handling the case in pytket-phir more elegant and efficient. suggest the following: