In a sense to canonize it would not matter much if it is a sudoku puzzle or a sudoku solution. what really needs to be canonized and ordered would be the invariant grids or models.
Working with the templates this task can be easily done
All you have to do is give the cells a logical order, then give a logical order for the templates they generate, to finally generate each of the invariant models or grids from gathering all the templates in a logical order in all its possible combinations.
I created a program that does just that.
Separating the templates into nine groups depending on those that pass through cell 1, or through cell 2, or through cell 3 and so on until cell 9.
https://github.com/MiguelQuinteiro/ImagenesSudoku/blob/master/Canonizar00.pngSo I get the first model or grid invariants to be canonized, simply making sure to fill cell1 with digit 1, cell2 with digit 2 and so on until cell9 is filled with digit 9.
https://github.com/MiguelQuinteiro/ImagenesSudoku/blob/master/Canonizar01.pngModel(1) = 1.6340.12793.18214.24667.31006.31301.37703.43973
A program that sequentially reviews all combinations is easy to do but impossible to wait for it to finish running in an accessible period of time.
So we can jump to directly use the last template of digit1 and combine it with the last template available for digit2 and so on until we obtain the last of the canonicals.
https://github.com/MiguelQuinteiro/ImagenesSudoku/blob/master/Canonizar02.pngModel(18.383.222.420.692.992) = 5184.9208.13152.18069.22003.26003.36002.39771.44450
Of course the order dependent on the way to number the cells and templates in the first place, but at least this way helped me to understand the issue of canonizations.