



import numpy as np


def 						__SCREAMING_SNAKE_CASE      (SCREAMING_SNAKE_CASE__ ):
						snake_case_,					snake_case_     =			a.shape
						snake_case_     =			min(_A						,	_A )
						snake_case_     =			np.eye(_A )
						snake_case_     =			a.copy()

						for k in range(t - 1 ):
												# select a column of modified matrix A':
												snake_case_     =			r[k:, [k]]
												# construct first basis vector
												snake_case_     =			np.zeros_like(_A )
												snake_case_     =			1.0
												# determine scaling factor
												snake_case_     =			np.linalg.norm(_A )
												# construct vector v for Householder reflection
												snake_case_     =			x + np.sign(x[0] ) * alpha * ea
												v /= np.linalg.norm(_A )

												# construct the Householder matrix
												snake_case_     =			np.eye(m - k ) - 2.0 * v @ v.T
												# pad with ones and zeros as necessary
												snake_case_     =			np.block([[np.eye(_A ), np.zeros((k, m - k) )], [np.zeros((m - k, k) ), q_k]] )

												snake_case_     =			q @ q_k.T
												snake_case_     =			q_k @ r

						return q, r


if __name__ == "__main__":
					import doctest

					doctest.testmod()


def 						__SCREAMING_SNAKE_CASE      (SCREAMING_SNAKE_CASE__						,	SCREAMING_SNAKE_CASE__ ):
						return (input_a, input_a).count(0 ) % 2


def 						__SCREAMING_SNAKE_CASE      ():
						assert xor_gate(0						,	0 ) == 0
						assert xor_gate(0						,	1 ) == 1
						assert xor_gate(1						,	0 ) == 1
						assert xor_gate(1						,	1 ) == 0


if __name__ == "__main__":
					print(xor_gate(0, 0))
					print(xor_gate(0, 1))