As a result of finding a bug in #19 where some gates would disregard the time argument during the b.add_gate, I made some changes to the code:
In qsoverlay/gate_functions.py, the functions X_gate, Y_gate, Z_gate, had_from_rot, CNOT_from_CZ, CRX_from_CZ failed to use the time parameter in a meaningful manner. I added the parameter to the tuple passed to circuit_builder.__lt__.
In qsoverlay/circuit_builder.py, in Builder.__lt__, I modified the conditions which verified the len(gate_desc), in order to make them support the usage of the time AND/OR return_flag. It however assumes that, if both flags are used, time should precede return_flags.
These changes should fix the bugs during the construction of circuit_builder circuits via the add_gate method. It is still necessary to add time support to other places where Builder.__lt__ is called. In the meantime, the changes I made shouldn't cause any conflict with those, however.
As a result of finding a bug in #19 where some gates would disregard the
time
argument during theb.add_gate
, I made some changes to the code:In
qsoverlay/gate_functions.py
, the functionsX_gate
,Y_gate
,Z_gate
,had_from_rot
,CNOT_from_CZ
,CRX_from_CZ
failed to use the time parameter in a meaningful manner. I added the parameter to the tuple passed tocircuit_builder.__lt__
.In
qsoverlay/circuit_builder.py
, inBuilder.__lt__
, I modified the conditions which verified thelen(gate_desc)
, in order to make them support the usage of thetime
AND/ORreturn_flag
. It however assumes that, if both flags are used,time
should precedereturn_flags
.These changes should fix the bugs during the construction of
circuit_builder
circuits via theadd_gate
method. It is still necessary to add time support to other places whereBuilder.__lt__
is called. In the meantime, the changes I made shouldn't cause any conflict with those, however.Regards, Diogo Valada