Remove commented out code

This commit is contained in:
Andreas Tsouchlos 2025-03-27 17:35:43 +01:00
parent 2143f29885
commit 97fc0695bd

View File

@ -13,62 +13,6 @@ from hccd import path_tracker, homotopy_generator
# autopep8: on # autopep8: on
# class RepetitionCodeHomotopy:
# """Helper type implementing necessary functions for PathTracker.
#
# Repetiton code homotopy:
# G = [[x1],
# [x2],
# [x1]]
#
# F = [[1 - x1**2],
# [1 - x2**2],
# [1 - x1*x2]]
#
# H = (1-t)*G + t*F
#
# Note that
# y := [[x1],
# [x2],
# [t]]
# """
# @staticmethod
# def evaluate_H(y: np.ndarray) -> np.ndarray:
# """Evaluate H at y."""
# x1 = y[0]
# x2 = y[1]
# t = y[2]
#
# print(y)
#
# result = np.zeros(shape=3)
# result[0] = -t*x1**2 + x1*(1-t) + t
# result[1] = -t*x2**2 + x2*(1-t) + t
# result[2] = -t*x1*x2 + x1*(1-t) + t
#
# return result
#
# @staticmethod
# def evaluate_DH(y: np.ndarray) -> np.ndarray:
# """Evaluate Jacobian of H at y."""
# x1 = y[0]
# x2 = y[1]
# t = y[2]
#
# result = np.zeros(shape=(3, 3))
# result[0, 0] = -2*t*x1 + (1-t)
# result[0, 1] = 0
# result[0, 2] = -x1**2 - x1 + 1
# result[1, 0] = 0
# result[1, 1] = -2*t*x2 + (1-t)
# result[1, 2] = -x2**2 - x2 + 1
# result[1, 0] = -t*x2 + (1-t)
# result[1, 1] = -t*x1
# result[1, 2] = -x1*x2 - x1 + 1
#
# return result
def track_path(args): def track_path(args):
H = np.array([[1, 1, 0, 0], H = np.array([[1, 1, 0, 0],
[0, 1, 1, 0], [0, 1, 1, 0],
@ -86,7 +30,7 @@ def track_path(args):
ys_start, ys_prime, ys_hat_e, ys = [], [], [], [] ys_start, ys_prime, ys_hat_e, ys = [], [], [], []
y = np.zeros(5) + np.array([0.5, 0.48, -0.1, 0.2, 0 ]) y = np.zeros(5) + np.array([0.5, 0.48, -0.1, 0.2, 0])
for i in range(args.num_iterations): for i in range(args.num_iterations):
y_start, y_prime, y_hat_e, y = tracker.transparent_step(y) y_start, y_prime, y_hat_e, y = tracker.transparent_step(y)
ys_start.append(y_start) ys_start.append(y_start)