To support error detection and qubit reusing calculation in DM-Sim, it would be helpful to enable user-defined gates. It is necessary to let users define the unitary matrix for a quantum gate or a super-operator matrix for a quantum channel. According to the current capability, the user-defined gate and quantum channel are limited to 2 qubits at max.
In order to support noise on the user-defined quantum operations, the noise model may be injected separately from quantum gates. At this time, the separate injection of measurement error would be useful at the moment.