Cirq
Cirq copied to clipboard
equivalent measurements evaluate as unequal
Description of the issue
the default value of MeasurementGate.invert_mask
is ()
, which should be equivalent to invert_mask=(False, ...)
. However, specifying the latter results in a gate which evaluates as unequal to the default
it seems like this would be fixed by using self.full_invert_mask()
instead of self.invert_mask
in MeasurementGate._value_equality_values_
How to reproduce the issue
assert cirq.MeasurementGate(1) == cirq.MeasurementGate(1) # ok
assert cirq.MeasurementGate(1) == cirq.MeasurementGate(1, invert_mask=()) # ok
assert cirq.MeasurementGate(1) == cirq.MeasurementGate(1, invert_mask=(False,)) # fails, but should be the same
Cirq version
1.2.0.dev20230427183358
Hi @tanujkhattar, I can take this up!
Hi @TarunSinghania , Are you working on this or is this fixed already? If not, can I take it up? I'm new to OpenSource and this seems like a good place to start.