function [G,H] = framigraph(level)
nbrnodes = 4^level;
M = cell(1,4);
M{1} = eye(2);
M{2} = [0 -1;1 0];
M{3} = [0  1;1 0];
M{4} = [-1 0;0 1];
A = cell(1,nbrnodes);
for k=1:nbrnodes
 A{k} = 1;
 kbase4 = base4(level, k-1);
 for j=1:level
  A{k} = kron(M{kbase4(j)+1}, A{k});
 end
end
G = zeros(nbrnodes, nbrnodes);
%H = G;
for k=1:nbrnodes
 for l=1:nbrnodes
  G(k,l) = isamicable(A{k},A{l});
  %m = flip(level, k-1)+1;
  %n = flip(level, l-1)+1;
  %H(k,l) = isamicable(A{m},A{n});
 end
end
