![]() 4x4-1: test Quantum solution of 4x4 puzzle missing 1 number.4x4-classic : test classic algorithm on a 4x4 puzzle.You can also choose a specific puzzle to solve by adding the puzzle name as below To run the sample, use the dotnet run command from your terminal. for 9x9 puzzles, 4 bits per color are used but the colors in the solution can only be 0 to 8.constraints on Vertex colors based on initial colors when you start. ![]() The graph coloring code is based on the Graph Coloring Kata with the following changes: However, trying to use more than 8 qubits (2 empty squares) in a simulation becomes very slow, so here we only run it for 1 or 2 missing squares in a 9x9 puzzle. The code can also solve 9x9 Sudoku puzzles using 4 qubits per number. This allows a 4x4 puzzle to be solved using 2 qubits per missing number. ![]() The numbers are changed to 0 to 3 and 0 to 8 and then converted back. However, when solving this using a quantum program and encoding these values into qubits, Note that the puzzles are initially defined in C# using numbers from 1 to 4, or 1 to9. Similarly, startingNumberConstraints is the array of (Cell#, constraint).įor example, the constraint that empty cell 0 can't have value 1 or 3 is encoded as startingNumberConstraints =. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |