def wf_sig(wf):
    """
	Compute a signature of a Compiler.Waveform that identifies the relevant properties for
	two Waveforms to be considered "equal" in the waveform library. For example, we ignore
	length of TA waveforms.
	"""
    if wf.isZero or wf.isTimeAmp and wf.frequency == 0:
        return wf.amp, wf.phase
    else:
        return wf.key, wf.amp, round(wf.phase * 2 ** 13
            ), wf.length, wf.frequency
