def construct_unitary(self): t = K.cast(self.parameters) phase = K.exp(1j * t) return K.diag([1, phase])
def construct_unitary(self): t = K.cast(self.parameters) phase = K.exp(1j * t / 2.0)[K.newaxis] diag = K.concatenate([K.conj(phase), phase], axis=0) return K.diag(diag)