SNAPKITTYWEST commited on
Commit
0359100
·
verified ·
1 Parent(s): e8d777d

Remove committed build output (Rust target/, CMake build dir, __pycache__) containing third-party code

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. build_final2/.ninja_log +0 -47
  2. build_final2/BINDINGS_SUMMARY.txt +0 -4
  3. build_final2/CMakeCache.txt +0 -706
  4. build_final2/CMakeFiles/3.29.2/CMakeDetermineCompilerABI_C.bin +0 -3
  5. build_final2/CMakeFiles/3.29.2/CMakeDetermineCompilerABI_CXX.bin +0 -3
  6. build_final2/CMakeFiles/3.29.2/CMakeDetermineCompilerABI_Fortran.bin +0 -3
  7. build_final2/CMakeFiles/3.29.2/CompilerIdC/CMakeCCompilerId.c +0 -895
  8. build_final2/CMakeFiles/3.29.2/CompilerIdCXX/CMakeCXXCompilerId.cpp +0 -878
  9. build_final2/CMakeFiles/3.29.2/CompilerIdFortran/CMakeFortranCompilerId.F +0 -1114
  10. build_final2/CMakeFiles/CMakeConfigureLog.yaml +0 -0
  11. build_final2/CMakeFiles/FindOpenMP/ompver_C.bin +0 -3
  12. build_final2/CMakeFiles/FindOpenMP/ompver_CXX.bin +0 -3
  13. build_final2/CMakeFiles/FindOpenMP/ompver_Fortran.bin +0 -3
  14. build_final2/CMakeFiles/TargetDirectories.txt +0 -71
  15. build_final2/CMakeFiles/bob_quantum.dir/FortranDependInfo.json +0 -23
  16. build_final2/CMakeFiles/bob_quantum.dir/src/bob_abi.f90-pp.f90 +0 -491
  17. build_final2/CMakeFiles/bob_quantum.dir/src/bob_abi.f90-pp.f90.d +0 -2
  18. build_final2/CMakeFiles/bob_quantum.dir/src/bob_abi.f90.obj.ddi +0 -52
  19. build_final2/CMakeFiles/bob_quantum.dir/src/bob_circuit.f90-pp.f90 +0 -380
  20. build_final2/CMakeFiles/bob_quantum.dir/src/bob_circuit.f90-pp.f90.d +0 -2
  21. build_final2/CMakeFiles/bob_quantum.dir/src/bob_circuit.f90.obj.ddi +0 -28
  22. build_final2/CMakeFiles/bob_quantum.dir/src/bob_errors.f90-pp.f90 +0 -119
  23. build_final2/CMakeFiles/bob_quantum.dir/src/bob_errors.f90-pp.f90.d +0 -2
  24. build_final2/CMakeFiles/bob_quantum.dir/src/bob_errors.f90.obj.ddi +0 -25
  25. build_final2/CMakeFiles/bob_quantum.dir/src/bob_gates.f90-pp.f90 +0 -485
  26. build_final2/CMakeFiles/bob_quantum.dir/src/bob_gates.f90-pp.f90.d +0 -2
  27. build_final2/CMakeFiles/bob_quantum.dir/src/bob_gates.f90.obj.ddi +0 -31
  28. build_final2/CMakeFiles/bob_quantum.dir/src/bob_goldilocks.f90-pp.f90 +0 -433
  29. build_final2/CMakeFiles/bob_quantum.dir/src/bob_goldilocks.f90-pp.f90.d +0 -2
  30. build_final2/CMakeFiles/bob_quantum.dir/src/bob_goldilocks.f90.obj.ddi +0 -28
  31. build_final2/CMakeFiles/bob_quantum.dir/src/bob_hamiltonian.f90-pp.f90 +0 -554
  32. build_final2/CMakeFiles/bob_quantum.dir/src/bob_hamiltonian.f90-pp.f90.d +0 -2
  33. build_final2/CMakeFiles/bob_quantum.dir/src/bob_hamiltonian.f90.obj.ddi +0 -31
  34. build_final2/CMakeFiles/bob_quantum.dir/src/bob_integrator.f90-pp.f90 +0 -460
  35. build_final2/CMakeFiles/bob_quantum.dir/src/bob_integrator.f90-pp.f90.d +0 -2
  36. build_final2/CMakeFiles/bob_quantum.dir/src/bob_integrator.f90.obj.ddi +0 -34
  37. build_final2/CMakeFiles/bob_quantum.dir/src/bob_kinds.f90-pp.f90 +0 -59
  38. build_final2/CMakeFiles/bob_quantum.dir/src/bob_kinds.f90-pp.f90.d +0 -2
  39. build_final2/CMakeFiles/bob_quantum.dir/src/bob_kinds.f90.obj.ddi +0 -20
  40. build_final2/CMakeFiles/bob_quantum.dir/src/bob_lattice.f90-pp.f90 +0 -512
  41. build_final2/CMakeFiles/bob_quantum.dir/src/bob_lattice.f90-pp.f90.d +0 -2
  42. build_final2/CMakeFiles/bob_quantum.dir/src/bob_lattice.f90.obj.ddi +0 -34
  43. build_final2/CMakeFiles/bob_quantum.dir/src/bob_measurement.f90-pp.f90 +0 -535
  44. build_final2/CMakeFiles/bob_quantum.dir/src/bob_measurement.f90-pp.f90.d +0 -2
  45. build_final2/CMakeFiles/bob_quantum.dir/src/bob_measurement.f90.obj.ddi +0 -34
  46. build_final2/CMakeFiles/bob_quantum.dir/src/bob_metrics.f90-pp.f90 +0 -499
  47. build_final2/CMakeFiles/bob_quantum.dir/src/bob_metrics.f90-pp.f90.d +0 -2
  48. build_final2/CMakeFiles/bob_quantum.dir/src/bob_metrics.f90.obj.ddi +0 -34
  49. build_final2/CMakeFiles/bob_quantum.dir/src/bob_phdae.f90-pp.f90 +0 -404
  50. build_final2/CMakeFiles/bob_quantum.dir/src/bob_phdae.f90-pp.f90.d +0 -2
build_final2/.ninja_log DELETED
@@ -1,47 +0,0 @@
1
- # ninja log v6
2
- 52 478 8062663004855321 CMakeFiles/bob_quantum.dir/src/bob_integrator.f90-pp.f90 e0cfa5f3d8942c1b
3
- 52 478 8062663004855321 CMakeFiles/bob_quantum.dir/src/bob_integrator.f90.obj.ddi e0cfa5f3d8942c1b
4
- 21 514 8062663004545324 CMakeFiles/bob_quantum.dir/src/bob_errors.f90-pp.f90 c578e9951fe765f2
5
- 21 514 8062663004545324 CMakeFiles/bob_quantum.dir/src/bob_errors.f90.obj.ddi c578e9951fe765f2
6
- 6 566 8062663004395324 CMakeFiles/bob_quantum.dir/src/bob_abi.f90-pp.f90 715a2be7c4f64378
7
- 6 566 8062663004395324 CMakeFiles/bob_quantum.dir/src/bob_abi.f90.obj.ddi 715a2be7c4f64378
8
- 27 604 8062663004605332 CMakeFiles/bob_quantum.dir/src/bob_gates.f90-pp.f90 74633093bdc6a7e0
9
- 27 604 8062663004605332 CMakeFiles/bob_quantum.dir/src/bob_gates.f90.obj.ddi 74633093bdc6a7e0
10
- 36 616 8062663004695310 CMakeFiles/bob_quantum.dir/src/bob_goldilocks.f90-pp.f90 99fcceba57c36578
11
- 36 616 8062663004695310 CMakeFiles/bob_quantum.dir/src/bob_goldilocks.f90.obj.ddi 99fcceba57c36578
12
- 72 625 8062663005060785 CMakeFiles/bob_quantum.dir/src/bob_measurement.f90-pp.f90 2b3c8cec260d0d62
13
- 72 625 8062663005060785 CMakeFiles/bob_quantum.dir/src/bob_measurement.f90.obj.ddi 2b3c8cec260d0d62
14
- 14 702 8062663004475320 CMakeFiles/bob_quantum.dir/src/bob_circuit.f90-pp.f90 c1e87e7783f5cb3e
15
- 14 702 8062663004475320 CMakeFiles/bob_quantum.dir/src/bob_circuit.f90.obj.ddi c1e87e7783f5cb3e
16
- 65 727 8062663004985494 CMakeFiles/bob_quantum.dir/src/bob_lattice.f90-pp.f90 4b3d180dfd0e8349
17
- 65 727 8062663004985494 CMakeFiles/bob_quantum.dir/src/bob_lattice.f90.obj.ddi 4b3d180dfd0e8349
18
- 478 838 8062663009112478 CMakeFiles/bob_quantum.dir/src/bob_metrics.f90-pp.f90 9fa7ce1d6e398729
19
- 478 838 8062663009112478 CMakeFiles/bob_quantum.dir/src/bob_metrics.f90.obj.ddi 9fa7ce1d6e398729
20
- 59 940 8062663004920404 CMakeFiles/bob_quantum.dir/src/bob_kinds.f90-pp.f90 9bc134fe5f6a1db3
21
- 59 940 8062663004920404 CMakeFiles/bob_quantum.dir/src/bob_kinds.f90.obj.ddi 9bc134fe5f6a1db3
22
- 702 1148 8062663011355314 CMakeFiles/bob_quantum.dir/src/fortran_quantum_interface.f90-pp.f90 863ac3ed15b82166
23
- 702 1148 8062663011355314 CMakeFiles/bob_quantum.dir/src/fortran_quantum_interface.f90.obj.ddi 863ac3ed15b82166
24
- 566 1172 8062663009990069 CMakeFiles/bob_quantum.dir/src/bob_rng.f90-pp.f90 15e51218f65ffa75
25
- 566 1172 8062663009990069 CMakeFiles/bob_quantum.dir/src/bob_rng.f90.obj.ddi 15e51218f65ffa75
26
- 617 1179 8062663010500218 CMakeFiles/bob_quantum.dir/src/bob_worm.f90-pp.f90 431aefea975889db
27
- 617 1179 8062663010500218 CMakeFiles/bob_quantum.dir/src/bob_worm.f90.obj.ddi 431aefea975889db
28
- 43 1221 8062663004765305 CMakeFiles/bob_quantum.dir/src/bob_hamiltonian.f90-pp.f90 681cf4c432bba625
29
- 43 1221 8062663004765305 CMakeFiles/bob_quantum.dir/src/bob_hamiltonian.f90.obj.ddi 681cf4c432bba625
30
- 625 1272 8062663010590223 CMakeFiles/bob_quantum.dir/src/boolean_spectral_lens.f90-pp.f90 eee6a29ce8bda322
31
- 625 1272 8062663010590223 CMakeFiles/bob_quantum.dir/src/boolean_spectral_lens.f90.obj.ddi eee6a29ce8bda322
32
- 604 1273 8062663010370232 CMakeFiles/bob_quantum.dir/src/bob_state.f90-pp.f90 413d798fedc867dd
33
- 604 1273 8062663010370232 CMakeFiles/bob_quantum.dir/src/bob_state.f90.obj.ddi 413d798fedc867dd
34
- 514 1273 8062663009472473 CMakeFiles/bob_quantum.dir/src/bob_phdae.f90-pp.f90 32d20cf1f364abc6
35
- 514 1273 8062663009472473 CMakeFiles/bob_quantum.dir/src/bob_phdae.f90.obj.ddi 32d20cf1f364abc6
36
- 940 1374 8062663013735312 CMakeFiles/bob_quantum.dir/src/mlir_forge_kernels.f90-pp.f90 3d370d26c06ac2d3
37
- 940 1374 8062663013735312 CMakeFiles/bob_quantum.dir/src/mlir_forge_kernels.f90.obj.ddi 3d370d26c06ac2d3
38
- 727 1385 8062663011610477 CMakeFiles/bob_quantum.dir/src/jordan_block.f90-pp.f90 a43bb3e06547e612
39
- 727 1385 8062663011610477 CMakeFiles/bob_quantum.dir/src/jordan_block.f90.obj.ddi a43bb3e06547e612
40
- 1221 1533 8062663016539084 CMakeFiles/bob_quantum.dir/src/training_adjoint.f90-pp.f90 8a7bfd0d02b91b5f
41
- 1221 1533 8062663016539084 CMakeFiles/bob_quantum.dir/src/training_adjoint.f90.obj.ddi 8a7bfd0d02b91b5f
42
- 1148 1535 8062663015818155 CMakeFiles/bob_quantum.dir/src/sov_monster_kernel.f90-pp.f90 6c92237463bfd5a4
43
- 1148 1535 8062663015818155 CMakeFiles/bob_quantum.dir/src/sov_monster_kernel.f90.obj.ddi 6c92237463bfd5a4
44
- 1172 1554 8062663016056201 CMakeFiles/bob_quantum.dir/src/spe_encoder.f90-pp.f90 94e155a00fa30352
45
- 1172 1554 8062663016056201 CMakeFiles/bob_quantum.dir/src/spe_encoder.f90.obj.ddi 94e155a00fa30352
46
- 1179 1562 8062663016131215 CMakeFiles/bob_quantum.dir/src/test_fortran_quantum.f90-pp.f90 a2223905f46feef2
47
- 1179 1562 8062663016131215 CMakeFiles/bob_quantum.dir/src/test_fortran_quantum.f90.obj.ddi a2223905f46feef2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/BINDINGS_SUMMARY.txt DELETED
@@ -1,4 +0,0 @@
1
- Racket: bob_quantum.rkt (FFI to C ABI) - installed to share/bob_quantum/racket
2
- Janet: bob_quantum.janet (native bindings to C ABI) - installed to share/bob_quantum/janet
3
- Zig: src/bob_quantum.zig (FFI to C ABI) - installed to share/bob_quantum/zig
4
- Odin: bob_quantum.odin (foreign bindings to C ABI) - installed to share/bob_quantum/odin
 
 
 
 
 
build_final2/CMakeCache.txt DELETED
@@ -1,706 +0,0 @@
1
- # This is the CMakeCache file.
2
- # For build in directory: c:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2
3
- # It was generated by CMake: C:/Strawberry/c/bin/cmake.exe
4
- # You can edit this file to change values found and used by cmake.
5
- # If you do not want to change any of the values, simply exit the editor.
6
- # If you do want to change a value, simply edit, save, and exit the editor.
7
- # The syntax for the file is as follows:
8
- # KEY:TYPE=VALUE
9
- # KEY is the name of a variable in the cache.
10
- # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
11
- # VALUE is the current value for the KEY.
12
-
13
- ########################
14
- # EXTERNAL cache entries
15
- ########################
16
-
17
- //Path to a library.
18
- BLAS_Accelerate_LIBRARY:FILEPATH=BLAS_Accelerate_LIBRARY-NOTFOUND
19
-
20
- //Path to a library.
21
- BLAS_acml_LIBRARY:FILEPATH=BLAS_acml_LIBRARY-NOTFOUND
22
-
23
- //Path to a library.
24
- BLAS_acml_mp_LIBRARY:FILEPATH=BLAS_acml_mp_LIBRARY-NOTFOUND
25
-
26
- //Path to a library.
27
- BLAS_armpl_lp64_LIBRARY:FILEPATH=BLAS_armpl_lp64_LIBRARY-NOTFOUND
28
-
29
- //Path to a library.
30
- BLAS_blas_LIBRARY:FILEPATH=BLAS_blas_LIBRARY-NOTFOUND
31
-
32
- //Path to a library.
33
- BLAS_blis_LIBRARY:FILEPATH=BLAS_blis_LIBRARY-NOTFOUND
34
-
35
- //Path to a library.
36
- BLAS_complib_sgimath_LIBRARY:FILEPATH=BLAS_complib_sgimath_LIBRARY-NOTFOUND
37
-
38
- //Path to a library.
39
- BLAS_cxml_LIBRARY:FILEPATH=BLAS_cxml_LIBRARY-NOTFOUND
40
-
41
- //Path to a library.
42
- BLAS_dxml_LIBRARY:FILEPATH=BLAS_dxml_LIBRARY-NOTFOUND
43
-
44
- //Path to a library.
45
- BLAS_eml_LIBRARY:FILEPATH=BLAS_eml_LIBRARY-NOTFOUND
46
-
47
- //Path to a library.
48
- BLAS_essl_LIBRARY:FILEPATH=BLAS_essl_LIBRARY-NOTFOUND
49
-
50
- //Path to a library.
51
- BLAS_fjlapack_LIBRARY:FILEPATH=BLAS_fjlapack_LIBRARY-NOTFOUND
52
-
53
- //Path to a library.
54
- BLAS_flexiblas_LIBRARY:FILEPATH=BLAS_flexiblas_LIBRARY-NOTFOUND
55
-
56
- //Path to a library.
57
- BLAS_goto2_LIBRARY:FILEPATH=BLAS_goto2_LIBRARY-NOTFOUND
58
-
59
- //Path to a library.
60
- BLAS_mkl_intel_c_dll_LIBRARY:FILEPATH=BLAS_mkl_intel_c_dll_LIBRARY-NOTFOUND
61
-
62
- //Path to a library.
63
- BLAS_mkl_intel_lp64_dll_LIBRARY:FILEPATH=BLAS_mkl_intel_lp64_dll_LIBRARY-NOTFOUND
64
-
65
- //Path to a library.
66
- BLAS_mkl_rt_LIBRARY:FILEPATH=BLAS_mkl_rt_LIBRARY-NOTFOUND
67
-
68
- //Path to a library.
69
- BLAS_openblas_LIBRARY:FILEPATH=BLAS_openblas_LIBRARY-NOTFOUND
70
-
71
- //Path to a library.
72
- BLAS_scs_LIBRARY:FILEPATH=BLAS_scs_LIBRARY-NOTFOUND
73
-
74
- //Path to a library.
75
- BLAS_sgemm_LIBRARY:FILEPATH=BLAS_sgemm_LIBRARY-NOTFOUND
76
-
77
- //Path to a library.
78
- BLAS_sunperf_LIBRARY:FILEPATH=BLAS_sunperf_LIBRARY-NOTFOUND
79
-
80
- //Path to a library.
81
- BLAS_vecLib_LIBRARY:FILEPATH=BLAS_vecLib_LIBRARY-NOTFOUND
82
-
83
- //Value Computed by CMake
84
- BOBQuantumCivilizationEngine_BINARY_DIR:STATIC=C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2
85
-
86
- //Value Computed by CMake
87
- BOBQuantumCivilizationEngine_IS_TOP_LEVEL:STATIC=ON
88
-
89
- //Value Computed by CMake
90
- BOBQuantumCivilizationEngine_SOURCE_DIR:STATIC=C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster
91
-
92
- //Build Elixir/Erlang NIF bindings
93
- BOB_BINDING_ELIXIR:BOOL=OFF
94
-
95
- //Build Haskell FFI bindings
96
- BOB_BINDING_HASKELL:BOOL=OFF
97
-
98
- //Build Janet native bindings
99
- BOB_BINDING_JANET:BOOL=ON
100
-
101
- //Build Julia bindings
102
- BOB_BINDING_JULIA:BOOL=ON
103
-
104
- //Build Odin foreign bindings
105
- BOB_BINDING_ODIN:BOOL=ON
106
-
107
- //Build Python bindings (ctypes)
108
- BOB_BINDING_PYTHON:BOOL=ON
109
-
110
- //Build R/C++ bindings
111
- BOB_BINDING_R:BOOL=ON
112
-
113
- //Build Racket FFI bindings
114
- BOB_BINDING_RACKET:BOOL=ON
115
-
116
- //Build Rust FFI crate
117
- BOB_BINDING_RUST:BOOL=OFF
118
-
119
- //Build Smalltalk VM plugin
120
- BOB_BINDING_SMALLTALK:BOOL=OFF
121
-
122
- //Build Zig FFI bindings
123
- BOB_BINDING_ZIG:BOOL=ON
124
-
125
- //Build benchmark suite
126
- BOB_BUILD_BENCHMARKS:BOOL=ON
127
-
128
- //Build documentation
129
- BOB_BUILD_DOCS:BOOL=OFF
130
-
131
- //Build shared libraries
132
- BOB_BUILD_SHARED_LIBS:BOOL=ON
133
-
134
- //Build test suite
135
- BOB_BUILD_TESTS:BOOL=ON
136
-
137
- //Enable C++ exceptions
138
- BOB_ENABLE_EXCEPTIONS:BOOL=ON
139
-
140
- //Enable RTTI for bindings
141
- BOB_ENABLE_RTTI:BOOL=ON
142
-
143
- //Path to a program.
144
- CMAKE_ADDR2LINE:FILEPATH=C:/Strawberry/c/bin/addr2line.exe
145
-
146
- //Path to a program.
147
- CMAKE_AR:FILEPATH=C:/Strawberry/c/bin/ar.exe
148
-
149
- //Choose the type of build, options are: None Debug Release RelWithDebInfo
150
- // MinSizeRel ...
151
- CMAKE_BUILD_TYPE:STRING=Release
152
-
153
- //CXX compiler
154
- CMAKE_CXX_COMPILER:FILEPATH=C:/Strawberry/c/bin/c++.exe
155
-
156
- //A wrapper around 'ar' adding the appropriate '--plugin' option
157
- // for the GCC compiler
158
- CMAKE_CXX_COMPILER_AR:FILEPATH=C:/Strawberry/c/bin/gcc-ar.exe
159
-
160
- //A wrapper around 'ranlib' adding the appropriate '--plugin' option
161
- // for the GCC compiler
162
- CMAKE_CXX_COMPILER_RANLIB:FILEPATH=C:/Strawberry/c/bin/gcc-ranlib.exe
163
-
164
- //Flags used by the CXX compiler during all build types.
165
- CMAKE_CXX_FLAGS:STRING=
166
-
167
- //Flags used by the CXX compiler during DEBUG builds.
168
- CMAKE_CXX_FLAGS_DEBUG:STRING=-g
169
-
170
- //Flags used by the CXX compiler during MINSIZEREL builds.
171
- CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
172
-
173
- //Flags used by the CXX compiler during RELEASE builds.
174
- CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
175
-
176
- //Flags used by the CXX compiler during RELWITHDEBINFO builds.
177
- CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
178
-
179
- //Libraries linked by default with all C++ applications.
180
- CMAKE_CXX_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
181
-
182
- //C compiler
183
- CMAKE_C_COMPILER:FILEPATH=C:/Strawberry/c/bin/gcc.exe
184
-
185
- //A wrapper around 'ar' adding the appropriate '--plugin' option
186
- // for the GCC compiler
187
- CMAKE_C_COMPILER_AR:FILEPATH=C:/Strawberry/c/bin/gcc-ar.exe
188
-
189
- //A wrapper around 'ranlib' adding the appropriate '--plugin' option
190
- // for the GCC compiler
191
- CMAKE_C_COMPILER_RANLIB:FILEPATH=C:/Strawberry/c/bin/gcc-ranlib.exe
192
-
193
- //Flags used by the C compiler during all build types.
194
- CMAKE_C_FLAGS:STRING=
195
-
196
- //Flags used by the C compiler during DEBUG builds.
197
- CMAKE_C_FLAGS_DEBUG:STRING=-g
198
-
199
- //Flags used by the C compiler during MINSIZEREL builds.
200
- CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
201
-
202
- //Flags used by the C compiler during RELEASE builds.
203
- CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
204
-
205
- //Flags used by the C compiler during RELWITHDEBINFO builds.
206
- CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
207
-
208
- //Libraries linked by default with all C applications.
209
- CMAKE_C_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
210
-
211
- //Path to a program.
212
- CMAKE_DLLTOOL:FILEPATH=C:/Strawberry/c/bin/dlltool.exe
213
-
214
- //Flags used by the linker during all build types.
215
- CMAKE_EXE_LINKER_FLAGS:STRING=
216
-
217
- //Flags used by the linker during DEBUG builds.
218
- CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
219
-
220
- //Flags used by the linker during MINSIZEREL builds.
221
- CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
222
-
223
- //Flags used by the linker during RELEASE builds.
224
- CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
225
-
226
- //Flags used by the linker during RELWITHDEBINFO builds.
227
- CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
228
-
229
- //Enable/Disable output of compile commands during generation.
230
- CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
231
-
232
- //Value Computed by CMake.
233
- CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/CMakeFiles/pkgRedirects
234
-
235
- //Fortran compiler
236
- CMAKE_Fortran_COMPILER:FILEPATH=C:/Strawberry/c/bin/gfortran.exe
237
-
238
- //A wrapper around 'ar' adding the appropriate '--plugin' option
239
- // for the GCC compiler
240
- CMAKE_Fortran_COMPILER_AR:FILEPATH=C:/Strawberry/c/bin/gcc-ar.exe
241
-
242
- //A wrapper around 'ranlib' adding the appropriate '--plugin' option
243
- // for the GCC compiler
244
- CMAKE_Fortran_COMPILER_RANLIB:FILEPATH=C:/Strawberry/c/bin/gcc-ranlib.exe
245
-
246
- //Flags used by the Fortran compiler during all build types.
247
- CMAKE_Fortran_FLAGS:STRING=
248
-
249
- //Flags used by the Fortran compiler during DEBUG builds.
250
- CMAKE_Fortran_FLAGS_DEBUG:STRING=-g
251
-
252
- //Flags used by the Fortran compiler during MINSIZEREL builds.
253
- CMAKE_Fortran_FLAGS_MINSIZEREL:STRING=-Os
254
-
255
- //Flags used by the Fortran compiler during RELEASE builds.
256
- CMAKE_Fortran_FLAGS_RELEASE:STRING=-O3
257
-
258
- //Flags used by the Fortran compiler during RELWITHDEBINFO builds.
259
- CMAKE_Fortran_FLAGS_RELWITHDEBINFO:STRING=-O2 -g
260
-
261
- //Convert GNU import libraries to MS format (requires Visual Studio)
262
- CMAKE_GNUtoMS:BOOL=OFF
263
-
264
- //Install path prefix, prepended onto install directories.
265
- CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/BOBQuantumCivilizationEngine
266
-
267
- //Path to a program.
268
- CMAKE_LINKER:FILEPATH=C:/Strawberry/c/bin/ld.exe
269
-
270
- //Program used to build from build.ninja files.
271
- CMAKE_MAKE_PROGRAM:FILEPATH=C:/Strawberry/c/bin/ninja.exe
272
-
273
- //Flags used by the linker during the creation of modules during
274
- // all build types.
275
- CMAKE_MODULE_LINKER_FLAGS:STRING=
276
-
277
- //Flags used by the linker during the creation of modules during
278
- // DEBUG builds.
279
- CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
280
-
281
- //Flags used by the linker during the creation of modules during
282
- // MINSIZEREL builds.
283
- CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
284
-
285
- //Flags used by the linker during the creation of modules during
286
- // RELEASE builds.
287
- CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
288
-
289
- //Flags used by the linker during the creation of modules during
290
- // RELWITHDEBINFO builds.
291
- CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
292
-
293
- //Path to a program.
294
- CMAKE_NM:FILEPATH=C:/Strawberry/c/bin/nm.exe
295
-
296
- //Path to a program.
297
- CMAKE_OBJCOPY:FILEPATH=C:/Strawberry/c/bin/objcopy.exe
298
-
299
- //Path to a program.
300
- CMAKE_OBJDUMP:FILEPATH=C:/Strawberry/c/bin/objdump.exe
301
-
302
- //Value Computed by CMake
303
- CMAKE_PROJECT_DESCRIPTION:STATIC=Quantum simulation engine for distributed civilization mesh
304
-
305
- //Value Computed by CMake
306
- CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
307
-
308
- //Value Computed by CMake
309
- CMAKE_PROJECT_NAME:STATIC=BOBQuantumCivilizationEngine
310
-
311
- //Value Computed by CMake
312
- CMAKE_PROJECT_VERSION:STATIC=1.0.0
313
-
314
- //Value Computed by CMake
315
- CMAKE_PROJECT_VERSION_MAJOR:STATIC=1
316
-
317
- //Value Computed by CMake
318
- CMAKE_PROJECT_VERSION_MINOR:STATIC=0
319
-
320
- //Value Computed by CMake
321
- CMAKE_PROJECT_VERSION_PATCH:STATIC=0
322
-
323
- //Value Computed by CMake
324
- CMAKE_PROJECT_VERSION_TWEAK:STATIC=
325
-
326
- //Path to a program.
327
- CMAKE_RANLIB:FILEPATH=C:/Strawberry/c/bin/ranlib.exe
328
-
329
- //RC compiler
330
- CMAKE_RC_COMPILER:FILEPATH=C:/Strawberry/c/bin/windres.exe
331
-
332
- //Flags for Windows Resource Compiler during all build types.
333
- CMAKE_RC_FLAGS:STRING=
334
-
335
- //Flags for Windows Resource Compiler during DEBUG builds.
336
- CMAKE_RC_FLAGS_DEBUG:STRING=
337
-
338
- //Flags for Windows Resource Compiler during MINSIZEREL builds.
339
- CMAKE_RC_FLAGS_MINSIZEREL:STRING=
340
-
341
- //Flags for Windows Resource Compiler during RELEASE builds.
342
- CMAKE_RC_FLAGS_RELEASE:STRING=
343
-
344
- //Flags for Windows Resource Compiler during RELWITHDEBINFO builds.
345
- CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=
346
-
347
- //Path to a program.
348
- CMAKE_READELF:FILEPATH=C:/Strawberry/c/bin/readelf.exe
349
-
350
- //Flags used by the linker during the creation of shared libraries
351
- // during all build types.
352
- CMAKE_SHARED_LINKER_FLAGS:STRING=
353
-
354
- //Flags used by the linker during the creation of shared libraries
355
- // during DEBUG builds.
356
- CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
357
-
358
- //Flags used by the linker during the creation of shared libraries
359
- // during MINSIZEREL builds.
360
- CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
361
-
362
- //Flags used by the linker during the creation of shared libraries
363
- // during RELEASE builds.
364
- CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
365
-
366
- //Flags used by the linker during the creation of shared libraries
367
- // during RELWITHDEBINFO builds.
368
- CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
369
-
370
- //If set, runtime paths are not added when installing shared libraries,
371
- // but are added when building.
372
- CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
373
-
374
- //If set, runtime paths are not added when using shared libraries.
375
- CMAKE_SKIP_RPATH:BOOL=NO
376
-
377
- //Flags used by the linker during the creation of static libraries
378
- // during all build types.
379
- CMAKE_STATIC_LINKER_FLAGS:STRING=
380
-
381
- //Flags used by the linker during the creation of static libraries
382
- // during DEBUG builds.
383
- CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
384
-
385
- //Flags used by the linker during the creation of static libraries
386
- // during MINSIZEREL builds.
387
- CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
388
-
389
- //Flags used by the linker during the creation of static libraries
390
- // during RELEASE builds.
391
- CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
392
-
393
- //Flags used by the linker during the creation of static libraries
394
- // during RELWITHDEBINFO builds.
395
- CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
396
-
397
- //Path to a program.
398
- CMAKE_STRIP:FILEPATH=C:/Strawberry/c/bin/strip.exe
399
-
400
- //Path to a program.
401
- CMAKE_TAPI:FILEPATH=CMAKE_TAPI-NOTFOUND
402
-
403
- //If this value is on, makefiles will be generated without the
404
- // .SILENT directive, and all commands will be echoed to the console
405
- // during the make. This is useful for debugging only. With Visual
406
- // Studio IDE projects all commands are done without /nologo.
407
- CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
408
-
409
- //CXX compiler flags for OpenMP parallelization
410
- OpenMP_CXX_FLAGS:STRING=-fopenmp
411
-
412
- //CXX compiler libraries for OpenMP parallelization
413
- OpenMP_CXX_LIB_NAMES:STRING=gomp;mingwthrd;mingwthrd
414
-
415
- //C compiler flags for OpenMP parallelization
416
- OpenMP_C_FLAGS:STRING=-fopenmp
417
-
418
- //C compiler libraries for OpenMP parallelization
419
- OpenMP_C_LIB_NAMES:STRING=gomp;mingwthrd;mingwthrd
420
-
421
- //Fortran compiler flags for OpenMP parallelization
422
- OpenMP_Fortran_FLAGS:STRING=-fopenmp
423
-
424
- //Fortran compiler libraries for OpenMP parallelization
425
- OpenMP_Fortran_LIB_NAMES:STRING=gomp;mingwthrd;mingwthrd;mingwthrd
426
-
427
- //Path to the gomp library for OpenMP
428
- OpenMP_gomp_LIBRARY:FILEPATH=C:/Strawberry/c/lib/libgomp.dll.a
429
-
430
- //Path to the mingwthrd library for OpenMP
431
- OpenMP_mingwthrd_LIBRARY:FILEPATH=C:/Strawberry/c/x86_64-w64-mingw32/lib/libmingwthrd.a
432
-
433
-
434
- ########################
435
- # INTERNAL cache entries
436
- ########################
437
-
438
- //ADVANCED property for variable: BLAS_Accelerate_LIBRARY
439
- BLAS_Accelerate_LIBRARY-ADVANCED:INTERNAL=1
440
- //Have Fortran function sgemm
441
- BLAS_WORKS:INTERNAL=
442
- //ADVANCED property for variable: BLAS_acml_LIBRARY
443
- BLAS_acml_LIBRARY-ADVANCED:INTERNAL=1
444
- //ADVANCED property for variable: BLAS_acml_mp_LIBRARY
445
- BLAS_acml_mp_LIBRARY-ADVANCED:INTERNAL=1
446
- //ADVANCED property for variable: BLAS_armpl_lp64_LIBRARY
447
- BLAS_armpl_lp64_LIBRARY-ADVANCED:INTERNAL=1
448
- //ADVANCED property for variable: BLAS_blas_LIBRARY
449
- BLAS_blas_LIBRARY-ADVANCED:INTERNAL=1
450
- //ADVANCED property for variable: BLAS_blis_LIBRARY
451
- BLAS_blis_LIBRARY-ADVANCED:INTERNAL=1
452
- //ADVANCED property for variable: BLAS_complib_sgimath_LIBRARY
453
- BLAS_complib_sgimath_LIBRARY-ADVANCED:INTERNAL=1
454
- //ADVANCED property for variable: BLAS_cxml_LIBRARY
455
- BLAS_cxml_LIBRARY-ADVANCED:INTERNAL=1
456
- //ADVANCED property for variable: BLAS_dxml_LIBRARY
457
- BLAS_dxml_LIBRARY-ADVANCED:INTERNAL=1
458
- //ADVANCED property for variable: BLAS_eml_LIBRARY
459
- BLAS_eml_LIBRARY-ADVANCED:INTERNAL=1
460
- //ADVANCED property for variable: BLAS_essl_LIBRARY
461
- BLAS_essl_LIBRARY-ADVANCED:INTERNAL=1
462
- //ADVANCED property for variable: BLAS_fjlapack_LIBRARY
463
- BLAS_fjlapack_LIBRARY-ADVANCED:INTERNAL=1
464
- //ADVANCED property for variable: BLAS_flexiblas_LIBRARY
465
- BLAS_flexiblas_LIBRARY-ADVANCED:INTERNAL=1
466
- //ADVANCED property for variable: BLAS_goto2_LIBRARY
467
- BLAS_goto2_LIBRARY-ADVANCED:INTERNAL=1
468
- //ADVANCED property for variable: BLAS_mkl_intel_c_dll_LIBRARY
469
- BLAS_mkl_intel_c_dll_LIBRARY-ADVANCED:INTERNAL=1
470
- //ADVANCED property for variable: BLAS_mkl_intel_lp64_dll_LIBRARY
471
- BLAS_mkl_intel_lp64_dll_LIBRARY-ADVANCED:INTERNAL=1
472
- //ADVANCED property for variable: BLAS_mkl_rt_LIBRARY
473
- BLAS_mkl_rt_LIBRARY-ADVANCED:INTERNAL=1
474
- //ADVANCED property for variable: BLAS_openblas_LIBRARY
475
- BLAS_openblas_LIBRARY-ADVANCED:INTERNAL=1
476
- //ADVANCED property for variable: BLAS_scs_LIBRARY
477
- BLAS_scs_LIBRARY-ADVANCED:INTERNAL=1
478
- //ADVANCED property for variable: BLAS_sgemm_LIBRARY
479
- BLAS_sgemm_LIBRARY-ADVANCED:INTERNAL=1
480
- //ADVANCED property for variable: BLAS_sunperf_LIBRARY
481
- BLAS_sunperf_LIBRARY-ADVANCED:INTERNAL=1
482
- //ADVANCED property for variable: BLAS_vecLib_LIBRARY
483
- BLAS_vecLib_LIBRARY-ADVANCED:INTERNAL=1
484
- //ADVANCED property for variable: CMAKE_ADDR2LINE
485
- CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
486
- //ADVANCED property for variable: CMAKE_AR
487
- CMAKE_AR-ADVANCED:INTERNAL=1
488
- //This is the directory where this CMakeCache.txt was created
489
- CMAKE_CACHEFILE_DIR:INTERNAL=c:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2
490
- //Major version of cmake used to create the current loaded cache
491
- CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
492
- //Minor version of cmake used to create the current loaded cache
493
- CMAKE_CACHE_MINOR_VERSION:INTERNAL=29
494
- //Patch version of cmake used to create the current loaded cache
495
- CMAKE_CACHE_PATCH_VERSION:INTERNAL=2
496
- //Path to CMake executable.
497
- CMAKE_COMMAND:INTERNAL=C:/Strawberry/c/bin/cmake.exe
498
- //Path to cpack program executable.
499
- CMAKE_CPACK_COMMAND:INTERNAL=C:/Strawberry/c/bin/cpack.exe
500
- //Path to ctest program executable.
501
- CMAKE_CTEST_COMMAND:INTERNAL=C:/Strawberry/c/bin/ctest.exe
502
- //ADVANCED property for variable: CMAKE_CXX_COMPILER
503
- CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
504
- //ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
505
- CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
506
- //ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
507
- CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
508
- //ADVANCED property for variable: CMAKE_CXX_FLAGS
509
- CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
510
- //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
511
- CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
512
- //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
513
- CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
514
- //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
515
- CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
516
- //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
517
- CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
518
- //ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES
519
- CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
520
- //ADVANCED property for variable: CMAKE_C_COMPILER
521
- CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
522
- //ADVANCED property for variable: CMAKE_C_COMPILER_AR
523
- CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
524
- //ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
525
- CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
526
- //ADVANCED property for variable: CMAKE_C_FLAGS
527
- CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
528
- //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
529
- CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
530
- //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
531
- CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
532
- //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
533
- CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
534
- //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
535
- CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
536
- //ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES
537
- CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
538
- //ADVANCED property for variable: CMAKE_DLLTOOL
539
- CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
540
- //Executable file format
541
- CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown
542
- //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
543
- CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
544
- //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
545
- CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
546
- //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
547
- CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
548
- //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
549
- CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
550
- //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
551
- CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
552
- //ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
553
- CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
554
- //Name of external makefile project generator.
555
- CMAKE_EXTRA_GENERATOR:INTERNAL=
556
- //ADVANCED property for variable: CMAKE_Fortran_COMPILER
557
- CMAKE_Fortran_COMPILER-ADVANCED:INTERNAL=1
558
- //ADVANCED property for variable: CMAKE_Fortran_COMPILER_AR
559
- CMAKE_Fortran_COMPILER_AR-ADVANCED:INTERNAL=1
560
- //ADVANCED property for variable: CMAKE_Fortran_COMPILER_RANLIB
561
- CMAKE_Fortran_COMPILER_RANLIB-ADVANCED:INTERNAL=1
562
- //ADVANCED property for variable: CMAKE_Fortran_FLAGS
563
- CMAKE_Fortran_FLAGS-ADVANCED:INTERNAL=1
564
- //ADVANCED property for variable: CMAKE_Fortran_FLAGS_DEBUG
565
- CMAKE_Fortran_FLAGS_DEBUG-ADVANCED:INTERNAL=1
566
- //ADVANCED property for variable: CMAKE_Fortran_FLAGS_MINSIZEREL
567
- CMAKE_Fortran_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
568
- //ADVANCED property for variable: CMAKE_Fortran_FLAGS_RELEASE
569
- CMAKE_Fortran_FLAGS_RELEASE-ADVANCED:INTERNAL=1
570
- //ADVANCED property for variable: CMAKE_Fortran_FLAGS_RELWITHDEBINFO
571
- CMAKE_Fortran_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
572
- //Name of generator.
573
- CMAKE_GENERATOR:INTERNAL=Ninja
574
- //Generator instance identifier.
575
- CMAKE_GENERATOR_INSTANCE:INTERNAL=
576
- //Name of generator platform.
577
- CMAKE_GENERATOR_PLATFORM:INTERNAL=
578
- //Name of generator toolset.
579
- CMAKE_GENERATOR_TOOLSET:INTERNAL=
580
- //Test CMAKE_HAVE_LIBC_PTHREAD
581
- CMAKE_HAVE_LIBC_PTHREAD:INTERNAL=1
582
- //Source directory with the top level CMakeLists.txt file for this
583
- // project
584
- CMAKE_HOME_DIRECTORY:INTERNAL=C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster
585
- //ADVANCED property for variable: CMAKE_LINKER
586
- CMAKE_LINKER-ADVANCED:INTERNAL=1
587
- //ADVANCED property for variable: CMAKE_MAKE_PROGRAM
588
- CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
589
- //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
590
- CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
591
- //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
592
- CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
593
- //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
594
- CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
595
- //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
596
- CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
597
- //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
598
- CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
599
- //ADVANCED property for variable: CMAKE_NM
600
- CMAKE_NM-ADVANCED:INTERNAL=1
601
- //number of local generators
602
- CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=9
603
- //ADVANCED property for variable: CMAKE_OBJCOPY
604
- CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
605
- //ADVANCED property for variable: CMAKE_OBJDUMP
606
- CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
607
- //Platform information initialized
608
- CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
609
- //ADVANCED property for variable: CMAKE_RANLIB
610
- CMAKE_RANLIB-ADVANCED:INTERNAL=1
611
- //ADVANCED property for variable: CMAKE_RC_COMPILER
612
- CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1
613
- CMAKE_RC_COMPILER_WORKS:INTERNAL=1
614
- //ADVANCED property for variable: CMAKE_RC_FLAGS
615
- CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1
616
- //ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG
617
- CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1
618
- //ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL
619
- CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
620
- //ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE
621
- CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1
622
- //ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO
623
- CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
624
- //ADVANCED property for variable: CMAKE_READELF
625
- CMAKE_READELF-ADVANCED:INTERNAL=1
626
- //Path to CMake installation.
627
- CMAKE_ROOT:INTERNAL=C:/Strawberry/c/share/cmake-3.29
628
- //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
629
- CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
630
- //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
631
- CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
632
- //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
633
- CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
634
- //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
635
- CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
636
- //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
637
- CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
638
- //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
639
- CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
640
- //ADVANCED property for variable: CMAKE_SKIP_RPATH
641
- CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
642
- //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
643
- CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
644
- //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
645
- CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
646
- //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
647
- CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
648
- //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
649
- CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
650
- //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
651
- CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
652
- //ADVANCED property for variable: CMAKE_STRIP
653
- CMAKE_STRIP-ADVANCED:INTERNAL=1
654
- //ADVANCED property for variable: CMAKE_TAPI
655
- CMAKE_TAPI-ADVANCED:INTERNAL=1
656
- //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
657
- CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
658
- //Details about finding OpenMP
659
- FIND_PACKAGE_MESSAGE_DETAILS_OpenMP:INTERNAL=[TRUE][TRUE][TRUE][c ][v4.5()]
660
- //Details about finding OpenMP_C
661
- FIND_PACKAGE_MESSAGE_DETAILS_OpenMP_C:INTERNAL=[-fopenmp][C:/Strawberry/c/lib/libgomp.dll.a][C:/Strawberry/c/x86_64-w64-mingw32/lib/libmingwthrd.a][C:/Strawberry/c/x86_64-w64-mingw32/lib/libmingwthrd.a][v4.5()]
662
- //Details about finding OpenMP_CXX
663
- FIND_PACKAGE_MESSAGE_DETAILS_OpenMP_CXX:INTERNAL=[-fopenmp][C:/Strawberry/c/lib/libgomp.dll.a][C:/Strawberry/c/x86_64-w64-mingw32/lib/libmingwthrd.a][C:/Strawberry/c/x86_64-w64-mingw32/lib/libmingwthrd.a][v4.5()]
664
- //Details about finding OpenMP_Fortran
665
- FIND_PACKAGE_MESSAGE_DETAILS_OpenMP_Fortran:INTERNAL=[-fopenmp][C:/Strawberry/c/lib/libgomp.dll.a][C:/Strawberry/c/x86_64-w64-mingw32/lib/libmingwthrd.a][C:/Strawberry/c/x86_64-w64-mingw32/lib/libmingwthrd.a][C:/Strawberry/c/x86_64-w64-mingw32/lib/libmingwthrd.a][v4.5()]
666
- //Details about finding Threads
667
- FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()]
668
- //Result of TRY_COMPILE
669
- OpenMP_COMPILE_RESULT_CXX_fopenmp:INTERNAL=TRUE
670
- //Result of TRY_COMPILE
671
- OpenMP_COMPILE_RESULT_C_fopenmp:INTERNAL=TRUE
672
- //Result of TRY_COMPILE
673
- OpenMP_COMPILE_RESULT_FortranHeader_fopenmp:INTERNAL=TRUE
674
- //Result of TRY_COMPILE
675
- OpenMP_COMPILE_RESULT_FortranModule_fopenmp:INTERNAL=TRUE
676
- //ADVANCED property for variable: OpenMP_CXX_FLAGS
677
- OpenMP_CXX_FLAGS-ADVANCED:INTERNAL=1
678
- //ADVANCED property for variable: OpenMP_CXX_LIB_NAMES
679
- OpenMP_CXX_LIB_NAMES-ADVANCED:INTERNAL=1
680
- //CXX compiler's OpenMP specification date
681
- OpenMP_CXX_SPEC_DATE:INTERNAL=201511
682
- //ADVANCED property for variable: OpenMP_C_FLAGS
683
- OpenMP_C_FLAGS-ADVANCED:INTERNAL=1
684
- //ADVANCED property for variable: OpenMP_C_LIB_NAMES
685
- OpenMP_C_LIB_NAMES-ADVANCED:INTERNAL=1
686
- //C compiler's OpenMP specification date
687
- OpenMP_C_SPEC_DATE:INTERNAL=201511
688
- //ADVANCED property for variable: OpenMP_Fortran_FLAGS
689
- OpenMP_Fortran_FLAGS-ADVANCED:INTERNAL=1
690
- //ADVANCED property for variable: OpenMP_Fortran_LIB_NAMES
691
- OpenMP_Fortran_LIB_NAMES-ADVANCED:INTERNAL=1
692
- //Fortran compiler's OpenMP specification date
693
- OpenMP_Fortran_SPEC_DATE:INTERNAL=201511
694
- //Result of TRY_COMPILE
695
- OpenMP_SPECTEST_CXX_:INTERNAL=TRUE
696
- //Result of TRY_COMPILE
697
- OpenMP_SPECTEST_C_:INTERNAL=TRUE
698
- //Result of TRY_COMPILE
699
- OpenMP_SPECTEST_Fortran_:INTERNAL=TRUE
700
- //ADVANCED property for variable: OpenMP_gomp_LIBRARY
701
- OpenMP_gomp_LIBRARY-ADVANCED:INTERNAL=1
702
- //ADVANCED property for variable: OpenMP_mingwthrd_LIBRARY
703
- OpenMP_mingwthrd_LIBRARY-ADVANCED:INTERNAL=1
704
- //linker supports push/pop state
705
- _CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE
706
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/3.29.2/CMakeDetermineCompilerABI_C.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:48a429195e41d168b0c3e0b7d8c8ce62ed5a9d8b33009876599a0e0c115d978d
3
- size 63173
 
 
 
 
build_final2/CMakeFiles/3.29.2/CMakeDetermineCompilerABI_CXX.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d4902004d21da65d822c0ed29482d5bccedb0623232ffa8d94a1827c35b04d5c
3
- size 63192
 
 
 
 
build_final2/CMakeFiles/3.29.2/CMakeDetermineCompilerABI_Fortran.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e11261b6b0e4049269284f6560cbe053e9aee67a51f4dce4a2ea244b2db9d022
3
- size 65411
 
 
 
 
build_final2/CMakeFiles/3.29.2/CompilerIdC/CMakeCCompilerId.c DELETED
@@ -1,895 +0,0 @@
1
- #ifdef __cplusplus
2
- # error "A C++ compiler has been selected for C."
3
- #endif
4
-
5
- #if defined(__18CXX)
6
- # define ID_VOID_MAIN
7
- #endif
8
- #if defined(__CLASSIC_C__)
9
- /* cv-qualifiers did not exist in K&R C */
10
- # define const
11
- # define volatile
12
- #endif
13
-
14
- #if !defined(__has_include)
15
- /* If the compiler does not have __has_include, pretend the answer is
16
- always no. */
17
- # define __has_include(x) 0
18
- #endif
19
-
20
-
21
- /* Version number components: V=Version, R=Revision, P=Patch
22
- Version date components: YYYY=Year, MM=Month, DD=Day */
23
-
24
- #if defined(__INTEL_COMPILER) || defined(__ICC)
25
- # define COMPILER_ID "Intel"
26
- # if defined(_MSC_VER)
27
- # define SIMULATE_ID "MSVC"
28
- # endif
29
- # if defined(__GNUC__)
30
- # define SIMULATE_ID "GNU"
31
- # endif
32
- /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
33
- except that a few beta releases use the old format with V=2021. */
34
- # if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
35
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
36
- # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
37
- # if defined(__INTEL_COMPILER_UPDATE)
38
- # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
39
- # else
40
- # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
41
- # endif
42
- # else
43
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
44
- # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
45
- /* The third version component from --version is an update index,
46
- but no macro is provided for it. */
47
- # define COMPILER_VERSION_PATCH DEC(0)
48
- # endif
49
- # if defined(__INTEL_COMPILER_BUILD_DATE)
50
- /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
51
- # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
52
- # endif
53
- # if defined(_MSC_VER)
54
- /* _MSC_VER = VVRR */
55
- # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
56
- # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
57
- # endif
58
- # if defined(__GNUC__)
59
- # define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
60
- # elif defined(__GNUG__)
61
- # define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
62
- # endif
63
- # if defined(__GNUC_MINOR__)
64
- # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
65
- # endif
66
- # if defined(__GNUC_PATCHLEVEL__)
67
- # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
68
- # endif
69
-
70
- #elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
71
- # define COMPILER_ID "IntelLLVM"
72
- #if defined(_MSC_VER)
73
- # define SIMULATE_ID "MSVC"
74
- #endif
75
- #if defined(__GNUC__)
76
- # define SIMULATE_ID "GNU"
77
- #endif
78
- /* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
79
- * later. Look for 6 digit vs. 8 digit version number to decide encoding.
80
- * VVVV is no smaller than the current year when a version is released.
81
- */
82
- #if __INTEL_LLVM_COMPILER < 1000000L
83
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
84
- # define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
85
- # define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
86
- #else
87
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
88
- # define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
89
- # define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
90
- #endif
91
- #if defined(_MSC_VER)
92
- /* _MSC_VER = VVRR */
93
- # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
94
- # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
95
- #endif
96
- #if defined(__GNUC__)
97
- # define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
98
- #elif defined(__GNUG__)
99
- # define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
100
- #endif
101
- #if defined(__GNUC_MINOR__)
102
- # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
103
- #endif
104
- #if defined(__GNUC_PATCHLEVEL__)
105
- # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
106
- #endif
107
-
108
- #elif defined(__PATHCC__)
109
- # define COMPILER_ID "PathScale"
110
- # define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
111
- # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
112
- # if defined(__PATHCC_PATCHLEVEL__)
113
- # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
114
- # endif
115
-
116
- #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
117
- # define COMPILER_ID "Embarcadero"
118
- # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
119
- # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
120
- # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
121
-
122
- #elif defined(__BORLANDC__)
123
- # define COMPILER_ID "Borland"
124
- /* __BORLANDC__ = 0xVRR */
125
- # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
126
- # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
127
-
128
- #elif defined(__WATCOMC__) && __WATCOMC__ < 1200
129
- # define COMPILER_ID "Watcom"
130
- /* __WATCOMC__ = VVRR */
131
- # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
132
- # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
133
- # if (__WATCOMC__ % 10) > 0
134
- # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
135
- # endif
136
-
137
- #elif defined(__WATCOMC__)
138
- # define COMPILER_ID "OpenWatcom"
139
- /* __WATCOMC__ = VVRP + 1100 */
140
- # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
141
- # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
142
- # if (__WATCOMC__ % 10) > 0
143
- # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
144
- # endif
145
-
146
- #elif defined(__SUNPRO_C)
147
- # define COMPILER_ID "SunPro"
148
- # if __SUNPRO_C >= 0x5100
149
- /* __SUNPRO_C = 0xVRRP */
150
- # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
151
- # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
152
- # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
153
- # else
154
- /* __SUNPRO_CC = 0xVRP */
155
- # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
156
- # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
157
- # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
158
- # endif
159
-
160
- #elif defined(__HP_cc)
161
- # define COMPILER_ID "HP"
162
- /* __HP_cc = VVRRPP */
163
- # define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
164
- # define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
165
- # define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
166
-
167
- #elif defined(__DECC)
168
- # define COMPILER_ID "Compaq"
169
- /* __DECC_VER = VVRRTPPPP */
170
- # define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
171
- # define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
172
- # define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
173
-
174
- #elif defined(__IBMC__) && defined(__COMPILER_VER__)
175
- # define COMPILER_ID "zOS"
176
- /* __IBMC__ = VRP */
177
- # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
178
- # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
179
- # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
180
-
181
- #elif defined(__open_xl__) && defined(__clang__)
182
- # define COMPILER_ID "IBMClang"
183
- # define COMPILER_VERSION_MAJOR DEC(__open_xl_version__)
184
- # define COMPILER_VERSION_MINOR DEC(__open_xl_release__)
185
- # define COMPILER_VERSION_PATCH DEC(__open_xl_modification__)
186
- # define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__)
187
-
188
-
189
- #elif defined(__ibmxl__) && defined(__clang__)
190
- # define COMPILER_ID "XLClang"
191
- # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
192
- # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
193
- # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
194
- # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
195
-
196
-
197
- #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
198
- # define COMPILER_ID "XL"
199
- /* __IBMC__ = VRP */
200
- # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
201
- # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
202
- # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
203
-
204
- #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
205
- # define COMPILER_ID "VisualAge"
206
- /* __IBMC__ = VRP */
207
- # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
208
- # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
209
- # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
210
-
211
- #elif defined(__NVCOMPILER)
212
- # define COMPILER_ID "NVHPC"
213
- # define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
214
- # define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
215
- # if defined(__NVCOMPILER_PATCHLEVEL__)
216
- # define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
217
- # endif
218
-
219
- #elif defined(__PGI)
220
- # define COMPILER_ID "PGI"
221
- # define COMPILER_VERSION_MAJOR DEC(__PGIC__)
222
- # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
223
- # if defined(__PGIC_PATCHLEVEL__)
224
- # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
225
- # endif
226
-
227
- #elif defined(__clang__) && defined(__cray__)
228
- # define COMPILER_ID "CrayClang"
229
- # define COMPILER_VERSION_MAJOR DEC(__cray_major__)
230
- # define COMPILER_VERSION_MINOR DEC(__cray_minor__)
231
- # define COMPILER_VERSION_PATCH DEC(__cray_patchlevel__)
232
- # define COMPILER_VERSION_INTERNAL_STR __clang_version__
233
-
234
-
235
- #elif defined(_CRAYC)
236
- # define COMPILER_ID "Cray"
237
- # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
238
- # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
239
-
240
- #elif defined(__TI_COMPILER_VERSION__)
241
- # define COMPILER_ID "TI"
242
- /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
243
- # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
244
- # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
245
- # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
246
-
247
- #elif defined(__CLANG_FUJITSU)
248
- # define COMPILER_ID "FujitsuClang"
249
- # define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
250
- # define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
251
- # define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
252
- # define COMPILER_VERSION_INTERNAL_STR __clang_version__
253
-
254
-
255
- #elif defined(__FUJITSU)
256
- # define COMPILER_ID "Fujitsu"
257
- # if defined(__FCC_version__)
258
- # define COMPILER_VERSION __FCC_version__
259
- # elif defined(__FCC_major__)
260
- # define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
261
- # define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
262
- # define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
263
- # endif
264
- # if defined(__fcc_version)
265
- # define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
266
- # elif defined(__FCC_VERSION)
267
- # define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
268
- # endif
269
-
270
-
271
- #elif defined(__ghs__)
272
- # define COMPILER_ID "GHS"
273
- /* __GHS_VERSION_NUMBER = VVVVRP */
274
- # ifdef __GHS_VERSION_NUMBER
275
- # define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
276
- # define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
277
- # define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
278
- # endif
279
-
280
- #elif defined(__TASKING__)
281
- # define COMPILER_ID "Tasking"
282
- # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000)
283
- # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100)
284
- # define COMPILER_VERSION_INTERNAL DEC(__VERSION__)
285
-
286
- #elif defined(__ORANGEC__)
287
- # define COMPILER_ID "OrangeC"
288
- # define COMPILER_VERSION_MAJOR DEC(__ORANGEC_MAJOR__)
289
- # define COMPILER_VERSION_MINOR DEC(__ORANGEC_MINOR__)
290
- # define COMPILER_VERSION_PATCH DEC(__ORANGEC_PATCHLEVEL__)
291
-
292
- #elif defined(__TINYC__)
293
- # define COMPILER_ID "TinyCC"
294
-
295
- #elif defined(__BCC__)
296
- # define COMPILER_ID "Bruce"
297
-
298
- #elif defined(__SCO_VERSION__)
299
- # define COMPILER_ID "SCO"
300
-
301
- #elif defined(__ARMCC_VERSION) && !defined(__clang__)
302
- # define COMPILER_ID "ARMCC"
303
- #if __ARMCC_VERSION >= 1000000
304
- /* __ARMCC_VERSION = VRRPPPP */
305
- # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
306
- # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
307
- # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
308
- #else
309
- /* __ARMCC_VERSION = VRPPPP */
310
- # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
311
- # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
312
- # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
313
- #endif
314
-
315
-
316
- #elif defined(__clang__) && defined(__apple_build_version__)
317
- # define COMPILER_ID "AppleClang"
318
- # if defined(_MSC_VER)
319
- # define SIMULATE_ID "MSVC"
320
- # endif
321
- # define COMPILER_VERSION_MAJOR DEC(__clang_major__)
322
- # define COMPILER_VERSION_MINOR DEC(__clang_minor__)
323
- # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
324
- # if defined(_MSC_VER)
325
- /* _MSC_VER = VVRR */
326
- # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
327
- # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
328
- # endif
329
- # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
330
-
331
- #elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
332
- # define COMPILER_ID "ARMClang"
333
- # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
334
- # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
335
- # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION/100 % 100)
336
- # define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
337
-
338
- #elif defined(__clang__) && defined(__ti__)
339
- # define COMPILER_ID "TIClang"
340
- # define COMPILER_VERSION_MAJOR DEC(__ti_major__)
341
- # define COMPILER_VERSION_MINOR DEC(__ti_minor__)
342
- # define COMPILER_VERSION_PATCH DEC(__ti_patchlevel__)
343
- # define COMPILER_VERSION_INTERNAL DEC(__ti_version__)
344
-
345
- #elif defined(__clang__)
346
- # define COMPILER_ID "Clang"
347
- # if defined(_MSC_VER)
348
- # define SIMULATE_ID "MSVC"
349
- # endif
350
- # define COMPILER_VERSION_MAJOR DEC(__clang_major__)
351
- # define COMPILER_VERSION_MINOR DEC(__clang_minor__)
352
- # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
353
- # if defined(_MSC_VER)
354
- /* _MSC_VER = VVRR */
355
- # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
356
- # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
357
- # endif
358
-
359
- #elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
360
- # define COMPILER_ID "LCC"
361
- # define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100)
362
- # define COMPILER_VERSION_MINOR DEC(__LCC__ % 100)
363
- # if defined(__LCC_MINOR__)
364
- # define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
365
- # endif
366
- # if defined(__GNUC__) && defined(__GNUC_MINOR__)
367
- # define SIMULATE_ID "GNU"
368
- # define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
369
- # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
370
- # if defined(__GNUC_PATCHLEVEL__)
371
- # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
372
- # endif
373
- # endif
374
-
375
- #elif defined(__GNUC__)
376
- # define COMPILER_ID "GNU"
377
- # define COMPILER_VERSION_MAJOR DEC(__GNUC__)
378
- # if defined(__GNUC_MINOR__)
379
- # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
380
- # endif
381
- # if defined(__GNUC_PATCHLEVEL__)
382
- # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
383
- # endif
384
-
385
- #elif defined(_MSC_VER)
386
- # define COMPILER_ID "MSVC"
387
- /* _MSC_VER = VVRR */
388
- # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
389
- # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
390
- # if defined(_MSC_FULL_VER)
391
- # if _MSC_VER >= 1400
392
- /* _MSC_FULL_VER = VVRRPPPPP */
393
- # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
394
- # else
395
- /* _MSC_FULL_VER = VVRRPPPP */
396
- # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
397
- # endif
398
- # endif
399
- # if defined(_MSC_BUILD)
400
- # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
401
- # endif
402
-
403
- #elif defined(_ADI_COMPILER)
404
- # define COMPILER_ID "ADSP"
405
- #if defined(__VERSIONNUM__)
406
- /* __VERSIONNUM__ = 0xVVRRPPTT */
407
- # define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF)
408
- # define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF)
409
- # define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF)
410
- # define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF)
411
- #endif
412
-
413
- #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
414
- # define COMPILER_ID "IAR"
415
- # if defined(__VER__) && defined(__ICCARM__)
416
- # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
417
- # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
418
- # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
419
- # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
420
- # elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
421
- # define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
422
- # define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
423
- # define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
424
- # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
425
- # endif
426
-
427
- #elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
428
- # define COMPILER_ID "SDCC"
429
- # if defined(__SDCC_VERSION_MAJOR)
430
- # define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
431
- # define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
432
- # define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
433
- # else
434
- /* SDCC = VRP */
435
- # define COMPILER_VERSION_MAJOR DEC(SDCC/100)
436
- # define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
437
- # define COMPILER_VERSION_PATCH DEC(SDCC % 10)
438
- # endif
439
-
440
-
441
- /* These compilers are either not known or too old to define an
442
- identification macro. Try to identify the platform and guess that
443
- it is the native compiler. */
444
- #elif defined(__hpux) || defined(__hpua)
445
- # define COMPILER_ID "HP"
446
-
447
- #else /* unknown compiler */
448
- # define COMPILER_ID ""
449
- #endif
450
-
451
- /* Construct the string literal in pieces to prevent the source from
452
- getting matched. Store it in a pointer rather than an array
453
- because some compilers will just produce instructions to fill the
454
- array rather than assigning a pointer to a static array. */
455
- char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
456
- #ifdef SIMULATE_ID
457
- char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
458
- #endif
459
-
460
- #ifdef __QNXNTO__
461
- char const* qnxnto = "INFO" ":" "qnxnto[]";
462
- #endif
463
-
464
- #if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
465
- char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
466
- #endif
467
-
468
- #define STRINGIFY_HELPER(X) #X
469
- #define STRINGIFY(X) STRINGIFY_HELPER(X)
470
-
471
- /* Identify known platforms by name. */
472
- #if defined(__linux) || defined(__linux__) || defined(linux)
473
- # define PLATFORM_ID "Linux"
474
-
475
- #elif defined(__MSYS__)
476
- # define PLATFORM_ID "MSYS"
477
-
478
- #elif defined(__CYGWIN__)
479
- # define PLATFORM_ID "Cygwin"
480
-
481
- #elif defined(__MINGW32__)
482
- # define PLATFORM_ID "MinGW"
483
-
484
- #elif defined(__APPLE__)
485
- # define PLATFORM_ID "Darwin"
486
-
487
- #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
488
- # define PLATFORM_ID "Windows"
489
-
490
- #elif defined(__FreeBSD__) || defined(__FreeBSD)
491
- # define PLATFORM_ID "FreeBSD"
492
-
493
- #elif defined(__NetBSD__) || defined(__NetBSD)
494
- # define PLATFORM_ID "NetBSD"
495
-
496
- #elif defined(__OpenBSD__) || defined(__OPENBSD)
497
- # define PLATFORM_ID "OpenBSD"
498
-
499
- #elif defined(__sun) || defined(sun)
500
- # define PLATFORM_ID "SunOS"
501
-
502
- #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
503
- # define PLATFORM_ID "AIX"
504
-
505
- #elif defined(__hpux) || defined(__hpux__)
506
- # define PLATFORM_ID "HP-UX"
507
-
508
- #elif defined(__HAIKU__)
509
- # define PLATFORM_ID "Haiku"
510
-
511
- #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
512
- # define PLATFORM_ID "BeOS"
513
-
514
- #elif defined(__QNX__) || defined(__QNXNTO__)
515
- # define PLATFORM_ID "QNX"
516
-
517
- #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
518
- # define PLATFORM_ID "Tru64"
519
-
520
- #elif defined(__riscos) || defined(__riscos__)
521
- # define PLATFORM_ID "RISCos"
522
-
523
- #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
524
- # define PLATFORM_ID "SINIX"
525
-
526
- #elif defined(__UNIX_SV__)
527
- # define PLATFORM_ID "UNIX_SV"
528
-
529
- #elif defined(__bsdos__)
530
- # define PLATFORM_ID "BSDOS"
531
-
532
- #elif defined(_MPRAS) || defined(MPRAS)
533
- # define PLATFORM_ID "MP-RAS"
534
-
535
- #elif defined(__osf) || defined(__osf__)
536
- # define PLATFORM_ID "OSF1"
537
-
538
- #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
539
- # define PLATFORM_ID "SCO_SV"
540
-
541
- #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
542
- # define PLATFORM_ID "ULTRIX"
543
-
544
- #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
545
- # define PLATFORM_ID "Xenix"
546
-
547
- #elif defined(__WATCOMC__)
548
- # if defined(__LINUX__)
549
- # define PLATFORM_ID "Linux"
550
-
551
- # elif defined(__DOS__)
552
- # define PLATFORM_ID "DOS"
553
-
554
- # elif defined(__OS2__)
555
- # define PLATFORM_ID "OS2"
556
-
557
- # elif defined(__WINDOWS__)
558
- # define PLATFORM_ID "Windows3x"
559
-
560
- # elif defined(__VXWORKS__)
561
- # define PLATFORM_ID "VxWorks"
562
-
563
- # else /* unknown platform */
564
- # define PLATFORM_ID
565
- # endif
566
-
567
- #elif defined(__INTEGRITY)
568
- # if defined(INT_178B)
569
- # define PLATFORM_ID "Integrity178"
570
-
571
- # else /* regular Integrity */
572
- # define PLATFORM_ID "Integrity"
573
- # endif
574
-
575
- # elif defined(_ADI_COMPILER)
576
- # define PLATFORM_ID "ADSP"
577
-
578
- #else /* unknown platform */
579
- # define PLATFORM_ID
580
-
581
- #endif
582
-
583
- /* For windows compilers MSVC and Intel we can determine
584
- the architecture of the compiler being used. This is because
585
- the compilers do not have flags that can change the architecture,
586
- but rather depend on which compiler is being used
587
- */
588
- #if defined(_WIN32) && defined(_MSC_VER)
589
- # if defined(_M_IA64)
590
- # define ARCHITECTURE_ID "IA64"
591
-
592
- # elif defined(_M_ARM64EC)
593
- # define ARCHITECTURE_ID "ARM64EC"
594
-
595
- # elif defined(_M_X64) || defined(_M_AMD64)
596
- # define ARCHITECTURE_ID "x64"
597
-
598
- # elif defined(_M_IX86)
599
- # define ARCHITECTURE_ID "X86"
600
-
601
- # elif defined(_M_ARM64)
602
- # define ARCHITECTURE_ID "ARM64"
603
-
604
- # elif defined(_M_ARM)
605
- # if _M_ARM == 4
606
- # define ARCHITECTURE_ID "ARMV4I"
607
- # elif _M_ARM == 5
608
- # define ARCHITECTURE_ID "ARMV5I"
609
- # else
610
- # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
611
- # endif
612
-
613
- # elif defined(_M_MIPS)
614
- # define ARCHITECTURE_ID "MIPS"
615
-
616
- # elif defined(_M_SH)
617
- # define ARCHITECTURE_ID "SHx"
618
-
619
- # else /* unknown architecture */
620
- # define ARCHITECTURE_ID ""
621
- # endif
622
-
623
- #elif defined(__WATCOMC__)
624
- # if defined(_M_I86)
625
- # define ARCHITECTURE_ID "I86"
626
-
627
- # elif defined(_M_IX86)
628
- # define ARCHITECTURE_ID "X86"
629
-
630
- # else /* unknown architecture */
631
- # define ARCHITECTURE_ID ""
632
- # endif
633
-
634
- #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
635
- # if defined(__ICCARM__)
636
- # define ARCHITECTURE_ID "ARM"
637
-
638
- # elif defined(__ICCRX__)
639
- # define ARCHITECTURE_ID "RX"
640
-
641
- # elif defined(__ICCRH850__)
642
- # define ARCHITECTURE_ID "RH850"
643
-
644
- # elif defined(__ICCRL78__)
645
- # define ARCHITECTURE_ID "RL78"
646
-
647
- # elif defined(__ICCRISCV__)
648
- # define ARCHITECTURE_ID "RISCV"
649
-
650
- # elif defined(__ICCAVR__)
651
- # define ARCHITECTURE_ID "AVR"
652
-
653
- # elif defined(__ICC430__)
654
- # define ARCHITECTURE_ID "MSP430"
655
-
656
- # elif defined(__ICCV850__)
657
- # define ARCHITECTURE_ID "V850"
658
-
659
- # elif defined(__ICC8051__)
660
- # define ARCHITECTURE_ID "8051"
661
-
662
- # elif defined(__ICCSTM8__)
663
- # define ARCHITECTURE_ID "STM8"
664
-
665
- # else /* unknown architecture */
666
- # define ARCHITECTURE_ID ""
667
- # endif
668
-
669
- #elif defined(__ghs__)
670
- # if defined(__PPC64__)
671
- # define ARCHITECTURE_ID "PPC64"
672
-
673
- # elif defined(__ppc__)
674
- # define ARCHITECTURE_ID "PPC"
675
-
676
- # elif defined(__ARM__)
677
- # define ARCHITECTURE_ID "ARM"
678
-
679
- # elif defined(__x86_64__)
680
- # define ARCHITECTURE_ID "x64"
681
-
682
- # elif defined(__i386__)
683
- # define ARCHITECTURE_ID "X86"
684
-
685
- # else /* unknown architecture */
686
- # define ARCHITECTURE_ID ""
687
- # endif
688
-
689
- #elif defined(__clang__) && defined(__ti__)
690
- # if defined(__ARM_ARCH)
691
- # define ARCHITECTURE_ID "Arm"
692
-
693
- # else /* unknown architecture */
694
- # define ARCHITECTURE_ID ""
695
- # endif
696
-
697
- #elif defined(__TI_COMPILER_VERSION__)
698
- # if defined(__TI_ARM__)
699
- # define ARCHITECTURE_ID "ARM"
700
-
701
- # elif defined(__MSP430__)
702
- # define ARCHITECTURE_ID "MSP430"
703
-
704
- # elif defined(__TMS320C28XX__)
705
- # define ARCHITECTURE_ID "TMS320C28x"
706
-
707
- # elif defined(__TMS320C6X__) || defined(_TMS320C6X)
708
- # define ARCHITECTURE_ID "TMS320C6x"
709
-
710
- # else /* unknown architecture */
711
- # define ARCHITECTURE_ID ""
712
- # endif
713
-
714
- # elif defined(__ADSPSHARC__)
715
- # define ARCHITECTURE_ID "SHARC"
716
-
717
- # elif defined(__ADSPBLACKFIN__)
718
- # define ARCHITECTURE_ID "Blackfin"
719
-
720
- #elif defined(__TASKING__)
721
-
722
- # if defined(__CTC__) || defined(__CPTC__)
723
- # define ARCHITECTURE_ID "TriCore"
724
-
725
- # elif defined(__CMCS__)
726
- # define ARCHITECTURE_ID "MCS"
727
-
728
- # elif defined(__CARM__)
729
- # define ARCHITECTURE_ID "ARM"
730
-
731
- # elif defined(__CARC__)
732
- # define ARCHITECTURE_ID "ARC"
733
-
734
- # elif defined(__C51__)
735
- # define ARCHITECTURE_ID "8051"
736
-
737
- # elif defined(__CPCP__)
738
- # define ARCHITECTURE_ID "PCP"
739
-
740
- # else
741
- # define ARCHITECTURE_ID ""
742
- # endif
743
-
744
- #else
745
- # define ARCHITECTURE_ID
746
- #endif
747
-
748
- /* Convert integer to decimal digit literals. */
749
- #define DEC(n) \
750
- ('0' + (((n) / 10000000)%10)), \
751
- ('0' + (((n) / 1000000)%10)), \
752
- ('0' + (((n) / 100000)%10)), \
753
- ('0' + (((n) / 10000)%10)), \
754
- ('0' + (((n) / 1000)%10)), \
755
- ('0' + (((n) / 100)%10)), \
756
- ('0' + (((n) / 10)%10)), \
757
- ('0' + ((n) % 10))
758
-
759
- /* Convert integer to hex digit literals. */
760
- #define HEX(n) \
761
- ('0' + ((n)>>28 & 0xF)), \
762
- ('0' + ((n)>>24 & 0xF)), \
763
- ('0' + ((n)>>20 & 0xF)), \
764
- ('0' + ((n)>>16 & 0xF)), \
765
- ('0' + ((n)>>12 & 0xF)), \
766
- ('0' + ((n)>>8 & 0xF)), \
767
- ('0' + ((n)>>4 & 0xF)), \
768
- ('0' + ((n) & 0xF))
769
-
770
- /* Construct a string literal encoding the version number. */
771
- #ifdef COMPILER_VERSION
772
- char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
773
-
774
- /* Construct a string literal encoding the version number components. */
775
- #elif defined(COMPILER_VERSION_MAJOR)
776
- char const info_version[] = {
777
- 'I', 'N', 'F', 'O', ':',
778
- 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
779
- COMPILER_VERSION_MAJOR,
780
- # ifdef COMPILER_VERSION_MINOR
781
- '.', COMPILER_VERSION_MINOR,
782
- # ifdef COMPILER_VERSION_PATCH
783
- '.', COMPILER_VERSION_PATCH,
784
- # ifdef COMPILER_VERSION_TWEAK
785
- '.', COMPILER_VERSION_TWEAK,
786
- # endif
787
- # endif
788
- # endif
789
- ']','\0'};
790
- #endif
791
-
792
- /* Construct a string literal encoding the internal version number. */
793
- #ifdef COMPILER_VERSION_INTERNAL
794
- char const info_version_internal[] = {
795
- 'I', 'N', 'F', 'O', ':',
796
- 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
797
- 'i','n','t','e','r','n','a','l','[',
798
- COMPILER_VERSION_INTERNAL,']','\0'};
799
- #elif defined(COMPILER_VERSION_INTERNAL_STR)
800
- char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
801
- #endif
802
-
803
- /* Construct a string literal encoding the version number components. */
804
- #ifdef SIMULATE_VERSION_MAJOR
805
- char const info_simulate_version[] = {
806
- 'I', 'N', 'F', 'O', ':',
807
- 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
808
- SIMULATE_VERSION_MAJOR,
809
- # ifdef SIMULATE_VERSION_MINOR
810
- '.', SIMULATE_VERSION_MINOR,
811
- # ifdef SIMULATE_VERSION_PATCH
812
- '.', SIMULATE_VERSION_PATCH,
813
- # ifdef SIMULATE_VERSION_TWEAK
814
- '.', SIMULATE_VERSION_TWEAK,
815
- # endif
816
- # endif
817
- # endif
818
- ']','\0'};
819
- #endif
820
-
821
- /* Construct the string literal in pieces to prevent the source from
822
- getting matched. Store it in a pointer rather than an array
823
- because some compilers will just produce instructions to fill the
824
- array rather than assigning a pointer to a static array. */
825
- char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
826
- char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
827
-
828
-
829
-
830
- #if !defined(__STDC__) && !defined(__clang__)
831
- # if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
832
- # define C_VERSION "90"
833
- # else
834
- # define C_VERSION
835
- # endif
836
- #elif __STDC_VERSION__ > 201710L
837
- # define C_VERSION "23"
838
- #elif __STDC_VERSION__ >= 201710L
839
- # define C_VERSION "17"
840
- #elif __STDC_VERSION__ >= 201000L
841
- # define C_VERSION "11"
842
- #elif __STDC_VERSION__ >= 199901L
843
- # define C_VERSION "99"
844
- #else
845
- # define C_VERSION "90"
846
- #endif
847
- const char* info_language_standard_default =
848
- "INFO" ":" "standard_default[" C_VERSION "]";
849
-
850
- const char* info_language_extensions_default = "INFO" ":" "extensions_default["
851
- #if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \
852
- defined(__TI_COMPILER_VERSION__)) && \
853
- !defined(__STRICT_ANSI__)
854
- "ON"
855
- #else
856
- "OFF"
857
- #endif
858
- "]";
859
-
860
- /*--------------------------------------------------------------------------*/
861
-
862
- #ifdef ID_VOID_MAIN
863
- void main() {}
864
- #else
865
- # if defined(__CLASSIC_C__)
866
- int main(argc, argv) int argc; char *argv[];
867
- # else
868
- int main(int argc, char* argv[])
869
- # endif
870
- {
871
- int require = 0;
872
- require += info_compiler[argc];
873
- require += info_platform[argc];
874
- require += info_arch[argc];
875
- #ifdef COMPILER_VERSION_MAJOR
876
- require += info_version[argc];
877
- #endif
878
- #ifdef COMPILER_VERSION_INTERNAL
879
- require += info_version_internal[argc];
880
- #endif
881
- #ifdef SIMULATE_ID
882
- require += info_simulate[argc];
883
- #endif
884
- #ifdef SIMULATE_VERSION_MAJOR
885
- require += info_simulate_version[argc];
886
- #endif
887
- #if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
888
- require += info_cray[argc];
889
- #endif
890
- require += info_language_standard_default[argc];
891
- require += info_language_extensions_default[argc];
892
- (void)argv;
893
- return require;
894
- }
895
- #endif
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/3.29.2/CompilerIdCXX/CMakeCXXCompilerId.cpp DELETED
@@ -1,878 +0,0 @@
1
- /* This source file must have a .cpp extension so that all C++ compilers
2
- recognize the extension without flags. Borland does not know .cxx for
3
- example. */
4
- #ifndef __cplusplus
5
- # error "A C compiler has been selected for C++."
6
- #endif
7
-
8
- #if !defined(__has_include)
9
- /* If the compiler does not have __has_include, pretend the answer is
10
- always no. */
11
- # define __has_include(x) 0
12
- #endif
13
-
14
-
15
- /* Version number components: V=Version, R=Revision, P=Patch
16
- Version date components: YYYY=Year, MM=Month, DD=Day */
17
-
18
- #if defined(__INTEL_COMPILER) || defined(__ICC)
19
- # define COMPILER_ID "Intel"
20
- # if defined(_MSC_VER)
21
- # define SIMULATE_ID "MSVC"
22
- # endif
23
- # if defined(__GNUC__)
24
- # define SIMULATE_ID "GNU"
25
- # endif
26
- /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
27
- except that a few beta releases use the old format with V=2021. */
28
- # if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
29
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
30
- # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
31
- # if defined(__INTEL_COMPILER_UPDATE)
32
- # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
33
- # else
34
- # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
35
- # endif
36
- # else
37
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
38
- # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
39
- /* The third version component from --version is an update index,
40
- but no macro is provided for it. */
41
- # define COMPILER_VERSION_PATCH DEC(0)
42
- # endif
43
- # if defined(__INTEL_COMPILER_BUILD_DATE)
44
- /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
45
- # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
46
- # endif
47
- # if defined(_MSC_VER)
48
- /* _MSC_VER = VVRR */
49
- # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
50
- # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
51
- # endif
52
- # if defined(__GNUC__)
53
- # define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
54
- # elif defined(__GNUG__)
55
- # define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
56
- # endif
57
- # if defined(__GNUC_MINOR__)
58
- # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
59
- # endif
60
- # if defined(__GNUC_PATCHLEVEL__)
61
- # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
62
- # endif
63
-
64
- #elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
65
- # define COMPILER_ID "IntelLLVM"
66
- #if defined(_MSC_VER)
67
- # define SIMULATE_ID "MSVC"
68
- #endif
69
- #if defined(__GNUC__)
70
- # define SIMULATE_ID "GNU"
71
- #endif
72
- /* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
73
- * later. Look for 6 digit vs. 8 digit version number to decide encoding.
74
- * VVVV is no smaller than the current year when a version is released.
75
- */
76
- #if __INTEL_LLVM_COMPILER < 1000000L
77
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
78
- # define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
79
- # define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
80
- #else
81
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
82
- # define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
83
- # define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
84
- #endif
85
- #if defined(_MSC_VER)
86
- /* _MSC_VER = VVRR */
87
- # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
88
- # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
89
- #endif
90
- #if defined(__GNUC__)
91
- # define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
92
- #elif defined(__GNUG__)
93
- # define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
94
- #endif
95
- #if defined(__GNUC_MINOR__)
96
- # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
97
- #endif
98
- #if defined(__GNUC_PATCHLEVEL__)
99
- # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
100
- #endif
101
-
102
- #elif defined(__PATHCC__)
103
- # define COMPILER_ID "PathScale"
104
- # define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
105
- # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
106
- # if defined(__PATHCC_PATCHLEVEL__)
107
- # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
108
- # endif
109
-
110
- #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
111
- # define COMPILER_ID "Embarcadero"
112
- # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
113
- # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
114
- # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
115
-
116
- #elif defined(__BORLANDC__)
117
- # define COMPILER_ID "Borland"
118
- /* __BORLANDC__ = 0xVRR */
119
- # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
120
- # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
121
-
122
- #elif defined(__WATCOMC__) && __WATCOMC__ < 1200
123
- # define COMPILER_ID "Watcom"
124
- /* __WATCOMC__ = VVRR */
125
- # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
126
- # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
127
- # if (__WATCOMC__ % 10) > 0
128
- # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
129
- # endif
130
-
131
- #elif defined(__WATCOMC__)
132
- # define COMPILER_ID "OpenWatcom"
133
- /* __WATCOMC__ = VVRP + 1100 */
134
- # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
135
- # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
136
- # if (__WATCOMC__ % 10) > 0
137
- # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
138
- # endif
139
-
140
- #elif defined(__SUNPRO_CC)
141
- # define COMPILER_ID "SunPro"
142
- # if __SUNPRO_CC >= 0x5100
143
- /* __SUNPRO_CC = 0xVRRP */
144
- # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
145
- # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
146
- # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
147
- # else
148
- /* __SUNPRO_CC = 0xVRP */
149
- # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
150
- # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
151
- # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
152
- # endif
153
-
154
- #elif defined(__HP_aCC)
155
- # define COMPILER_ID "HP"
156
- /* __HP_aCC = VVRRPP */
157
- # define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
158
- # define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
159
- # define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
160
-
161
- #elif defined(__DECCXX)
162
- # define COMPILER_ID "Compaq"
163
- /* __DECCXX_VER = VVRRTPPPP */
164
- # define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
165
- # define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100)
166
- # define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000)
167
-
168
- #elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
169
- # define COMPILER_ID "zOS"
170
- /* __IBMCPP__ = VRP */
171
- # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
172
- # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
173
- # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
174
-
175
- #elif defined(__open_xl__) && defined(__clang__)
176
- # define COMPILER_ID "IBMClang"
177
- # define COMPILER_VERSION_MAJOR DEC(__open_xl_version__)
178
- # define COMPILER_VERSION_MINOR DEC(__open_xl_release__)
179
- # define COMPILER_VERSION_PATCH DEC(__open_xl_modification__)
180
- # define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__)
181
-
182
-
183
- #elif defined(__ibmxl__) && defined(__clang__)
184
- # define COMPILER_ID "XLClang"
185
- # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
186
- # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
187
- # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
188
- # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
189
-
190
-
191
- #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
192
- # define COMPILER_ID "XL"
193
- /* __IBMCPP__ = VRP */
194
- # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
195
- # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
196
- # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
197
-
198
- #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
199
- # define COMPILER_ID "VisualAge"
200
- /* __IBMCPP__ = VRP */
201
- # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
202
- # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
203
- # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
204
-
205
- #elif defined(__NVCOMPILER)
206
- # define COMPILER_ID "NVHPC"
207
- # define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
208
- # define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
209
- # if defined(__NVCOMPILER_PATCHLEVEL__)
210
- # define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
211
- # endif
212
-
213
- #elif defined(__PGI)
214
- # define COMPILER_ID "PGI"
215
- # define COMPILER_VERSION_MAJOR DEC(__PGIC__)
216
- # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
217
- # if defined(__PGIC_PATCHLEVEL__)
218
- # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
219
- # endif
220
-
221
- #elif defined(__clang__) && defined(__cray__)
222
- # define COMPILER_ID "CrayClang"
223
- # define COMPILER_VERSION_MAJOR DEC(__cray_major__)
224
- # define COMPILER_VERSION_MINOR DEC(__cray_minor__)
225
- # define COMPILER_VERSION_PATCH DEC(__cray_patchlevel__)
226
- # define COMPILER_VERSION_INTERNAL_STR __clang_version__
227
-
228
-
229
- #elif defined(_CRAYC)
230
- # define COMPILER_ID "Cray"
231
- # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
232
- # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
233
-
234
- #elif defined(__TI_COMPILER_VERSION__)
235
- # define COMPILER_ID "TI"
236
- /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
237
- # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
238
- # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
239
- # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
240
-
241
- #elif defined(__CLANG_FUJITSU)
242
- # define COMPILER_ID "FujitsuClang"
243
- # define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
244
- # define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
245
- # define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
246
- # define COMPILER_VERSION_INTERNAL_STR __clang_version__
247
-
248
-
249
- #elif defined(__FUJITSU)
250
- # define COMPILER_ID "Fujitsu"
251
- # if defined(__FCC_version__)
252
- # define COMPILER_VERSION __FCC_version__
253
- # elif defined(__FCC_major__)
254
- # define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
255
- # define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
256
- # define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
257
- # endif
258
- # if defined(__fcc_version)
259
- # define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
260
- # elif defined(__FCC_VERSION)
261
- # define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
262
- # endif
263
-
264
-
265
- #elif defined(__ghs__)
266
- # define COMPILER_ID "GHS"
267
- /* __GHS_VERSION_NUMBER = VVVVRP */
268
- # ifdef __GHS_VERSION_NUMBER
269
- # define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
270
- # define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
271
- # define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
272
- # endif
273
-
274
- #elif defined(__TASKING__)
275
- # define COMPILER_ID "Tasking"
276
- # define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000)
277
- # define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100)
278
- # define COMPILER_VERSION_INTERNAL DEC(__VERSION__)
279
-
280
- #elif defined(__ORANGEC__)
281
- # define COMPILER_ID "OrangeC"
282
- # define COMPILER_VERSION_MAJOR DEC(__ORANGEC_MAJOR__)
283
- # define COMPILER_VERSION_MINOR DEC(__ORANGEC_MINOR__)
284
- # define COMPILER_VERSION_PATCH DEC(__ORANGEC_PATCHLEVEL__)
285
-
286
- #elif defined(__SCO_VERSION__)
287
- # define COMPILER_ID "SCO"
288
-
289
- #elif defined(__ARMCC_VERSION) && !defined(__clang__)
290
- # define COMPILER_ID "ARMCC"
291
- #if __ARMCC_VERSION >= 1000000
292
- /* __ARMCC_VERSION = VRRPPPP */
293
- # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
294
- # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
295
- # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
296
- #else
297
- /* __ARMCC_VERSION = VRPPPP */
298
- # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
299
- # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
300
- # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
301
- #endif
302
-
303
-
304
- #elif defined(__clang__) && defined(__apple_build_version__)
305
- # define COMPILER_ID "AppleClang"
306
- # if defined(_MSC_VER)
307
- # define SIMULATE_ID "MSVC"
308
- # endif
309
- # define COMPILER_VERSION_MAJOR DEC(__clang_major__)
310
- # define COMPILER_VERSION_MINOR DEC(__clang_minor__)
311
- # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
312
- # if defined(_MSC_VER)
313
- /* _MSC_VER = VVRR */
314
- # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
315
- # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
316
- # endif
317
- # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
318
-
319
- #elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
320
- # define COMPILER_ID "ARMClang"
321
- # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
322
- # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
323
- # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION/100 % 100)
324
- # define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
325
-
326
- #elif defined(__clang__) && defined(__ti__)
327
- # define COMPILER_ID "TIClang"
328
- # define COMPILER_VERSION_MAJOR DEC(__ti_major__)
329
- # define COMPILER_VERSION_MINOR DEC(__ti_minor__)
330
- # define COMPILER_VERSION_PATCH DEC(__ti_patchlevel__)
331
- # define COMPILER_VERSION_INTERNAL DEC(__ti_version__)
332
-
333
- #elif defined(__clang__)
334
- # define COMPILER_ID "Clang"
335
- # if defined(_MSC_VER)
336
- # define SIMULATE_ID "MSVC"
337
- # endif
338
- # define COMPILER_VERSION_MAJOR DEC(__clang_major__)
339
- # define COMPILER_VERSION_MINOR DEC(__clang_minor__)
340
- # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
341
- # if defined(_MSC_VER)
342
- /* _MSC_VER = VVRR */
343
- # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
344
- # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
345
- # endif
346
-
347
- #elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
348
- # define COMPILER_ID "LCC"
349
- # define COMPILER_VERSION_MAJOR DEC(__LCC__ / 100)
350
- # define COMPILER_VERSION_MINOR DEC(__LCC__ % 100)
351
- # if defined(__LCC_MINOR__)
352
- # define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
353
- # endif
354
- # if defined(__GNUC__) && defined(__GNUC_MINOR__)
355
- # define SIMULATE_ID "GNU"
356
- # define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
357
- # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
358
- # if defined(__GNUC_PATCHLEVEL__)
359
- # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
360
- # endif
361
- # endif
362
-
363
- #elif defined(__GNUC__) || defined(__GNUG__)
364
- # define COMPILER_ID "GNU"
365
- # if defined(__GNUC__)
366
- # define COMPILER_VERSION_MAJOR DEC(__GNUC__)
367
- # else
368
- # define COMPILER_VERSION_MAJOR DEC(__GNUG__)
369
- # endif
370
- # if defined(__GNUC_MINOR__)
371
- # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
372
- # endif
373
- # if defined(__GNUC_PATCHLEVEL__)
374
- # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
375
- # endif
376
-
377
- #elif defined(_MSC_VER)
378
- # define COMPILER_ID "MSVC"
379
- /* _MSC_VER = VVRR */
380
- # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
381
- # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
382
- # if defined(_MSC_FULL_VER)
383
- # if _MSC_VER >= 1400
384
- /* _MSC_FULL_VER = VVRRPPPPP */
385
- # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
386
- # else
387
- /* _MSC_FULL_VER = VVRRPPPP */
388
- # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
389
- # endif
390
- # endif
391
- # if defined(_MSC_BUILD)
392
- # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
393
- # endif
394
-
395
- #elif defined(_ADI_COMPILER)
396
- # define COMPILER_ID "ADSP"
397
- #if defined(__VERSIONNUM__)
398
- /* __VERSIONNUM__ = 0xVVRRPPTT */
399
- # define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF)
400
- # define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF)
401
- # define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF)
402
- # define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF)
403
- #endif
404
-
405
- #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
406
- # define COMPILER_ID "IAR"
407
- # if defined(__VER__) && defined(__ICCARM__)
408
- # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
409
- # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
410
- # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
411
- # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
412
- # elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
413
- # define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
414
- # define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
415
- # define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
416
- # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
417
- # endif
418
-
419
-
420
- /* These compilers are either not known or too old to define an
421
- identification macro. Try to identify the platform and guess that
422
- it is the native compiler. */
423
- #elif defined(__hpux) || defined(__hpua)
424
- # define COMPILER_ID "HP"
425
-
426
- #else /* unknown compiler */
427
- # define COMPILER_ID ""
428
- #endif
429
-
430
- /* Construct the string literal in pieces to prevent the source from
431
- getting matched. Store it in a pointer rather than an array
432
- because some compilers will just produce instructions to fill the
433
- array rather than assigning a pointer to a static array. */
434
- char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
435
- #ifdef SIMULATE_ID
436
- char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
437
- #endif
438
-
439
- #ifdef __QNXNTO__
440
- char const* qnxnto = "INFO" ":" "qnxnto[]";
441
- #endif
442
-
443
- #if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
444
- char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
445
- #endif
446
-
447
- #define STRINGIFY_HELPER(X) #X
448
- #define STRINGIFY(X) STRINGIFY_HELPER(X)
449
-
450
- /* Identify known platforms by name. */
451
- #if defined(__linux) || defined(__linux__) || defined(linux)
452
- # define PLATFORM_ID "Linux"
453
-
454
- #elif defined(__MSYS__)
455
- # define PLATFORM_ID "MSYS"
456
-
457
- #elif defined(__CYGWIN__)
458
- # define PLATFORM_ID "Cygwin"
459
-
460
- #elif defined(__MINGW32__)
461
- # define PLATFORM_ID "MinGW"
462
-
463
- #elif defined(__APPLE__)
464
- # define PLATFORM_ID "Darwin"
465
-
466
- #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
467
- # define PLATFORM_ID "Windows"
468
-
469
- #elif defined(__FreeBSD__) || defined(__FreeBSD)
470
- # define PLATFORM_ID "FreeBSD"
471
-
472
- #elif defined(__NetBSD__) || defined(__NetBSD)
473
- # define PLATFORM_ID "NetBSD"
474
-
475
- #elif defined(__OpenBSD__) || defined(__OPENBSD)
476
- # define PLATFORM_ID "OpenBSD"
477
-
478
- #elif defined(__sun) || defined(sun)
479
- # define PLATFORM_ID "SunOS"
480
-
481
- #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
482
- # define PLATFORM_ID "AIX"
483
-
484
- #elif defined(__hpux) || defined(__hpux__)
485
- # define PLATFORM_ID "HP-UX"
486
-
487
- #elif defined(__HAIKU__)
488
- # define PLATFORM_ID "Haiku"
489
-
490
- #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
491
- # define PLATFORM_ID "BeOS"
492
-
493
- #elif defined(__QNX__) || defined(__QNXNTO__)
494
- # define PLATFORM_ID "QNX"
495
-
496
- #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
497
- # define PLATFORM_ID "Tru64"
498
-
499
- #elif defined(__riscos) || defined(__riscos__)
500
- # define PLATFORM_ID "RISCos"
501
-
502
- #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
503
- # define PLATFORM_ID "SINIX"
504
-
505
- #elif defined(__UNIX_SV__)
506
- # define PLATFORM_ID "UNIX_SV"
507
-
508
- #elif defined(__bsdos__)
509
- # define PLATFORM_ID "BSDOS"
510
-
511
- #elif defined(_MPRAS) || defined(MPRAS)
512
- # define PLATFORM_ID "MP-RAS"
513
-
514
- #elif defined(__osf) || defined(__osf__)
515
- # define PLATFORM_ID "OSF1"
516
-
517
- #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
518
- # define PLATFORM_ID "SCO_SV"
519
-
520
- #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
521
- # define PLATFORM_ID "ULTRIX"
522
-
523
- #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
524
- # define PLATFORM_ID "Xenix"
525
-
526
- #elif defined(__WATCOMC__)
527
- # if defined(__LINUX__)
528
- # define PLATFORM_ID "Linux"
529
-
530
- # elif defined(__DOS__)
531
- # define PLATFORM_ID "DOS"
532
-
533
- # elif defined(__OS2__)
534
- # define PLATFORM_ID "OS2"
535
-
536
- # elif defined(__WINDOWS__)
537
- # define PLATFORM_ID "Windows3x"
538
-
539
- # elif defined(__VXWORKS__)
540
- # define PLATFORM_ID "VxWorks"
541
-
542
- # else /* unknown platform */
543
- # define PLATFORM_ID
544
- # endif
545
-
546
- #elif defined(__INTEGRITY)
547
- # if defined(INT_178B)
548
- # define PLATFORM_ID "Integrity178"
549
-
550
- # else /* regular Integrity */
551
- # define PLATFORM_ID "Integrity"
552
- # endif
553
-
554
- # elif defined(_ADI_COMPILER)
555
- # define PLATFORM_ID "ADSP"
556
-
557
- #else /* unknown platform */
558
- # define PLATFORM_ID
559
-
560
- #endif
561
-
562
- /* For windows compilers MSVC and Intel we can determine
563
- the architecture of the compiler being used. This is because
564
- the compilers do not have flags that can change the architecture,
565
- but rather depend on which compiler is being used
566
- */
567
- #if defined(_WIN32) && defined(_MSC_VER)
568
- # if defined(_M_IA64)
569
- # define ARCHITECTURE_ID "IA64"
570
-
571
- # elif defined(_M_ARM64EC)
572
- # define ARCHITECTURE_ID "ARM64EC"
573
-
574
- # elif defined(_M_X64) || defined(_M_AMD64)
575
- # define ARCHITECTURE_ID "x64"
576
-
577
- # elif defined(_M_IX86)
578
- # define ARCHITECTURE_ID "X86"
579
-
580
- # elif defined(_M_ARM64)
581
- # define ARCHITECTURE_ID "ARM64"
582
-
583
- # elif defined(_M_ARM)
584
- # if _M_ARM == 4
585
- # define ARCHITECTURE_ID "ARMV4I"
586
- # elif _M_ARM == 5
587
- # define ARCHITECTURE_ID "ARMV5I"
588
- # else
589
- # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
590
- # endif
591
-
592
- # elif defined(_M_MIPS)
593
- # define ARCHITECTURE_ID "MIPS"
594
-
595
- # elif defined(_M_SH)
596
- # define ARCHITECTURE_ID "SHx"
597
-
598
- # else /* unknown architecture */
599
- # define ARCHITECTURE_ID ""
600
- # endif
601
-
602
- #elif defined(__WATCOMC__)
603
- # if defined(_M_I86)
604
- # define ARCHITECTURE_ID "I86"
605
-
606
- # elif defined(_M_IX86)
607
- # define ARCHITECTURE_ID "X86"
608
-
609
- # else /* unknown architecture */
610
- # define ARCHITECTURE_ID ""
611
- # endif
612
-
613
- #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
614
- # if defined(__ICCARM__)
615
- # define ARCHITECTURE_ID "ARM"
616
-
617
- # elif defined(__ICCRX__)
618
- # define ARCHITECTURE_ID "RX"
619
-
620
- # elif defined(__ICCRH850__)
621
- # define ARCHITECTURE_ID "RH850"
622
-
623
- # elif defined(__ICCRL78__)
624
- # define ARCHITECTURE_ID "RL78"
625
-
626
- # elif defined(__ICCRISCV__)
627
- # define ARCHITECTURE_ID "RISCV"
628
-
629
- # elif defined(__ICCAVR__)
630
- # define ARCHITECTURE_ID "AVR"
631
-
632
- # elif defined(__ICC430__)
633
- # define ARCHITECTURE_ID "MSP430"
634
-
635
- # elif defined(__ICCV850__)
636
- # define ARCHITECTURE_ID "V850"
637
-
638
- # elif defined(__ICC8051__)
639
- # define ARCHITECTURE_ID "8051"
640
-
641
- # elif defined(__ICCSTM8__)
642
- # define ARCHITECTURE_ID "STM8"
643
-
644
- # else /* unknown architecture */
645
- # define ARCHITECTURE_ID ""
646
- # endif
647
-
648
- #elif defined(__ghs__)
649
- # if defined(__PPC64__)
650
- # define ARCHITECTURE_ID "PPC64"
651
-
652
- # elif defined(__ppc__)
653
- # define ARCHITECTURE_ID "PPC"
654
-
655
- # elif defined(__ARM__)
656
- # define ARCHITECTURE_ID "ARM"
657
-
658
- # elif defined(__x86_64__)
659
- # define ARCHITECTURE_ID "x64"
660
-
661
- # elif defined(__i386__)
662
- # define ARCHITECTURE_ID "X86"
663
-
664
- # else /* unknown architecture */
665
- # define ARCHITECTURE_ID ""
666
- # endif
667
-
668
- #elif defined(__clang__) && defined(__ti__)
669
- # if defined(__ARM_ARCH)
670
- # define ARCHITECTURE_ID "Arm"
671
-
672
- # else /* unknown architecture */
673
- # define ARCHITECTURE_ID ""
674
- # endif
675
-
676
- #elif defined(__TI_COMPILER_VERSION__)
677
- # if defined(__TI_ARM__)
678
- # define ARCHITECTURE_ID "ARM"
679
-
680
- # elif defined(__MSP430__)
681
- # define ARCHITECTURE_ID "MSP430"
682
-
683
- # elif defined(__TMS320C28XX__)
684
- # define ARCHITECTURE_ID "TMS320C28x"
685
-
686
- # elif defined(__TMS320C6X__) || defined(_TMS320C6X)
687
- # define ARCHITECTURE_ID "TMS320C6x"
688
-
689
- # else /* unknown architecture */
690
- # define ARCHITECTURE_ID ""
691
- # endif
692
-
693
- # elif defined(__ADSPSHARC__)
694
- # define ARCHITECTURE_ID "SHARC"
695
-
696
- # elif defined(__ADSPBLACKFIN__)
697
- # define ARCHITECTURE_ID "Blackfin"
698
-
699
- #elif defined(__TASKING__)
700
-
701
- # if defined(__CTC__) || defined(__CPTC__)
702
- # define ARCHITECTURE_ID "TriCore"
703
-
704
- # elif defined(__CMCS__)
705
- # define ARCHITECTURE_ID "MCS"
706
-
707
- # elif defined(__CARM__)
708
- # define ARCHITECTURE_ID "ARM"
709
-
710
- # elif defined(__CARC__)
711
- # define ARCHITECTURE_ID "ARC"
712
-
713
- # elif defined(__C51__)
714
- # define ARCHITECTURE_ID "8051"
715
-
716
- # elif defined(__CPCP__)
717
- # define ARCHITECTURE_ID "PCP"
718
-
719
- # else
720
- # define ARCHITECTURE_ID ""
721
- # endif
722
-
723
- #else
724
- # define ARCHITECTURE_ID
725
- #endif
726
-
727
- /* Convert integer to decimal digit literals. */
728
- #define DEC(n) \
729
- ('0' + (((n) / 10000000)%10)), \
730
- ('0' + (((n) / 1000000)%10)), \
731
- ('0' + (((n) / 100000)%10)), \
732
- ('0' + (((n) / 10000)%10)), \
733
- ('0' + (((n) / 1000)%10)), \
734
- ('0' + (((n) / 100)%10)), \
735
- ('0' + (((n) / 10)%10)), \
736
- ('0' + ((n) % 10))
737
-
738
- /* Convert integer to hex digit literals. */
739
- #define HEX(n) \
740
- ('0' + ((n)>>28 & 0xF)), \
741
- ('0' + ((n)>>24 & 0xF)), \
742
- ('0' + ((n)>>20 & 0xF)), \
743
- ('0' + ((n)>>16 & 0xF)), \
744
- ('0' + ((n)>>12 & 0xF)), \
745
- ('0' + ((n)>>8 & 0xF)), \
746
- ('0' + ((n)>>4 & 0xF)), \
747
- ('0' + ((n) & 0xF))
748
-
749
- /* Construct a string literal encoding the version number. */
750
- #ifdef COMPILER_VERSION
751
- char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
752
-
753
- /* Construct a string literal encoding the version number components. */
754
- #elif defined(COMPILER_VERSION_MAJOR)
755
- char const info_version[] = {
756
- 'I', 'N', 'F', 'O', ':',
757
- 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
758
- COMPILER_VERSION_MAJOR,
759
- # ifdef COMPILER_VERSION_MINOR
760
- '.', COMPILER_VERSION_MINOR,
761
- # ifdef COMPILER_VERSION_PATCH
762
- '.', COMPILER_VERSION_PATCH,
763
- # ifdef COMPILER_VERSION_TWEAK
764
- '.', COMPILER_VERSION_TWEAK,
765
- # endif
766
- # endif
767
- # endif
768
- ']','\0'};
769
- #endif
770
-
771
- /* Construct a string literal encoding the internal version number. */
772
- #ifdef COMPILER_VERSION_INTERNAL
773
- char const info_version_internal[] = {
774
- 'I', 'N', 'F', 'O', ':',
775
- 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
776
- 'i','n','t','e','r','n','a','l','[',
777
- COMPILER_VERSION_INTERNAL,']','\0'};
778
- #elif defined(COMPILER_VERSION_INTERNAL_STR)
779
- char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
780
- #endif
781
-
782
- /* Construct a string literal encoding the version number components. */
783
- #ifdef SIMULATE_VERSION_MAJOR
784
- char const info_simulate_version[] = {
785
- 'I', 'N', 'F', 'O', ':',
786
- 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
787
- SIMULATE_VERSION_MAJOR,
788
- # ifdef SIMULATE_VERSION_MINOR
789
- '.', SIMULATE_VERSION_MINOR,
790
- # ifdef SIMULATE_VERSION_PATCH
791
- '.', SIMULATE_VERSION_PATCH,
792
- # ifdef SIMULATE_VERSION_TWEAK
793
- '.', SIMULATE_VERSION_TWEAK,
794
- # endif
795
- # endif
796
- # endif
797
- ']','\0'};
798
- #endif
799
-
800
- /* Construct the string literal in pieces to prevent the source from
801
- getting matched. Store it in a pointer rather than an array
802
- because some compilers will just produce instructions to fill the
803
- array rather than assigning a pointer to a static array. */
804
- char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
805
- char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
806
-
807
-
808
-
809
- #if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L
810
- # if defined(__INTEL_CXX11_MODE__)
811
- # if defined(__cpp_aggregate_nsdmi)
812
- # define CXX_STD 201402L
813
- # else
814
- # define CXX_STD 201103L
815
- # endif
816
- # else
817
- # define CXX_STD 199711L
818
- # endif
819
- #elif defined(_MSC_VER) && defined(_MSVC_LANG)
820
- # define CXX_STD _MSVC_LANG
821
- #else
822
- # define CXX_STD __cplusplus
823
- #endif
824
-
825
- const char* info_language_standard_default = "INFO" ":" "standard_default["
826
- #if CXX_STD > 202002L
827
- "23"
828
- #elif CXX_STD > 201703L
829
- "20"
830
- #elif CXX_STD >= 201703L
831
- "17"
832
- #elif CXX_STD >= 201402L
833
- "14"
834
- #elif CXX_STD >= 201103L
835
- "11"
836
- #else
837
- "98"
838
- #endif
839
- "]";
840
-
841
- const char* info_language_extensions_default = "INFO" ":" "extensions_default["
842
- #if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \
843
- defined(__TI_COMPILER_VERSION__)) && \
844
- !defined(__STRICT_ANSI__)
845
- "ON"
846
- #else
847
- "OFF"
848
- #endif
849
- "]";
850
-
851
- /*--------------------------------------------------------------------------*/
852
-
853
- int main(int argc, char* argv[])
854
- {
855
- int require = 0;
856
- require += info_compiler[argc];
857
- require += info_platform[argc];
858
- require += info_arch[argc];
859
- #ifdef COMPILER_VERSION_MAJOR
860
- require += info_version[argc];
861
- #endif
862
- #ifdef COMPILER_VERSION_INTERNAL
863
- require += info_version_internal[argc];
864
- #endif
865
- #ifdef SIMULATE_ID
866
- require += info_simulate[argc];
867
- #endif
868
- #ifdef SIMULATE_VERSION_MAJOR
869
- require += info_simulate_version[argc];
870
- #endif
871
- #if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
872
- require += info_cray[argc];
873
- #endif
874
- require += info_language_standard_default[argc];
875
- require += info_language_extensions_default[argc];
876
- (void)argv;
877
- return require;
878
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/3.29.2/CompilerIdFortran/CMakeFortranCompilerId.F DELETED
@@ -1,1114 +0,0 @@
1
- PROGRAM CMakeFortranCompilerId
2
- #if 0
3
- ! Identify the compiler
4
- #endif
5
- #if defined(_MSC_VER)
6
- PRINT *, 'INFO:simulate[MSVC]'
7
- # if _MSC_VER >= 1900
8
- PRINT *, 'INFO:simulate_version[019.00]'
9
- # elif _MSC_VER >= 1800
10
- PRINT *, 'INFO:simulate_version[018.00]'
11
- # elif _MSC_VER >= 1700
12
- PRINT *, 'INFO:simulate_version[017.00]'
13
- # elif _MSC_VER >= 1600
14
- PRINT *, 'INFO:simulate_version[016.00]'
15
- # elif _MSC_VER >= 1500
16
- PRINT *, 'INFO:simulate_version[015.00]'
17
- # elif _MSC_VER >= 1400
18
- PRINT *, 'INFO:simulate_version[014.00]'
19
- # elif _MSC_VER >= 1310
20
- PRINT *, 'INFO:simulate_version[013.01]'
21
- # else
22
- PRINT *, 'INFO:simulate_version[013.00]'
23
- # endif
24
- #endif
25
- #if defined(__INTEL_LLVM_COMPILER)
26
- PRINT *, 'INFO:compiler[IntelLLVM]'
27
- ! __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
28
- ! later. Look for 6 digit vs. 8 digit version number to decide encoding.
29
- ! VVVV is no smaller than the current year when a version is released.
30
- # if __INTEL_LLVM_COMPILER < 1000000
31
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
32
- # define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
33
- # define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
34
- # else
35
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
36
- # define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
37
- # define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
38
- # endif
39
- #elif defined(__INTEL_COMPILER) && __INTEL_COMPILER == 201900
40
- PRINT *, 'INFO:compiler[IntelLLVM]'
41
- ! ifx 2021.1 forgot to define __INTEL_LLVM_COMPILER.
42
- ! Instead it defines __INTEL_COMPILER == 201900.
43
- # define COMPILER_VERSION_MAJOR DEC(2021)
44
- # define COMPILER_VERSION_MINOR DEC(1)
45
- # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
46
- # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
47
- #elif defined(__INTEL_COMPILER) || defined(__ICC)
48
- PRINT *, 'INFO:compiler[Intel]'
49
- ! __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later.
50
- # if __INTEL_COMPILER < 2021
51
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
52
- # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
53
- # if defined(__INTEL_COMPILER_UPDATE)
54
- # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
55
- # else
56
- # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
57
- # endif
58
- # else
59
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
60
- # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
61
- ! The third version component from --version is an update index,
62
- ! but no macro is provided for it.
63
- # define COMPILER_VERSION_PATCH DEC(0)
64
- # endif
65
- # if defined(__INTEL_COMPILER_BUILD_DATE)
66
- # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
67
- # endif
68
- #elif defined(__SUNPRO_F95)
69
- PRINT *, 'INFO:compiler[SunPro]'
70
- # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F95>>8)
71
- # define COMPILER_VERSION_MINOR HEX(__SUNPRO_F95>>4 & 0xF)
72
- # define COMPILER_VERSION_PATCH HEX(__SUNPRO_F95 & 0xF)
73
- #elif defined(__SUNPRO_F90)
74
- PRINT *, 'INFO:compiler[SunPro]'
75
- # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F90>>8)
76
- # define COMPILER_VERSION_MINOR HEX(__SUNPRO_F90>>4 & 0xF)
77
- # define COMPILER_VERSION_PATCH HEX(__SUNPRO_F90 & 0xF)
78
- #elif defined(_CRAYFTN)
79
- PRINT *, 'INFO:compiler[Cray]'
80
- # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
81
- # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
82
- # if defined(_RELEASE_PATCHLEVEL)
83
- # define COMPILER_VERSION_PATCH DEC(_RELEASE_PATCHLEVEL)
84
- # endif
85
- #elif defined(__G95__)
86
- PRINT *, 'INFO:compiler[G95]'
87
- # define COMPILER_VERSION_MAJOR DEC(__G95__)
88
- # define COMPILER_VERSION_MINOR DEC(__G95_MINOR__)
89
- #elif defined(__PATHSCALE__)
90
- PRINT *, 'INFO:compiler[PathScale]'
91
- # define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
92
- # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
93
- # if defined(__PATHCC_PATCHLEVEL__)
94
- # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
95
- # endif
96
- #elif defined(__ABSOFT__)
97
- PRINT *, 'INFO:compiler[Absoft]'
98
- #elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
99
- PRINT *, 'INFO:compiler[LCC]'
100
- # define COMPILER_VERSION_MAJOR DEC(1)
101
- # define COMPILER_VERSION_MINOR DEC(__LCC__ - 100)
102
- # if defined(__LCC_MINOR__)
103
- # define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
104
- # endif
105
- #elif defined(__GNUC__)
106
- PRINT *, 'INFO:compiler[GNU]'
107
- # define COMPILER_VERSION_MAJOR DEC(__GNUC__)
108
- # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
109
- # if defined(__GNUC_PATCHLEVEL__)
110
- # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
111
- # endif
112
- #elif defined(__IBMC__)
113
- # if defined(__COMPILER_VER__)
114
- PRINT *, 'INFO:compiler[zOS]'
115
- # elif __IBMC__ >= 800
116
- PRINT *, 'INFO:compiler[XL]'
117
- # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
118
- # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
119
- # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
120
- # else
121
- PRINT *, 'INFO:compiler[VisualAge]'
122
- # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
123
- # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
124
- # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
125
- # endif
126
- #elif defined(__NVCOMPILER) || defined(__NVCOMPILER_LLVM__)
127
- PRINT *, 'INFO:compiler[NVHPC]'
128
- # if defined(__NVCOMPILER_MAJOR__)
129
- # define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
130
- # else
131
- # define COMPILER_VERSION_MAJOR DEC(__PGIC__)
132
- # endif
133
- # if defined(__NVCOMPILER_MINOR__)
134
- # define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
135
- # else
136
- # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
137
- # endif
138
- # if defined(__NVCOMPILER_PATCHLEVEL__)
139
- # define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
140
- # elif defined(__PGIC_PATCHLEVEL__)
141
- # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
142
- # endif
143
- #elif defined(__PGI)
144
- PRINT *, 'INFO:compiler[PGI]'
145
- # define COMPILER_VERSION_MAJOR DEC(__PGIC__)
146
- # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
147
- # if defined(__PGIC_PATCHLEVEL__)
148
- # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
149
- # endif
150
- #elif defined(__FLANG)
151
- PRINT *, 'INFO:compiler[Flang]'
152
- # define COMPILER_VERSION_MAJOR DEC(__FLANG_MAJOR__)
153
- # define COMPILER_VERSION_MINOR DEC(__FLANG_MINOR__)
154
- # if defined(__FLANG_PATCHLEVEL__)
155
- # define COMPILER_VERSION_PATCH DEC(__FLANG_PATCHLEVEL__)
156
- # endif
157
- #elif defined(__flang__)
158
- PRINT *, 'INFO:compiler[LLVMFlang]'
159
- # define COMPILER_VERSION_MAJOR DEC(__flang_major__)
160
- # define COMPILER_VERSION_MINOR DEC(__flang_minor__)
161
- # if defined(__flang_patchlevel__)
162
- # define COMPILER_VERSION_PATCH DEC(__flang_patchlevel__)
163
- # endif
164
- #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
165
- PRINT *, 'INFO:compiler[VisualAge]'
166
- #elif defined(__hpux) || defined(__hpux__)
167
- PRINT *, 'INFO:compiler[HP]'
168
- #elif defined(NAGFOR)
169
- PRINT *, 'INFO:compiler[NAG]'
170
- #define COMPILER_VERSION_MAJOR DEC(__NAG_COMPILER_RELEASE/10)
171
- #define COMPILER_VERSION_MINOR DEC(__NAG_COMPILER_RELEASE % 10)
172
- #define COMPILER_VERSION_PATCH DEC(__NAG_COMPILER_BUILD)
173
- #elif defined(__FUJITSU)
174
- PRINT *, 'INFO:compiler[Fujitsu]'
175
- # if defined(__FRT_major__)
176
- # define COMPILER_VERSION_MAJOR DEC(__FRT_major__)
177
- # define COMPILER_VERSION_MINOR DEC(__FRT_minor__)
178
- # define COMPILER_VERSION_PATCH DEC(__FRT_patchlevel__)
179
- # elif defined(__FRT_version__)
180
- PRINT *, 'INFO:compiler_version['//__FRT_version__//']'
181
- # endif
182
- #else
183
- PRINT *, 'INFO:compiler[]'
184
- #endif
185
- #if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
186
- PRINT *, 'INFO:compiler_wrapper[CrayPrgEnv]'
187
- #endif
188
-
189
- #if 0
190
- ! Identify the platform
191
- #endif
192
- #if defined(__linux) || defined(__linux__) || defined(linux)
193
- PRINT *, 'INFO:platform[Linux]'
194
- #elif defined(__CYGWIN__)
195
- PRINT *, 'INFO:platform[Cygwin]'
196
- #elif defined(__MINGW32__)
197
- PRINT *, 'INFO:platform[MinGW]'
198
- #elif defined(__APPLE__)
199
- PRINT *, 'INFO:platform[Darwin]'
200
- #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
201
- PRINT *, 'INFO:platform[Windows]'
202
- #elif defined(__FreeBSD__) || defined(__FreeBSD)
203
- PRINT *, 'INFO:platform[FreeBSD]'
204
- #elif defined(__NetBSD__) || defined(__NetBSD)
205
- PRINT *, 'INFO:platform[NetBSD]'
206
- #elif defined(__OpenBSD__) || defined(__OPENBSD)
207
- PRINT *, 'INFO:platform[OpenBSD]'
208
- #elif defined(__sun) || defined(sun)
209
- PRINT *, 'INFO:platform[SunOS]'
210
- #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
211
- PRINT *, 'INFO:platform[AIX]'
212
- #elif defined(__hpux) || defined(__hpux__)
213
- PRINT *, 'INFO:platform[HP-UX]'
214
- #elif defined(__HAIKU__)
215
- PRINT *, 'INFO:platform[Haiku]'
216
- #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
217
- PRINT *, 'INFO:platform[BeOS]'
218
- #elif defined(__QNX__) || defined(__QNXNTO__)
219
- PRINT *, 'INFO:platform[QNX]'
220
- #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
221
- PRINT *, 'INFO:platform[Tru64]'
222
- #elif defined(__riscos) || defined(__riscos__)
223
- PRINT *, 'INFO:platform[RISCos]'
224
- #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
225
- PRINT *, 'INFO:platform[SINIX]'
226
- #elif defined(__UNIX_SV__)
227
- PRINT *, 'INFO:platform[UNIX_SV]'
228
- #elif defined(__bsdos__)
229
- PRINT *, 'INFO:platform[BSDOS]'
230
- #elif defined(_MPRAS) || defined(MPRAS)
231
- PRINT *, 'INFO:platform[MP-RAS]'
232
- #elif defined(__osf) || defined(__osf__)
233
- PRINT *, 'INFO:platform[OSF1]'
234
- #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
235
- PRINT *, 'INFO:platform[SCO_SV]'
236
- #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
237
- PRINT *, 'INFO:platform[ULTRIX]'
238
- #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
239
- PRINT *, 'INFO:platform[Xenix]'
240
- #else
241
- PRINT *, 'INFO:platform[]'
242
- #endif
243
- #if defined(_MSC_VER)
244
- # if defined(_M_IA64)
245
- PRINT *, 'INFO:arch[IA64]'
246
- # elif defined(_M_X64) || defined(_M_AMD64)
247
- PRINT *, 'INFO:arch[x64]'
248
- # elif defined(_M_IX86)
249
- PRINT *, 'INFO:arch[X86]'
250
- # endif
251
- #endif
252
-
253
- #if 0
254
- ! Encode compiler version digits
255
- #endif
256
- #define DEC_8(n) (((n) / 10000000) % 10)
257
- #define DEC_7(n) (((n) / 1000000) % 10)
258
- #define DEC_6(n) (((n) / 100000) % 10)
259
- #define DEC_5(n) (((n) / 10000) % 10)
260
- #define DEC_4(n) (((n) / 1000) % 10)
261
- #define DEC_3(n) (((n) / 100) % 10)
262
- #define DEC_2(n) (((n) / 10) % 10)
263
- #define DEC_1(n) (((n) ) % 10)
264
- #define HEX_8(n) ((n)>>28 & 0xF)
265
- #define HEX_7(n) ((n)>>24 & 0xF)
266
- #define HEX_6(n) ((n)>>20 & 0xF)
267
- #define HEX_5(n) ((n)>>16 & 0xF)
268
- #define HEX_4(n) ((n)>>12 & 0xF)
269
- #define HEX_3(n) ((n)>>8 & 0xF)
270
- #define HEX_2(n) ((n)>>4 & 0xF)
271
- #define HEX_1(n) ((n) & 0xF)
272
-
273
- #if defined(COMPILER_VERSION_MAJOR)
274
- # undef DEC
275
- # undef HEX
276
- # define DEC(n) DEC_1(n)
277
- # define HEX(n) HEX_1(n)
278
- # if COMPILER_VERSION_MAJOR == 0
279
- PRINT *, 'INFO:compiler_version_MAJOR_digit_1[0]'
280
- # elif COMPILER_VERSION_MAJOR == 1
281
- PRINT *, 'INFO:compiler_version_MAJOR_digit_1[1]'
282
- # elif COMPILER_VERSION_MAJOR == 2
283
- PRINT *, 'INFO:compiler_version_MAJOR_digit_1[2]'
284
- # elif COMPILER_VERSION_MAJOR == 3
285
- PRINT *, 'INFO:compiler_version_MAJOR_digit_1[3]'
286
- # elif COMPILER_VERSION_MAJOR == 4
287
- PRINT *, 'INFO:compiler_version_MAJOR_digit_1[4]'
288
- # elif COMPILER_VERSION_MAJOR == 5
289
- PRINT *, 'INFO:compiler_version_MAJOR_digit_1[5]'
290
- # elif COMPILER_VERSION_MAJOR == 6
291
- PRINT *, 'INFO:compiler_version_MAJOR_digit_1[6]'
292
- # elif COMPILER_VERSION_MAJOR == 7
293
- PRINT *, 'INFO:compiler_version_MAJOR_digit_1[7]'
294
- # elif COMPILER_VERSION_MAJOR == 8
295
- PRINT *, 'INFO:compiler_version_MAJOR_digit_1[8]'
296
- # elif COMPILER_VERSION_MAJOR == 9
297
- PRINT *, 'INFO:compiler_version_MAJOR_digit_1[9]'
298
- # endif
299
-
300
- # undef DEC
301
- # undef HEX
302
- # define DEC(n) DEC_2(n)
303
- # define HEX(n) HEX_2(n)
304
- # if COMPILER_VERSION_MAJOR == 0
305
- PRINT *, 'INFO:compiler_version_MAJOR_digit_2[0]'
306
- # elif COMPILER_VERSION_MAJOR == 1
307
- PRINT *, 'INFO:compiler_version_MAJOR_digit_2[1]'
308
- # elif COMPILER_VERSION_MAJOR == 2
309
- PRINT *, 'INFO:compiler_version_MAJOR_digit_2[2]'
310
- # elif COMPILER_VERSION_MAJOR == 3
311
- PRINT *, 'INFO:compiler_version_MAJOR_digit_2[3]'
312
- # elif COMPILER_VERSION_MAJOR == 4
313
- PRINT *, 'INFO:compiler_version_MAJOR_digit_2[4]'
314
- # elif COMPILER_VERSION_MAJOR == 5
315
- PRINT *, 'INFO:compiler_version_MAJOR_digit_2[5]'
316
- # elif COMPILER_VERSION_MAJOR == 6
317
- PRINT *, 'INFO:compiler_version_MAJOR_digit_2[6]'
318
- # elif COMPILER_VERSION_MAJOR == 7
319
- PRINT *, 'INFO:compiler_version_MAJOR_digit_2[7]'
320
- # elif COMPILER_VERSION_MAJOR == 8
321
- PRINT *, 'INFO:compiler_version_MAJOR_digit_2[8]'
322
- # elif COMPILER_VERSION_MAJOR == 9
323
- PRINT *, 'INFO:compiler_version_MAJOR_digit_2[9]'
324
- # endif
325
-
326
- # undef DEC
327
- # undef HEX
328
- # define DEC(n) DEC_3(n)
329
- # define HEX(n) HEX_3(n)
330
- # if COMPILER_VERSION_MAJOR == 0
331
- PRINT *, 'INFO:compiler_version_MAJOR_digit_3[0]'
332
- # elif COMPILER_VERSION_MAJOR == 1
333
- PRINT *, 'INFO:compiler_version_MAJOR_digit_3[1]'
334
- # elif COMPILER_VERSION_MAJOR == 2
335
- PRINT *, 'INFO:compiler_version_MAJOR_digit_3[2]'
336
- # elif COMPILER_VERSION_MAJOR == 3
337
- PRINT *, 'INFO:compiler_version_MAJOR_digit_3[3]'
338
- # elif COMPILER_VERSION_MAJOR == 4
339
- PRINT *, 'INFO:compiler_version_MAJOR_digit_3[4]'
340
- # elif COMPILER_VERSION_MAJOR == 5
341
- PRINT *, 'INFO:compiler_version_MAJOR_digit_3[5]'
342
- # elif COMPILER_VERSION_MAJOR == 6
343
- PRINT *, 'INFO:compiler_version_MAJOR_digit_3[6]'
344
- # elif COMPILER_VERSION_MAJOR == 7
345
- PRINT *, 'INFO:compiler_version_MAJOR_digit_3[7]'
346
- # elif COMPILER_VERSION_MAJOR == 8
347
- PRINT *, 'INFO:compiler_version_MAJOR_digit_3[8]'
348
- # elif COMPILER_VERSION_MAJOR == 9
349
- PRINT *, 'INFO:compiler_version_MAJOR_digit_3[9]'
350
- # endif
351
-
352
- # undef DEC
353
- # undef HEX
354
- # define DEC(n) DEC_4(n)
355
- # define HEX(n) HEX_4(n)
356
- # if COMPILER_VERSION_MAJOR == 0
357
- PRINT *, 'INFO:compiler_version_MAJOR_digit_4[0]'
358
- # elif COMPILER_VERSION_MAJOR == 1
359
- PRINT *, 'INFO:compiler_version_MAJOR_digit_4[1]'
360
- # elif COMPILER_VERSION_MAJOR == 2
361
- PRINT *, 'INFO:compiler_version_MAJOR_digit_4[2]'
362
- # elif COMPILER_VERSION_MAJOR == 3
363
- PRINT *, 'INFO:compiler_version_MAJOR_digit_4[3]'
364
- # elif COMPILER_VERSION_MAJOR == 4
365
- PRINT *, 'INFO:compiler_version_MAJOR_digit_4[4]'
366
- # elif COMPILER_VERSION_MAJOR == 5
367
- PRINT *, 'INFO:compiler_version_MAJOR_digit_4[5]'
368
- # elif COMPILER_VERSION_MAJOR == 6
369
- PRINT *, 'INFO:compiler_version_MAJOR_digit_4[6]'
370
- # elif COMPILER_VERSION_MAJOR == 7
371
- PRINT *, 'INFO:compiler_version_MAJOR_digit_4[7]'
372
- # elif COMPILER_VERSION_MAJOR == 8
373
- PRINT *, 'INFO:compiler_version_MAJOR_digit_4[8]'
374
- # elif COMPILER_VERSION_MAJOR == 9
375
- PRINT *, 'INFO:compiler_version_MAJOR_digit_4[9]'
376
- # endif
377
-
378
- # undef DEC
379
- # undef HEX
380
- # define DEC(n) DEC_5(n)
381
- # define HEX(n) HEX_5(n)
382
- # if COMPILER_VERSION_MAJOR == 0
383
- PRINT *, 'INFO:compiler_version_MAJOR_digit_5[0]'
384
- # elif COMPILER_VERSION_MAJOR == 1
385
- PRINT *, 'INFO:compiler_version_MAJOR_digit_5[1]'
386
- # elif COMPILER_VERSION_MAJOR == 2
387
- PRINT *, 'INFO:compiler_version_MAJOR_digit_5[2]'
388
- # elif COMPILER_VERSION_MAJOR == 3
389
- PRINT *, 'INFO:compiler_version_MAJOR_digit_5[3]'
390
- # elif COMPILER_VERSION_MAJOR == 4
391
- PRINT *, 'INFO:compiler_version_MAJOR_digit_5[4]'
392
- # elif COMPILER_VERSION_MAJOR == 5
393
- PRINT *, 'INFO:compiler_version_MAJOR_digit_5[5]'
394
- # elif COMPILER_VERSION_MAJOR == 6
395
- PRINT *, 'INFO:compiler_version_MAJOR_digit_5[6]'
396
- # elif COMPILER_VERSION_MAJOR == 7
397
- PRINT *, 'INFO:compiler_version_MAJOR_digit_5[7]'
398
- # elif COMPILER_VERSION_MAJOR == 8
399
- PRINT *, 'INFO:compiler_version_MAJOR_digit_5[8]'
400
- # elif COMPILER_VERSION_MAJOR == 9
401
- PRINT *, 'INFO:compiler_version_MAJOR_digit_5[9]'
402
- # endif
403
-
404
- # undef DEC
405
- # undef HEX
406
- # define DEC(n) DEC_6(n)
407
- # define HEX(n) HEX_6(n)
408
- # if COMPILER_VERSION_MAJOR == 0
409
- PRINT *, 'INFO:compiler_version_MAJOR_digit_6[0]'
410
- # elif COMPILER_VERSION_MAJOR == 1
411
- PRINT *, 'INFO:compiler_version_MAJOR_digit_6[1]'
412
- # elif COMPILER_VERSION_MAJOR == 2
413
- PRINT *, 'INFO:compiler_version_MAJOR_digit_6[2]'
414
- # elif COMPILER_VERSION_MAJOR == 3
415
- PRINT *, 'INFO:compiler_version_MAJOR_digit_6[3]'
416
- # elif COMPILER_VERSION_MAJOR == 4
417
- PRINT *, 'INFO:compiler_version_MAJOR_digit_6[4]'
418
- # elif COMPILER_VERSION_MAJOR == 5
419
- PRINT *, 'INFO:compiler_version_MAJOR_digit_6[5]'
420
- # elif COMPILER_VERSION_MAJOR == 6
421
- PRINT *, 'INFO:compiler_version_MAJOR_digit_6[6]'
422
- # elif COMPILER_VERSION_MAJOR == 7
423
- PRINT *, 'INFO:compiler_version_MAJOR_digit_6[7]'
424
- # elif COMPILER_VERSION_MAJOR == 8
425
- PRINT *, 'INFO:compiler_version_MAJOR_digit_6[8]'
426
- # elif COMPILER_VERSION_MAJOR == 9
427
- PRINT *, 'INFO:compiler_version_MAJOR_digit_6[9]'
428
- # endif
429
-
430
- # undef DEC
431
- # undef HEX
432
- # define DEC(n) DEC_7(n)
433
- # define HEX(n) HEX_7(n)
434
- # if COMPILER_VERSION_MAJOR == 0
435
- PRINT *, 'INFO:compiler_version_MAJOR_digit_7[0]'
436
- # elif COMPILER_VERSION_MAJOR == 1
437
- PRINT *, 'INFO:compiler_version_MAJOR_digit_7[1]'
438
- # elif COMPILER_VERSION_MAJOR == 2
439
- PRINT *, 'INFO:compiler_version_MAJOR_digit_7[2]'
440
- # elif COMPILER_VERSION_MAJOR == 3
441
- PRINT *, 'INFO:compiler_version_MAJOR_digit_7[3]'
442
- # elif COMPILER_VERSION_MAJOR == 4
443
- PRINT *, 'INFO:compiler_version_MAJOR_digit_7[4]'
444
- # elif COMPILER_VERSION_MAJOR == 5
445
- PRINT *, 'INFO:compiler_version_MAJOR_digit_7[5]'
446
- # elif COMPILER_VERSION_MAJOR == 6
447
- PRINT *, 'INFO:compiler_version_MAJOR_digit_7[6]'
448
- # elif COMPILER_VERSION_MAJOR == 7
449
- PRINT *, 'INFO:compiler_version_MAJOR_digit_7[7]'
450
- # elif COMPILER_VERSION_MAJOR == 8
451
- PRINT *, 'INFO:compiler_version_MAJOR_digit_7[8]'
452
- # elif COMPILER_VERSION_MAJOR == 9
453
- PRINT *, 'INFO:compiler_version_MAJOR_digit_7[9]'
454
- # endif
455
-
456
- # undef DEC
457
- # undef HEX
458
- # define DEC(n) DEC_8(n)
459
- # define HEX(n) HEX_8(n)
460
- # if COMPILER_VERSION_MAJOR == 0
461
- PRINT *, 'INFO:compiler_version_MAJOR_digit_8[0]'
462
- # elif COMPILER_VERSION_MAJOR == 1
463
- PRINT *, 'INFO:compiler_version_MAJOR_digit_8[1]'
464
- # elif COMPILER_VERSION_MAJOR == 2
465
- PRINT *, 'INFO:compiler_version_MAJOR_digit_8[2]'
466
- # elif COMPILER_VERSION_MAJOR == 3
467
- PRINT *, 'INFO:compiler_version_MAJOR_digit_8[3]'
468
- # elif COMPILER_VERSION_MAJOR == 4
469
- PRINT *, 'INFO:compiler_version_MAJOR_digit_8[4]'
470
- # elif COMPILER_VERSION_MAJOR == 5
471
- PRINT *, 'INFO:compiler_version_MAJOR_digit_8[5]'
472
- # elif COMPILER_VERSION_MAJOR == 6
473
- PRINT *, 'INFO:compiler_version_MAJOR_digit_8[6]'
474
- # elif COMPILER_VERSION_MAJOR == 7
475
- PRINT *, 'INFO:compiler_version_MAJOR_digit_8[7]'
476
- # elif COMPILER_VERSION_MAJOR == 8
477
- PRINT *, 'INFO:compiler_version_MAJOR_digit_8[8]'
478
- # elif COMPILER_VERSION_MAJOR == 9
479
- PRINT *, 'INFO:compiler_version_MAJOR_digit_8[9]'
480
- # endif
481
-
482
- #endif
483
- #if defined(COMPILER_VERSION_MINOR)
484
- # undef DEC
485
- # undef HEX
486
- # define DEC(n) DEC_1(n)
487
- # define HEX(n) HEX_1(n)
488
- # if COMPILER_VERSION_MINOR == 0
489
- PRINT *, 'INFO:compiler_version_MINOR_digit_1[0]'
490
- # elif COMPILER_VERSION_MINOR == 1
491
- PRINT *, 'INFO:compiler_version_MINOR_digit_1[1]'
492
- # elif COMPILER_VERSION_MINOR == 2
493
- PRINT *, 'INFO:compiler_version_MINOR_digit_1[2]'
494
- # elif COMPILER_VERSION_MINOR == 3
495
- PRINT *, 'INFO:compiler_version_MINOR_digit_1[3]'
496
- # elif COMPILER_VERSION_MINOR == 4
497
- PRINT *, 'INFO:compiler_version_MINOR_digit_1[4]'
498
- # elif COMPILER_VERSION_MINOR == 5
499
- PRINT *, 'INFO:compiler_version_MINOR_digit_1[5]'
500
- # elif COMPILER_VERSION_MINOR == 6
501
- PRINT *, 'INFO:compiler_version_MINOR_digit_1[6]'
502
- # elif COMPILER_VERSION_MINOR == 7
503
- PRINT *, 'INFO:compiler_version_MINOR_digit_1[7]'
504
- # elif COMPILER_VERSION_MINOR == 8
505
- PRINT *, 'INFO:compiler_version_MINOR_digit_1[8]'
506
- # elif COMPILER_VERSION_MINOR == 9
507
- PRINT *, 'INFO:compiler_version_MINOR_digit_1[9]'
508
- # endif
509
-
510
- # undef DEC
511
- # undef HEX
512
- # define DEC(n) DEC_2(n)
513
- # define HEX(n) HEX_2(n)
514
- # if COMPILER_VERSION_MINOR == 0
515
- PRINT *, 'INFO:compiler_version_MINOR_digit_2[0]'
516
- # elif COMPILER_VERSION_MINOR == 1
517
- PRINT *, 'INFO:compiler_version_MINOR_digit_2[1]'
518
- # elif COMPILER_VERSION_MINOR == 2
519
- PRINT *, 'INFO:compiler_version_MINOR_digit_2[2]'
520
- # elif COMPILER_VERSION_MINOR == 3
521
- PRINT *, 'INFO:compiler_version_MINOR_digit_2[3]'
522
- # elif COMPILER_VERSION_MINOR == 4
523
- PRINT *, 'INFO:compiler_version_MINOR_digit_2[4]'
524
- # elif COMPILER_VERSION_MINOR == 5
525
- PRINT *, 'INFO:compiler_version_MINOR_digit_2[5]'
526
- # elif COMPILER_VERSION_MINOR == 6
527
- PRINT *, 'INFO:compiler_version_MINOR_digit_2[6]'
528
- # elif COMPILER_VERSION_MINOR == 7
529
- PRINT *, 'INFO:compiler_version_MINOR_digit_2[7]'
530
- # elif COMPILER_VERSION_MINOR == 8
531
- PRINT *, 'INFO:compiler_version_MINOR_digit_2[8]'
532
- # elif COMPILER_VERSION_MINOR == 9
533
- PRINT *, 'INFO:compiler_version_MINOR_digit_2[9]'
534
- # endif
535
-
536
- # undef DEC
537
- # undef HEX
538
- # define DEC(n) DEC_3(n)
539
- # define HEX(n) HEX_3(n)
540
- # if COMPILER_VERSION_MINOR == 0
541
- PRINT *, 'INFO:compiler_version_MINOR_digit_3[0]'
542
- # elif COMPILER_VERSION_MINOR == 1
543
- PRINT *, 'INFO:compiler_version_MINOR_digit_3[1]'
544
- # elif COMPILER_VERSION_MINOR == 2
545
- PRINT *, 'INFO:compiler_version_MINOR_digit_3[2]'
546
- # elif COMPILER_VERSION_MINOR == 3
547
- PRINT *, 'INFO:compiler_version_MINOR_digit_3[3]'
548
- # elif COMPILER_VERSION_MINOR == 4
549
- PRINT *, 'INFO:compiler_version_MINOR_digit_3[4]'
550
- # elif COMPILER_VERSION_MINOR == 5
551
- PRINT *, 'INFO:compiler_version_MINOR_digit_3[5]'
552
- # elif COMPILER_VERSION_MINOR == 6
553
- PRINT *, 'INFO:compiler_version_MINOR_digit_3[6]'
554
- # elif COMPILER_VERSION_MINOR == 7
555
- PRINT *, 'INFO:compiler_version_MINOR_digit_3[7]'
556
- # elif COMPILER_VERSION_MINOR == 8
557
- PRINT *, 'INFO:compiler_version_MINOR_digit_3[8]'
558
- # elif COMPILER_VERSION_MINOR == 9
559
- PRINT *, 'INFO:compiler_version_MINOR_digit_3[9]'
560
- # endif
561
-
562
- # undef DEC
563
- # undef HEX
564
- # define DEC(n) DEC_4(n)
565
- # define HEX(n) HEX_4(n)
566
- # if COMPILER_VERSION_MINOR == 0
567
- PRINT *, 'INFO:compiler_version_MINOR_digit_4[0]'
568
- # elif COMPILER_VERSION_MINOR == 1
569
- PRINT *, 'INFO:compiler_version_MINOR_digit_4[1]'
570
- # elif COMPILER_VERSION_MINOR == 2
571
- PRINT *, 'INFO:compiler_version_MINOR_digit_4[2]'
572
- # elif COMPILER_VERSION_MINOR == 3
573
- PRINT *, 'INFO:compiler_version_MINOR_digit_4[3]'
574
- # elif COMPILER_VERSION_MINOR == 4
575
- PRINT *, 'INFO:compiler_version_MINOR_digit_4[4]'
576
- # elif COMPILER_VERSION_MINOR == 5
577
- PRINT *, 'INFO:compiler_version_MINOR_digit_4[5]'
578
- # elif COMPILER_VERSION_MINOR == 6
579
- PRINT *, 'INFO:compiler_version_MINOR_digit_4[6]'
580
- # elif COMPILER_VERSION_MINOR == 7
581
- PRINT *, 'INFO:compiler_version_MINOR_digit_4[7]'
582
- # elif COMPILER_VERSION_MINOR == 8
583
- PRINT *, 'INFO:compiler_version_MINOR_digit_4[8]'
584
- # elif COMPILER_VERSION_MINOR == 9
585
- PRINT *, 'INFO:compiler_version_MINOR_digit_4[9]'
586
- # endif
587
-
588
- # undef DEC
589
- # undef HEX
590
- # define DEC(n) DEC_5(n)
591
- # define HEX(n) HEX_5(n)
592
- # if COMPILER_VERSION_MINOR == 0
593
- PRINT *, 'INFO:compiler_version_MINOR_digit_5[0]'
594
- # elif COMPILER_VERSION_MINOR == 1
595
- PRINT *, 'INFO:compiler_version_MINOR_digit_5[1]'
596
- # elif COMPILER_VERSION_MINOR == 2
597
- PRINT *, 'INFO:compiler_version_MINOR_digit_5[2]'
598
- # elif COMPILER_VERSION_MINOR == 3
599
- PRINT *, 'INFO:compiler_version_MINOR_digit_5[3]'
600
- # elif COMPILER_VERSION_MINOR == 4
601
- PRINT *, 'INFO:compiler_version_MINOR_digit_5[4]'
602
- # elif COMPILER_VERSION_MINOR == 5
603
- PRINT *, 'INFO:compiler_version_MINOR_digit_5[5]'
604
- # elif COMPILER_VERSION_MINOR == 6
605
- PRINT *, 'INFO:compiler_version_MINOR_digit_5[6]'
606
- # elif COMPILER_VERSION_MINOR == 7
607
- PRINT *, 'INFO:compiler_version_MINOR_digit_5[7]'
608
- # elif COMPILER_VERSION_MINOR == 8
609
- PRINT *, 'INFO:compiler_version_MINOR_digit_5[8]'
610
- # elif COMPILER_VERSION_MINOR == 9
611
- PRINT *, 'INFO:compiler_version_MINOR_digit_5[9]'
612
- # endif
613
-
614
- # undef DEC
615
- # undef HEX
616
- # define DEC(n) DEC_6(n)
617
- # define HEX(n) HEX_6(n)
618
- # if COMPILER_VERSION_MINOR == 0
619
- PRINT *, 'INFO:compiler_version_MINOR_digit_6[0]'
620
- # elif COMPILER_VERSION_MINOR == 1
621
- PRINT *, 'INFO:compiler_version_MINOR_digit_6[1]'
622
- # elif COMPILER_VERSION_MINOR == 2
623
- PRINT *, 'INFO:compiler_version_MINOR_digit_6[2]'
624
- # elif COMPILER_VERSION_MINOR == 3
625
- PRINT *, 'INFO:compiler_version_MINOR_digit_6[3]'
626
- # elif COMPILER_VERSION_MINOR == 4
627
- PRINT *, 'INFO:compiler_version_MINOR_digit_6[4]'
628
- # elif COMPILER_VERSION_MINOR == 5
629
- PRINT *, 'INFO:compiler_version_MINOR_digit_6[5]'
630
- # elif COMPILER_VERSION_MINOR == 6
631
- PRINT *, 'INFO:compiler_version_MINOR_digit_6[6]'
632
- # elif COMPILER_VERSION_MINOR == 7
633
- PRINT *, 'INFO:compiler_version_MINOR_digit_6[7]'
634
- # elif COMPILER_VERSION_MINOR == 8
635
- PRINT *, 'INFO:compiler_version_MINOR_digit_6[8]'
636
- # elif COMPILER_VERSION_MINOR == 9
637
- PRINT *, 'INFO:compiler_version_MINOR_digit_6[9]'
638
- # endif
639
-
640
- # undef DEC
641
- # undef HEX
642
- # define DEC(n) DEC_7(n)
643
- # define HEX(n) HEX_7(n)
644
- # if COMPILER_VERSION_MINOR == 0
645
- PRINT *, 'INFO:compiler_version_MINOR_digit_7[0]'
646
- # elif COMPILER_VERSION_MINOR == 1
647
- PRINT *, 'INFO:compiler_version_MINOR_digit_7[1]'
648
- # elif COMPILER_VERSION_MINOR == 2
649
- PRINT *, 'INFO:compiler_version_MINOR_digit_7[2]'
650
- # elif COMPILER_VERSION_MINOR == 3
651
- PRINT *, 'INFO:compiler_version_MINOR_digit_7[3]'
652
- # elif COMPILER_VERSION_MINOR == 4
653
- PRINT *, 'INFO:compiler_version_MINOR_digit_7[4]'
654
- # elif COMPILER_VERSION_MINOR == 5
655
- PRINT *, 'INFO:compiler_version_MINOR_digit_7[5]'
656
- # elif COMPILER_VERSION_MINOR == 6
657
- PRINT *, 'INFO:compiler_version_MINOR_digit_7[6]'
658
- # elif COMPILER_VERSION_MINOR == 7
659
- PRINT *, 'INFO:compiler_version_MINOR_digit_7[7]'
660
- # elif COMPILER_VERSION_MINOR == 8
661
- PRINT *, 'INFO:compiler_version_MINOR_digit_7[8]'
662
- # elif COMPILER_VERSION_MINOR == 9
663
- PRINT *, 'INFO:compiler_version_MINOR_digit_7[9]'
664
- # endif
665
-
666
- # undef DEC
667
- # undef HEX
668
- # define DEC(n) DEC_8(n)
669
- # define HEX(n) HEX_8(n)
670
- # if COMPILER_VERSION_MINOR == 0
671
- PRINT *, 'INFO:compiler_version_MINOR_digit_8[0]'
672
- # elif COMPILER_VERSION_MINOR == 1
673
- PRINT *, 'INFO:compiler_version_MINOR_digit_8[1]'
674
- # elif COMPILER_VERSION_MINOR == 2
675
- PRINT *, 'INFO:compiler_version_MINOR_digit_8[2]'
676
- # elif COMPILER_VERSION_MINOR == 3
677
- PRINT *, 'INFO:compiler_version_MINOR_digit_8[3]'
678
- # elif COMPILER_VERSION_MINOR == 4
679
- PRINT *, 'INFO:compiler_version_MINOR_digit_8[4]'
680
- # elif COMPILER_VERSION_MINOR == 5
681
- PRINT *, 'INFO:compiler_version_MINOR_digit_8[5]'
682
- # elif COMPILER_VERSION_MINOR == 6
683
- PRINT *, 'INFO:compiler_version_MINOR_digit_8[6]'
684
- # elif COMPILER_VERSION_MINOR == 7
685
- PRINT *, 'INFO:compiler_version_MINOR_digit_8[7]'
686
- # elif COMPILER_VERSION_MINOR == 8
687
- PRINT *, 'INFO:compiler_version_MINOR_digit_8[8]'
688
- # elif COMPILER_VERSION_MINOR == 9
689
- PRINT *, 'INFO:compiler_version_MINOR_digit_8[9]'
690
- # endif
691
-
692
- #endif
693
- #if defined(COMPILER_VERSION_PATCH)
694
- # undef DEC
695
- # undef HEX
696
- # define DEC(n) DEC_1(n)
697
- # define HEX(n) HEX_1(n)
698
- # if COMPILER_VERSION_PATCH == 0
699
- PRINT *, 'INFO:compiler_version_PATCH_digit_1[0]'
700
- # elif COMPILER_VERSION_PATCH == 1
701
- PRINT *, 'INFO:compiler_version_PATCH_digit_1[1]'
702
- # elif COMPILER_VERSION_PATCH == 2
703
- PRINT *, 'INFO:compiler_version_PATCH_digit_1[2]'
704
- # elif COMPILER_VERSION_PATCH == 3
705
- PRINT *, 'INFO:compiler_version_PATCH_digit_1[3]'
706
- # elif COMPILER_VERSION_PATCH == 4
707
- PRINT *, 'INFO:compiler_version_PATCH_digit_1[4]'
708
- # elif COMPILER_VERSION_PATCH == 5
709
- PRINT *, 'INFO:compiler_version_PATCH_digit_1[5]'
710
- # elif COMPILER_VERSION_PATCH == 6
711
- PRINT *, 'INFO:compiler_version_PATCH_digit_1[6]'
712
- # elif COMPILER_VERSION_PATCH == 7
713
- PRINT *, 'INFO:compiler_version_PATCH_digit_1[7]'
714
- # elif COMPILER_VERSION_PATCH == 8
715
- PRINT *, 'INFO:compiler_version_PATCH_digit_1[8]'
716
- # elif COMPILER_VERSION_PATCH == 9
717
- PRINT *, 'INFO:compiler_version_PATCH_digit_1[9]'
718
- # endif
719
-
720
- # undef DEC
721
- # undef HEX
722
- # define DEC(n) DEC_2(n)
723
- # define HEX(n) HEX_2(n)
724
- # if COMPILER_VERSION_PATCH == 0
725
- PRINT *, 'INFO:compiler_version_PATCH_digit_2[0]'
726
- # elif COMPILER_VERSION_PATCH == 1
727
- PRINT *, 'INFO:compiler_version_PATCH_digit_2[1]'
728
- # elif COMPILER_VERSION_PATCH == 2
729
- PRINT *, 'INFO:compiler_version_PATCH_digit_2[2]'
730
- # elif COMPILER_VERSION_PATCH == 3
731
- PRINT *, 'INFO:compiler_version_PATCH_digit_2[3]'
732
- # elif COMPILER_VERSION_PATCH == 4
733
- PRINT *, 'INFO:compiler_version_PATCH_digit_2[4]'
734
- # elif COMPILER_VERSION_PATCH == 5
735
- PRINT *, 'INFO:compiler_version_PATCH_digit_2[5]'
736
- # elif COMPILER_VERSION_PATCH == 6
737
- PRINT *, 'INFO:compiler_version_PATCH_digit_2[6]'
738
- # elif COMPILER_VERSION_PATCH == 7
739
- PRINT *, 'INFO:compiler_version_PATCH_digit_2[7]'
740
- # elif COMPILER_VERSION_PATCH == 8
741
- PRINT *, 'INFO:compiler_version_PATCH_digit_2[8]'
742
- # elif COMPILER_VERSION_PATCH == 9
743
- PRINT *, 'INFO:compiler_version_PATCH_digit_2[9]'
744
- # endif
745
-
746
- # undef DEC
747
- # undef HEX
748
- # define DEC(n) DEC_3(n)
749
- # define HEX(n) HEX_3(n)
750
- # if COMPILER_VERSION_PATCH == 0
751
- PRINT *, 'INFO:compiler_version_PATCH_digit_3[0]'
752
- # elif COMPILER_VERSION_PATCH == 1
753
- PRINT *, 'INFO:compiler_version_PATCH_digit_3[1]'
754
- # elif COMPILER_VERSION_PATCH == 2
755
- PRINT *, 'INFO:compiler_version_PATCH_digit_3[2]'
756
- # elif COMPILER_VERSION_PATCH == 3
757
- PRINT *, 'INFO:compiler_version_PATCH_digit_3[3]'
758
- # elif COMPILER_VERSION_PATCH == 4
759
- PRINT *, 'INFO:compiler_version_PATCH_digit_3[4]'
760
- # elif COMPILER_VERSION_PATCH == 5
761
- PRINT *, 'INFO:compiler_version_PATCH_digit_3[5]'
762
- # elif COMPILER_VERSION_PATCH == 6
763
- PRINT *, 'INFO:compiler_version_PATCH_digit_3[6]'
764
- # elif COMPILER_VERSION_PATCH == 7
765
- PRINT *, 'INFO:compiler_version_PATCH_digit_3[7]'
766
- # elif COMPILER_VERSION_PATCH == 8
767
- PRINT *, 'INFO:compiler_version_PATCH_digit_3[8]'
768
- # elif COMPILER_VERSION_PATCH == 9
769
- PRINT *, 'INFO:compiler_version_PATCH_digit_3[9]'
770
- # endif
771
-
772
- # undef DEC
773
- # undef HEX
774
- # define DEC(n) DEC_4(n)
775
- # define HEX(n) HEX_4(n)
776
- # if COMPILER_VERSION_PATCH == 0
777
- PRINT *, 'INFO:compiler_version_PATCH_digit_4[0]'
778
- # elif COMPILER_VERSION_PATCH == 1
779
- PRINT *, 'INFO:compiler_version_PATCH_digit_4[1]'
780
- # elif COMPILER_VERSION_PATCH == 2
781
- PRINT *, 'INFO:compiler_version_PATCH_digit_4[2]'
782
- # elif COMPILER_VERSION_PATCH == 3
783
- PRINT *, 'INFO:compiler_version_PATCH_digit_4[3]'
784
- # elif COMPILER_VERSION_PATCH == 4
785
- PRINT *, 'INFO:compiler_version_PATCH_digit_4[4]'
786
- # elif COMPILER_VERSION_PATCH == 5
787
- PRINT *, 'INFO:compiler_version_PATCH_digit_4[5]'
788
- # elif COMPILER_VERSION_PATCH == 6
789
- PRINT *, 'INFO:compiler_version_PATCH_digit_4[6]'
790
- # elif COMPILER_VERSION_PATCH == 7
791
- PRINT *, 'INFO:compiler_version_PATCH_digit_4[7]'
792
- # elif COMPILER_VERSION_PATCH == 8
793
- PRINT *, 'INFO:compiler_version_PATCH_digit_4[8]'
794
- # elif COMPILER_VERSION_PATCH == 9
795
- PRINT *, 'INFO:compiler_version_PATCH_digit_4[9]'
796
- # endif
797
-
798
- # undef DEC
799
- # undef HEX
800
- # define DEC(n) DEC_5(n)
801
- # define HEX(n) HEX_5(n)
802
- # if COMPILER_VERSION_PATCH == 0
803
- PRINT *, 'INFO:compiler_version_PATCH_digit_5[0]'
804
- # elif COMPILER_VERSION_PATCH == 1
805
- PRINT *, 'INFO:compiler_version_PATCH_digit_5[1]'
806
- # elif COMPILER_VERSION_PATCH == 2
807
- PRINT *, 'INFO:compiler_version_PATCH_digit_5[2]'
808
- # elif COMPILER_VERSION_PATCH == 3
809
- PRINT *, 'INFO:compiler_version_PATCH_digit_5[3]'
810
- # elif COMPILER_VERSION_PATCH == 4
811
- PRINT *, 'INFO:compiler_version_PATCH_digit_5[4]'
812
- # elif COMPILER_VERSION_PATCH == 5
813
- PRINT *, 'INFO:compiler_version_PATCH_digit_5[5]'
814
- # elif COMPILER_VERSION_PATCH == 6
815
- PRINT *, 'INFO:compiler_version_PATCH_digit_5[6]'
816
- # elif COMPILER_VERSION_PATCH == 7
817
- PRINT *, 'INFO:compiler_version_PATCH_digit_5[7]'
818
- # elif COMPILER_VERSION_PATCH == 8
819
- PRINT *, 'INFO:compiler_version_PATCH_digit_5[8]'
820
- # elif COMPILER_VERSION_PATCH == 9
821
- PRINT *, 'INFO:compiler_version_PATCH_digit_5[9]'
822
- # endif
823
-
824
- # undef DEC
825
- # undef HEX
826
- # define DEC(n) DEC_6(n)
827
- # define HEX(n) HEX_6(n)
828
- # if COMPILER_VERSION_PATCH == 0
829
- PRINT *, 'INFO:compiler_version_PATCH_digit_6[0]'
830
- # elif COMPILER_VERSION_PATCH == 1
831
- PRINT *, 'INFO:compiler_version_PATCH_digit_6[1]'
832
- # elif COMPILER_VERSION_PATCH == 2
833
- PRINT *, 'INFO:compiler_version_PATCH_digit_6[2]'
834
- # elif COMPILER_VERSION_PATCH == 3
835
- PRINT *, 'INFO:compiler_version_PATCH_digit_6[3]'
836
- # elif COMPILER_VERSION_PATCH == 4
837
- PRINT *, 'INFO:compiler_version_PATCH_digit_6[4]'
838
- # elif COMPILER_VERSION_PATCH == 5
839
- PRINT *, 'INFO:compiler_version_PATCH_digit_6[5]'
840
- # elif COMPILER_VERSION_PATCH == 6
841
- PRINT *, 'INFO:compiler_version_PATCH_digit_6[6]'
842
- # elif COMPILER_VERSION_PATCH == 7
843
- PRINT *, 'INFO:compiler_version_PATCH_digit_6[7]'
844
- # elif COMPILER_VERSION_PATCH == 8
845
- PRINT *, 'INFO:compiler_version_PATCH_digit_6[8]'
846
- # elif COMPILER_VERSION_PATCH == 9
847
- PRINT *, 'INFO:compiler_version_PATCH_digit_6[9]'
848
- # endif
849
-
850
- # undef DEC
851
- # undef HEX
852
- # define DEC(n) DEC_7(n)
853
- # define HEX(n) HEX_7(n)
854
- # if COMPILER_VERSION_PATCH == 0
855
- PRINT *, 'INFO:compiler_version_PATCH_digit_7[0]'
856
- # elif COMPILER_VERSION_PATCH == 1
857
- PRINT *, 'INFO:compiler_version_PATCH_digit_7[1]'
858
- # elif COMPILER_VERSION_PATCH == 2
859
- PRINT *, 'INFO:compiler_version_PATCH_digit_7[2]'
860
- # elif COMPILER_VERSION_PATCH == 3
861
- PRINT *, 'INFO:compiler_version_PATCH_digit_7[3]'
862
- # elif COMPILER_VERSION_PATCH == 4
863
- PRINT *, 'INFO:compiler_version_PATCH_digit_7[4]'
864
- # elif COMPILER_VERSION_PATCH == 5
865
- PRINT *, 'INFO:compiler_version_PATCH_digit_7[5]'
866
- # elif COMPILER_VERSION_PATCH == 6
867
- PRINT *, 'INFO:compiler_version_PATCH_digit_7[6]'
868
- # elif COMPILER_VERSION_PATCH == 7
869
- PRINT *, 'INFO:compiler_version_PATCH_digit_7[7]'
870
- # elif COMPILER_VERSION_PATCH == 8
871
- PRINT *, 'INFO:compiler_version_PATCH_digit_7[8]'
872
- # elif COMPILER_VERSION_PATCH == 9
873
- PRINT *, 'INFO:compiler_version_PATCH_digit_7[9]'
874
- # endif
875
-
876
- # undef DEC
877
- # undef HEX
878
- # define DEC(n) DEC_8(n)
879
- # define HEX(n) HEX_8(n)
880
- # if COMPILER_VERSION_PATCH == 0
881
- PRINT *, 'INFO:compiler_version_PATCH_digit_8[0]'
882
- # elif COMPILER_VERSION_PATCH == 1
883
- PRINT *, 'INFO:compiler_version_PATCH_digit_8[1]'
884
- # elif COMPILER_VERSION_PATCH == 2
885
- PRINT *, 'INFO:compiler_version_PATCH_digit_8[2]'
886
- # elif COMPILER_VERSION_PATCH == 3
887
- PRINT *, 'INFO:compiler_version_PATCH_digit_8[3]'
888
- # elif COMPILER_VERSION_PATCH == 4
889
- PRINT *, 'INFO:compiler_version_PATCH_digit_8[4]'
890
- # elif COMPILER_VERSION_PATCH == 5
891
- PRINT *, 'INFO:compiler_version_PATCH_digit_8[5]'
892
- # elif COMPILER_VERSION_PATCH == 6
893
- PRINT *, 'INFO:compiler_version_PATCH_digit_8[6]'
894
- # elif COMPILER_VERSION_PATCH == 7
895
- PRINT *, 'INFO:compiler_version_PATCH_digit_8[7]'
896
- # elif COMPILER_VERSION_PATCH == 8
897
- PRINT *, 'INFO:compiler_version_PATCH_digit_8[8]'
898
- # elif COMPILER_VERSION_PATCH == 9
899
- PRINT *, 'INFO:compiler_version_PATCH_digit_8[9]'
900
- # endif
901
-
902
- #endif
903
- #if defined(COMPILER_VERSION_TWEAK)
904
- # undef DEC
905
- # undef HEX
906
- # define DEC(n) DEC_1(n)
907
- # define HEX(n) HEX_1(n)
908
- # if COMPILER_VERSION_TWEAK == 0
909
- PRINT *, 'INFO:compiler_version_TWEAK_digit_1[0]'
910
- # elif COMPILER_VERSION_TWEAK == 1
911
- PRINT *, 'INFO:compiler_version_TWEAK_digit_1[1]'
912
- # elif COMPILER_VERSION_TWEAK == 2
913
- PRINT *, 'INFO:compiler_version_TWEAK_digit_1[2]'
914
- # elif COMPILER_VERSION_TWEAK == 3
915
- PRINT *, 'INFO:compiler_version_TWEAK_digit_1[3]'
916
- # elif COMPILER_VERSION_TWEAK == 4
917
- PRINT *, 'INFO:compiler_version_TWEAK_digit_1[4]'
918
- # elif COMPILER_VERSION_TWEAK == 5
919
- PRINT *, 'INFO:compiler_version_TWEAK_digit_1[5]'
920
- # elif COMPILER_VERSION_TWEAK == 6
921
- PRINT *, 'INFO:compiler_version_TWEAK_digit_1[6]'
922
- # elif COMPILER_VERSION_TWEAK == 7
923
- PRINT *, 'INFO:compiler_version_TWEAK_digit_1[7]'
924
- # elif COMPILER_VERSION_TWEAK == 8
925
- PRINT *, 'INFO:compiler_version_TWEAK_digit_1[8]'
926
- # elif COMPILER_VERSION_TWEAK == 9
927
- PRINT *, 'INFO:compiler_version_TWEAK_digit_1[9]'
928
- # endif
929
-
930
- # undef DEC
931
- # undef HEX
932
- # define DEC(n) DEC_2(n)
933
- # define HEX(n) HEX_2(n)
934
- # if COMPILER_VERSION_TWEAK == 0
935
- PRINT *, 'INFO:compiler_version_TWEAK_digit_2[0]'
936
- # elif COMPILER_VERSION_TWEAK == 1
937
- PRINT *, 'INFO:compiler_version_TWEAK_digit_2[1]'
938
- # elif COMPILER_VERSION_TWEAK == 2
939
- PRINT *, 'INFO:compiler_version_TWEAK_digit_2[2]'
940
- # elif COMPILER_VERSION_TWEAK == 3
941
- PRINT *, 'INFO:compiler_version_TWEAK_digit_2[3]'
942
- # elif COMPILER_VERSION_TWEAK == 4
943
- PRINT *, 'INFO:compiler_version_TWEAK_digit_2[4]'
944
- # elif COMPILER_VERSION_TWEAK == 5
945
- PRINT *, 'INFO:compiler_version_TWEAK_digit_2[5]'
946
- # elif COMPILER_VERSION_TWEAK == 6
947
- PRINT *, 'INFO:compiler_version_TWEAK_digit_2[6]'
948
- # elif COMPILER_VERSION_TWEAK == 7
949
- PRINT *, 'INFO:compiler_version_TWEAK_digit_2[7]'
950
- # elif COMPILER_VERSION_TWEAK == 8
951
- PRINT *, 'INFO:compiler_version_TWEAK_digit_2[8]'
952
- # elif COMPILER_VERSION_TWEAK == 9
953
- PRINT *, 'INFO:compiler_version_TWEAK_digit_2[9]'
954
- # endif
955
-
956
- # undef DEC
957
- # undef HEX
958
- # define DEC(n) DEC_3(n)
959
- # define HEX(n) HEX_3(n)
960
- # if COMPILER_VERSION_TWEAK == 0
961
- PRINT *, 'INFO:compiler_version_TWEAK_digit_3[0]'
962
- # elif COMPILER_VERSION_TWEAK == 1
963
- PRINT *, 'INFO:compiler_version_TWEAK_digit_3[1]'
964
- # elif COMPILER_VERSION_TWEAK == 2
965
- PRINT *, 'INFO:compiler_version_TWEAK_digit_3[2]'
966
- # elif COMPILER_VERSION_TWEAK == 3
967
- PRINT *, 'INFO:compiler_version_TWEAK_digit_3[3]'
968
- # elif COMPILER_VERSION_TWEAK == 4
969
- PRINT *, 'INFO:compiler_version_TWEAK_digit_3[4]'
970
- # elif COMPILER_VERSION_TWEAK == 5
971
- PRINT *, 'INFO:compiler_version_TWEAK_digit_3[5]'
972
- # elif COMPILER_VERSION_TWEAK == 6
973
- PRINT *, 'INFO:compiler_version_TWEAK_digit_3[6]'
974
- # elif COMPILER_VERSION_TWEAK == 7
975
- PRINT *, 'INFO:compiler_version_TWEAK_digit_3[7]'
976
- # elif COMPILER_VERSION_TWEAK == 8
977
- PRINT *, 'INFO:compiler_version_TWEAK_digit_3[8]'
978
- # elif COMPILER_VERSION_TWEAK == 9
979
- PRINT *, 'INFO:compiler_version_TWEAK_digit_3[9]'
980
- # endif
981
-
982
- # undef DEC
983
- # undef HEX
984
- # define DEC(n) DEC_4(n)
985
- # define HEX(n) HEX_4(n)
986
- # if COMPILER_VERSION_TWEAK == 0
987
- PRINT *, 'INFO:compiler_version_TWEAK_digit_4[0]'
988
- # elif COMPILER_VERSION_TWEAK == 1
989
- PRINT *, 'INFO:compiler_version_TWEAK_digit_4[1]'
990
- # elif COMPILER_VERSION_TWEAK == 2
991
- PRINT *, 'INFO:compiler_version_TWEAK_digit_4[2]'
992
- # elif COMPILER_VERSION_TWEAK == 3
993
- PRINT *, 'INFO:compiler_version_TWEAK_digit_4[3]'
994
- # elif COMPILER_VERSION_TWEAK == 4
995
- PRINT *, 'INFO:compiler_version_TWEAK_digit_4[4]'
996
- # elif COMPILER_VERSION_TWEAK == 5
997
- PRINT *, 'INFO:compiler_version_TWEAK_digit_4[5]'
998
- # elif COMPILER_VERSION_TWEAK == 6
999
- PRINT *, 'INFO:compiler_version_TWEAK_digit_4[6]'
1000
- # elif COMPILER_VERSION_TWEAK == 7
1001
- PRINT *, 'INFO:compiler_version_TWEAK_digit_4[7]'
1002
- # elif COMPILER_VERSION_TWEAK == 8
1003
- PRINT *, 'INFO:compiler_version_TWEAK_digit_4[8]'
1004
- # elif COMPILER_VERSION_TWEAK == 9
1005
- PRINT *, 'INFO:compiler_version_TWEAK_digit_4[9]'
1006
- # endif
1007
-
1008
- # undef DEC
1009
- # undef HEX
1010
- # define DEC(n) DEC_5(n)
1011
- # define HEX(n) HEX_5(n)
1012
- # if COMPILER_VERSION_TWEAK == 0
1013
- PRINT *, 'INFO:compiler_version_TWEAK_digit_5[0]'
1014
- # elif COMPILER_VERSION_TWEAK == 1
1015
- PRINT *, 'INFO:compiler_version_TWEAK_digit_5[1]'
1016
- # elif COMPILER_VERSION_TWEAK == 2
1017
- PRINT *, 'INFO:compiler_version_TWEAK_digit_5[2]'
1018
- # elif COMPILER_VERSION_TWEAK == 3
1019
- PRINT *, 'INFO:compiler_version_TWEAK_digit_5[3]'
1020
- # elif COMPILER_VERSION_TWEAK == 4
1021
- PRINT *, 'INFO:compiler_version_TWEAK_digit_5[4]'
1022
- # elif COMPILER_VERSION_TWEAK == 5
1023
- PRINT *, 'INFO:compiler_version_TWEAK_digit_5[5]'
1024
- # elif COMPILER_VERSION_TWEAK == 6
1025
- PRINT *, 'INFO:compiler_version_TWEAK_digit_5[6]'
1026
- # elif COMPILER_VERSION_TWEAK == 7
1027
- PRINT *, 'INFO:compiler_version_TWEAK_digit_5[7]'
1028
- # elif COMPILER_VERSION_TWEAK == 8
1029
- PRINT *, 'INFO:compiler_version_TWEAK_digit_5[8]'
1030
- # elif COMPILER_VERSION_TWEAK == 9
1031
- PRINT *, 'INFO:compiler_version_TWEAK_digit_5[9]'
1032
- # endif
1033
-
1034
- # undef DEC
1035
- # undef HEX
1036
- # define DEC(n) DEC_6(n)
1037
- # define HEX(n) HEX_6(n)
1038
- # if COMPILER_VERSION_TWEAK == 0
1039
- PRINT *, 'INFO:compiler_version_TWEAK_digit_6[0]'
1040
- # elif COMPILER_VERSION_TWEAK == 1
1041
- PRINT *, 'INFO:compiler_version_TWEAK_digit_6[1]'
1042
- # elif COMPILER_VERSION_TWEAK == 2
1043
- PRINT *, 'INFO:compiler_version_TWEAK_digit_6[2]'
1044
- # elif COMPILER_VERSION_TWEAK == 3
1045
- PRINT *, 'INFO:compiler_version_TWEAK_digit_6[3]'
1046
- # elif COMPILER_VERSION_TWEAK == 4
1047
- PRINT *, 'INFO:compiler_version_TWEAK_digit_6[4]'
1048
- # elif COMPILER_VERSION_TWEAK == 5
1049
- PRINT *, 'INFO:compiler_version_TWEAK_digit_6[5]'
1050
- # elif COMPILER_VERSION_TWEAK == 6
1051
- PRINT *, 'INFO:compiler_version_TWEAK_digit_6[6]'
1052
- # elif COMPILER_VERSION_TWEAK == 7
1053
- PRINT *, 'INFO:compiler_version_TWEAK_digit_6[7]'
1054
- # elif COMPILER_VERSION_TWEAK == 8
1055
- PRINT *, 'INFO:compiler_version_TWEAK_digit_6[8]'
1056
- # elif COMPILER_VERSION_TWEAK == 9
1057
- PRINT *, 'INFO:compiler_version_TWEAK_digit_6[9]'
1058
- # endif
1059
-
1060
- # undef DEC
1061
- # undef HEX
1062
- # define DEC(n) DEC_7(n)
1063
- # define HEX(n) HEX_7(n)
1064
- # if COMPILER_VERSION_TWEAK == 0
1065
- PRINT *, 'INFO:compiler_version_TWEAK_digit_7[0]'
1066
- # elif COMPILER_VERSION_TWEAK == 1
1067
- PRINT *, 'INFO:compiler_version_TWEAK_digit_7[1]'
1068
- # elif COMPILER_VERSION_TWEAK == 2
1069
- PRINT *, 'INFO:compiler_version_TWEAK_digit_7[2]'
1070
- # elif COMPILER_VERSION_TWEAK == 3
1071
- PRINT *, 'INFO:compiler_version_TWEAK_digit_7[3]'
1072
- # elif COMPILER_VERSION_TWEAK == 4
1073
- PRINT *, 'INFO:compiler_version_TWEAK_digit_7[4]'
1074
- # elif COMPILER_VERSION_TWEAK == 5
1075
- PRINT *, 'INFO:compiler_version_TWEAK_digit_7[5]'
1076
- # elif COMPILER_VERSION_TWEAK == 6
1077
- PRINT *, 'INFO:compiler_version_TWEAK_digit_7[6]'
1078
- # elif COMPILER_VERSION_TWEAK == 7
1079
- PRINT *, 'INFO:compiler_version_TWEAK_digit_7[7]'
1080
- # elif COMPILER_VERSION_TWEAK == 8
1081
- PRINT *, 'INFO:compiler_version_TWEAK_digit_7[8]'
1082
- # elif COMPILER_VERSION_TWEAK == 9
1083
- PRINT *, 'INFO:compiler_version_TWEAK_digit_7[9]'
1084
- # endif
1085
-
1086
- # undef DEC
1087
- # undef HEX
1088
- # define DEC(n) DEC_8(n)
1089
- # define HEX(n) HEX_8(n)
1090
- # if COMPILER_VERSION_TWEAK == 0
1091
- PRINT *, 'INFO:compiler_version_TWEAK_digit_8[0]'
1092
- # elif COMPILER_VERSION_TWEAK == 1
1093
- PRINT *, 'INFO:compiler_version_TWEAK_digit_8[1]'
1094
- # elif COMPILER_VERSION_TWEAK == 2
1095
- PRINT *, 'INFO:compiler_version_TWEAK_digit_8[2]'
1096
- # elif COMPILER_VERSION_TWEAK == 3
1097
- PRINT *, 'INFO:compiler_version_TWEAK_digit_8[3]'
1098
- # elif COMPILER_VERSION_TWEAK == 4
1099
- PRINT *, 'INFO:compiler_version_TWEAK_digit_8[4]'
1100
- # elif COMPILER_VERSION_TWEAK == 5
1101
- PRINT *, 'INFO:compiler_version_TWEAK_digit_8[5]'
1102
- # elif COMPILER_VERSION_TWEAK == 6
1103
- PRINT *, 'INFO:compiler_version_TWEAK_digit_8[6]'
1104
- # elif COMPILER_VERSION_TWEAK == 7
1105
- PRINT *, 'INFO:compiler_version_TWEAK_digit_8[7]'
1106
- # elif COMPILER_VERSION_TWEAK == 8
1107
- PRINT *, 'INFO:compiler_version_TWEAK_digit_8[8]'
1108
- # elif COMPILER_VERSION_TWEAK == 9
1109
- PRINT *, 'INFO:compiler_version_TWEAK_digit_8[9]'
1110
- # endif
1111
-
1112
- #endif
1113
-
1114
- END
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/CMakeConfigureLog.yaml DELETED
The diff for this file is too large to render. See raw diff
 
build_final2/CMakeFiles/FindOpenMP/ompver_C.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ef651e99962c60a4118f2ff52dc2c136c1859595974b91e09ff958c1fdef942d
3
- size 63760
 
 
 
 
build_final2/CMakeFiles/FindOpenMP/ompver_CXX.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c50ffd51460a1adcb0b889843df8857b2a1c6f62549d4f8d3d311828fdbb1655
3
- size 63767
 
 
 
 
build_final2/CMakeFiles/FindOpenMP/ompver_Fortran.bin DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9f887390f2be8df584170e7f5f3e7eafbf087e21a5d9cf2f9b977efaf1bd87e4
3
- size 64721
 
 
 
 
build_final2/CMakeFiles/TargetDirectories.txt DELETED
@@ -1,71 +0,0 @@
1
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/CMakeFiles/bob_quantum.dir
2
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/CMakeFiles/test.dir
3
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/CMakeFiles/edit_cache.dir
4
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/CMakeFiles/rebuild_cache.dir
5
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/CMakeFiles/list_install_components.dir
6
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/CMakeFiles/install.dir
7
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/CMakeFiles/install/local.dir
8
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/CMakeFiles/install/strip.dir
9
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/racket/CMakeFiles/racket_bindings.dir
10
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/racket/CMakeFiles/test.dir
11
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/racket/CMakeFiles/edit_cache.dir
12
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/racket/CMakeFiles/rebuild_cache.dir
13
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/racket/CMakeFiles/list_install_components.dir
14
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/racket/CMakeFiles/install.dir
15
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/racket/CMakeFiles/install/local.dir
16
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/racket/CMakeFiles/install/strip.dir
17
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/janet/CMakeFiles/janet_bindings.dir
18
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/janet/CMakeFiles/test.dir
19
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/janet/CMakeFiles/edit_cache.dir
20
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/janet/CMakeFiles/rebuild_cache.dir
21
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/janet/CMakeFiles/list_install_components.dir
22
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/janet/CMakeFiles/install.dir
23
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/janet/CMakeFiles/install/local.dir
24
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/janet/CMakeFiles/install/strip.dir
25
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/zig/CMakeFiles/zig_bindings.dir
26
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/zig/CMakeFiles/test.dir
27
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/zig/CMakeFiles/edit_cache.dir
28
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/zig/CMakeFiles/rebuild_cache.dir
29
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/zig/CMakeFiles/list_install_components.dir
30
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/zig/CMakeFiles/install.dir
31
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/zig/CMakeFiles/install/local.dir
32
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/zig/CMakeFiles/install/strip.dir
33
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/odin/CMakeFiles/odin_bindings.dir
34
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/odin/CMakeFiles/test.dir
35
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/odin/CMakeFiles/edit_cache.dir
36
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/odin/CMakeFiles/rebuild_cache.dir
37
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/odin/CMakeFiles/list_install_components.dir
38
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/odin/CMakeFiles/install.dir
39
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/odin/CMakeFiles/install/local.dir
40
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/odin/CMakeFiles/install/strip.dir
41
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/julia/CMakeFiles/julia_bindings.dir
42
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/julia/CMakeFiles/test.dir
43
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/julia/CMakeFiles/edit_cache.dir
44
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/julia/CMakeFiles/rebuild_cache.dir
45
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/julia/CMakeFiles/list_install_components.dir
46
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/julia/CMakeFiles/install.dir
47
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/julia/CMakeFiles/install/local.dir
48
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/julia/CMakeFiles/install/strip.dir
49
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/r/CMakeFiles/r_bindings.dir
50
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/r/CMakeFiles/test.dir
51
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/r/CMakeFiles/edit_cache.dir
52
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/r/CMakeFiles/rebuild_cache.dir
53
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/r/CMakeFiles/list_install_components.dir
54
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/r/CMakeFiles/install.dir
55
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/r/CMakeFiles/install/local.dir
56
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/r/CMakeFiles/install/strip.dir
57
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/tests/CMakeFiles/test.dir
58
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/tests/CMakeFiles/edit_cache.dir
59
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/tests/CMakeFiles/rebuild_cache.dir
60
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/tests/CMakeFiles/list_install_components.dir
61
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/tests/CMakeFiles/install.dir
62
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/tests/CMakeFiles/install/local.dir
63
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/tests/CMakeFiles/install/strip.dir
64
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/benchmarks/CMakeFiles/bob_benchmarks.dir
65
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/benchmarks/CMakeFiles/test.dir
66
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/benchmarks/CMakeFiles/edit_cache.dir
67
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/benchmarks/CMakeFiles/rebuild_cache.dir
68
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/benchmarks/CMakeFiles/list_install_components.dir
69
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/benchmarks/CMakeFiles/install.dir
70
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/benchmarks/CMakeFiles/install/local.dir
71
- C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2/benchmarks/CMakeFiles/install/strip.dir
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/FortranDependInfo.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "bmi-installation" : null,
3
- "compiler-frontend-variant" : "GNU",
4
- "compiler-id" : "GNU",
5
- "compiler-simulate-id" : "",
6
- "config" : "Release",
7
- "cxx-modules" : {},
8
- "dir-cur-bld" : "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2",
9
- "dir-cur-src" : "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster",
10
- "dir-top-bld" : "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2",
11
- "dir-top-src" : "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster",
12
- "exports" : [],
13
- "forward-modules-from-target-dirs" : [],
14
- "include-dirs" :
15
- [
16
- "C:\\Users\\jessi\\Desktop\\bobs control repo\\sov-kernel-monster\\include"
17
- ],
18
- "language" : "Fortran",
19
- "linked-target-dirs" : [],
20
- "module-dir" : "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/build_final2",
21
- "submodule-ext" : ".smod",
22
- "submodule-sep" : "@"
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_abi.f90-pp.f90 DELETED
@@ -1,491 +0,0 @@
1
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_abi.f90"
2
- # 1 "<built-in>"
3
- # 1 "<command-line>"
4
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_abi.f90"
5
- ! BOB Quantum Civilization Engine - C ABI Wrapper
6
- ! Module: bob_abi
7
- ! Purpose: Complete C-compatible interface for all BOB functionality
8
- ! Standard: Fortran 2018
9
-
10
- module bob_abi
11
- use, intrinsic :: iso_c_binding
12
- use bob_kinds
13
- use bob_errors
14
- use bob_state
15
- use bob_gates
16
- use bob_rng
17
- use bob_lattice
18
- use bob_measurement
19
- use bob_metrics
20
- use bob_hamiltonian
21
- use bob_integrator
22
- implicit none
23
- private
24
-
25
- ! Export all C functions
26
- public :: bob_engine_version
27
- public :: bob_engine_info
28
- public :: bob_last_error_message
29
-
30
- contains
31
-
32
- !> Get engine version string
33
- subroutine bob_engine_version(version_str, max_len) bind(C, name="bob_engine_version")
34
- character(kind=c_char), dimension(*), intent(out) :: version_str
35
- integer(c_int), value :: max_len
36
-
37
- character(len=64) :: version
38
- integer :: i, len_version
39
-
40
- version = "BOB Quantum Engine v1.0.0"
41
- len_version = min(len_trim(version), max_len - 1)
42
-
43
- do i = 1, len_version
44
- version_str(i) = version(i:i)
45
- end do
46
- version_str(len_version + 1) = c_null_char
47
- end subroutine bob_engine_version
48
-
49
- !> Get engine information
50
- subroutine bob_engine_info(info_str, max_len) bind(C, name="bob_engine_info")
51
- character(kind=c_char), dimension(*), intent(out) :: info_str
52
- integer(c_int), value :: max_len
53
-
54
- character(len=512) :: info
55
- integer :: i, len_info
56
-
57
- info = "BOB Quantum Civilization Engine" // c_new_line // &
58
- "Fortran 2018 Implementation" // c_new_line // &
59
- "Features: State vectors, Gates, Lattices, Measurement, " // &
60
- "Hamiltonians, Time evolution" // c_new_line // &
61
- "License: MIT (Sovereign Source)"
62
-
63
- len_info = min(len_trim(info), max_len - 1)
64
-
65
- do i = 1, len_info
66
- info_str(i) = info(i:i)
67
- end do
68
- info_str(len_info + 1) = c_null_char
69
- end subroutine bob_engine_info
70
-
71
- !> Get last error message
72
- subroutine bob_last_error_message(msg_str, max_len) bind(C, name="bob_last_error_message")
73
- character(kind=c_char), dimension(*), intent(out) :: msg_str
74
- integer(c_int), value :: max_len
75
-
76
- character(len=256) :: message
77
- integer :: i, len_msg
78
- integer(i4) :: error_code
79
-
80
- error_code = bob_get_last_error()
81
- message = bob_error_message(error_code)
82
-
83
- if (len_trim(g_error_state%message) > 0) then
84
- message = trim(message) // ": " // trim(g_error_state%message)
85
- end if
86
-
87
- if (len_trim(g_error_state%location) > 0) then
88
- message = trim(message) // " [" // trim(g_error_state%location) // "]"
89
- end if
90
-
91
- len_msg = min(len_trim(message), max_len - 1)
92
-
93
- do i = 1, len_msg
94
- msg_str(i) = message(i:i)
95
- end do
96
- msg_str(len_msg + 1) = c_null_char
97
- end subroutine bob_last_error_message
98
-
99
- !> Create complete quantum simulation
100
- function bob_simulation_create(num_qubits, seed) result(sim_ptr) &
101
- bind(C, name="bob_simulation_create")
102
- integer(c_int64_t), value :: num_qubits
103
- integer(c_int64_t), value :: seed
104
- type(c_ptr) :: sim_ptr
105
-
106
- type :: bob_simulation
107
- type(bob_quantum_state) :: state
108
- type(bob_hamiltonian_operator) :: hamiltonian
109
- type(bob_time_integrator) :: integrator
110
- type(bob_rng_state) :: rng
111
- type(bob_quantum_metrics) :: metrics
112
- end type bob_simulation
113
-
114
- type(bob_simulation), pointer :: sim
115
- integer(i8) :: dim
116
-
117
- allocate(sim)
118
-
119
- ! Initialize RNG
120
- call sim%rng%init(seed)
121
-
122
- ! Create state
123
- dim = ishft(1_i8, int(num_qubits))
124
- call sim%state%allocate(dim, "simulation_state")
125
-
126
- ! Initialize to |0...0⟩
127
- sim%state%amplitudes = CZERO
128
- sim%state%amplitudes(1) = CONE
129
- sim%state%is_normalized = .true.
130
-
131
- ! Create Hamiltonian
132
- call sim%hamiltonian%init(dim, "simulation_hamiltonian")
133
-
134
- ! Create integrator (RK4 by default)
135
- call sim%integrator%init(INTEGRATOR_RK4, 0.01_wp, "simulation_integrator")
136
-
137
- ! Initialize metrics
138
- call sim%metrics%init()
139
-
140
- sim_ptr = c_loc(sim)
141
- end function bob_simulation_create
142
-
143
- !> Destroy simulation
144
- subroutine bob_simulation_destroy(sim_ptr) bind(C, name="bob_simulation_destroy")
145
- type(c_ptr), value :: sim_ptr
146
-
147
- type :: bob_simulation
148
- type(bob_quantum_state) :: state
149
- type(bob_hamiltonian_operator) :: hamiltonian
150
- type(bob_time_integrator) :: integrator
151
- type(bob_rng_state) :: rng
152
- type(bob_quantum_metrics) :: metrics
153
- end type bob_simulation
154
-
155
- type(bob_simulation), pointer :: sim
156
-
157
- if (.not. c_associated(sim_ptr)) return
158
-
159
- call c_f_pointer(sim_ptr, sim)
160
-
161
- call sim%state%deallocate()
162
- call sim%hamiltonian%destroy()
163
-
164
- deallocate(sim)
165
- end subroutine bob_simulation_destroy
166
-
167
- !> Run simulation step
168
- function bob_simulation_step(sim_ptr) result(status) &
169
- bind(C, name="bob_simulation_step")
170
- type(c_ptr), value :: sim_ptr
171
- integer(c_int) :: status
172
-
173
- type :: bob_simulation
174
- type(bob_quantum_state) :: state
175
- type(bob_hamiltonian_operator) :: hamiltonian
176
- type(bob_time_integrator) :: integrator
177
- type(bob_rng_state) :: rng
178
- type(bob_quantum_metrics) :: metrics
179
- end type bob_simulation
180
-
181
- type(bob_simulation), pointer :: sim
182
-
183
- if (.not. c_associated(sim_ptr)) then
184
- status = BOB_ERROR_INVALID_ARGUMENT
185
- return
186
- end if
187
-
188
- call c_f_pointer(sim_ptr, sim)
189
-
190
- ! Take integration step
191
- call sim%integrator%step(sim%state, sim%hamiltonian)
192
-
193
- status = bob_get_last_error()
194
- end function bob_simulation_step
195
-
196
- !> Get simulation metrics
197
- function bob_simulation_get_metrics(sim_ptr, energy, entropy, coherence) result(status) &
198
- bind(C, name="bob_simulation_get_metrics")
199
- type(c_ptr), value :: sim_ptr
200
- real(c_double), intent(out) :: energy, entropy, coherence
201
- integer(c_int) :: status
202
-
203
- type :: bob_simulation
204
- type(bob_quantum_state) :: state
205
- type(bob_hamiltonian_operator) :: hamiltonian
206
- type(bob_time_integrator) :: integrator
207
- type(bob_rng_state) :: rng
208
- type(bob_quantum_metrics) :: metrics
209
- end type bob_simulation
210
-
211
- type(bob_simulation), pointer :: sim
212
-
213
- if (.not. c_associated(sim_ptr)) then
214
- status = BOB_ERROR_INVALID_ARGUMENT
215
- energy = ZERO
216
- entropy = ZERO
217
- coherence = ZERO
218
- return
219
- end if
220
-
221
- call c_f_pointer(sim_ptr, sim)
222
-
223
- ! Compute metrics
224
- call sim%metrics%compute_all(sim%state, sim%hamiltonian%matrix)
225
-
226
- energy = sim%metrics%energy
227
- entropy = sim%metrics%von_neumann_entropy
228
- coherence = sim%metrics%coherence
229
-
230
- status = bob_get_last_error()
231
- end function bob_simulation_get_metrics
232
-
233
- !> Batch operations: Create multiple states
234
- function bob_batch_create_states(num_states, dim) result(batch_ptr) &
235
- bind(C, name="bob_batch_create_states")
236
- integer(c_int64_t), value :: num_states, dim
237
- type(c_ptr) :: batch_ptr
238
-
239
- type :: bob_state_batch
240
- integer(i8) :: num_states
241
- type(bob_quantum_state), allocatable :: states(:)
242
- end type bob_state_batch
243
-
244
- type(bob_state_batch), pointer :: batch
245
- integer(i8) :: i
246
- integer :: stat
247
-
248
- allocate(batch, stat=stat)
249
- if (stat /= 0) then
250
- batch_ptr = c_null_ptr
251
- return
252
- end if
253
-
254
- batch%num_states = num_states
255
- allocate(batch%states(num_states), stat=stat)
256
- if (stat /= 0) then
257
- deallocate(batch)
258
- batch_ptr = c_null_ptr
259
- return
260
- end if
261
-
262
- do i = 1, num_states
263
- call batch%states(i)%allocate(dim, "batch_state")
264
- end do
265
-
266
- batch_ptr = c_loc(batch)
267
- end function bob_batch_create_states
268
-
269
- !> Destroy batch of states
270
- subroutine bob_batch_destroy_states(batch_ptr) bind(C, name="bob_batch_destroy_states")
271
- type(c_ptr), value :: batch_ptr
272
-
273
- type :: bob_state_batch
274
- integer(i8) :: num_states
275
- type(bob_quantum_state), allocatable :: states(:)
276
- end type bob_state_batch
277
-
278
- type(bob_state_batch), pointer :: batch
279
- integer(i8) :: i
280
-
281
- if (.not. c_associated(batch_ptr)) return
282
-
283
- call c_f_pointer(batch_ptr, batch)
284
-
285
- do i = 1, batch%num_states
286
- call batch%states(i)%deallocate()
287
- end do
288
-
289
- deallocate(batch%states)
290
- deallocate(batch)
291
- end subroutine bob_batch_destroy_states
292
-
293
- !> Parallel gate application
294
- function bob_batch_apply_gate(batch_ptr, gate_type, qubit_index) result(status) &
295
- bind(C, name="bob_batch_apply_gate")
296
- type(c_ptr), value :: batch_ptr
297
- integer(c_int), value :: gate_type
298
- integer(c_int64_t), value :: qubit_index
299
- integer(c_int) :: status
300
-
301
- type :: bob_state_batch
302
- integer(i8) :: num_states
303
- type(bob_quantum_state), allocatable :: states(:)
304
- end type bob_state_batch
305
-
306
- type(bob_state_batch), pointer :: batch
307
- integer(i8) :: i
308
-
309
- if (.not. c_associated(batch_ptr)) then
310
- status = BOB_ERROR_INVALID_ARGUMENT
311
- return
312
- end if
313
-
314
- call c_f_pointer(batch_ptr, batch)
315
-
316
- ! Apply gate to all states
317
- !$omp parallel do if(batch%num_states > 10)
318
- do i = 1, batch%num_states
319
- call apply_single_qubit_gate(batch%states(i), gate_type, qubit_index)
320
- end do
321
- !$omp end parallel do
322
-
323
- status = BOB_SUCCESS
324
- end function bob_batch_apply_gate
325
-
326
- !> Snapshot operations: Save state to file
327
- function bob_snapshot_save(state_ptr, filename, filename_len) result(status) &
328
- bind(C, name="bob_snapshot_save")
329
- type(c_ptr), value :: state_ptr
330
- character(kind=c_char), dimension(*) :: filename
331
- integer(c_int), value :: filename_len
332
- integer(c_int) :: status
333
-
334
- type(bob_quantum_state), pointer :: state
335
- character(len=:), allocatable :: fname
336
- integer :: unit, i, iostat
337
-
338
- if (.not. c_associated(state_ptr)) then
339
- status = BOB_ERROR_INVALID_ARGUMENT
340
- return
341
- end if
342
-
343
- call c_f_pointer(state_ptr, state)
344
-
345
- ! Convert C string to Fortran string
346
- allocate(character(len=filename_len) :: fname)
347
- do i = 1, filename_len
348
- fname(i:i) = filename(i)
349
- end do
350
-
351
- ! Open file
352
- open(newunit=unit, file=fname, form='unformatted', &
353
- access='stream', status='replace', iostat=iostat)
354
-
355
- if (iostat /= 0) then
356
- status = BOB_ERROR_IO
357
- return
358
- end if
359
-
360
- ! Write state
361
- write(unit, iostat=iostat) state%dim
362
- write(unit, iostat=iostat) state%amplitudes
363
- write(unit, iostat=iostat) state%is_normalized
364
-
365
- close(unit)
366
-
367
- if (iostat /= 0) then
368
- status = BOB_ERROR_IO
369
- else
370
- status = BOB_SUCCESS
371
- end if
372
- end function bob_snapshot_save
373
-
374
- !> Load state from file
375
- function bob_snapshot_load(filename, filename_len) result(state_ptr) &
376
- bind(C, name="bob_snapshot_load")
377
- character(kind=c_char), dimension(*) :: filename
378
- integer(c_int), value :: filename_len
379
- type(c_ptr) :: state_ptr
380
-
381
- type(bob_quantum_state), pointer :: state
382
- character(len=:), allocatable :: fname
383
- integer :: unit, i, iostat
384
- integer(i8) :: dim
385
- logical(lk) :: is_normalized
386
-
387
- ! Convert C string
388
- allocate(character(len=filename_len) :: fname)
389
- do i = 1, filename_len
390
- fname(i:i) = filename(i)
391
- end do
392
-
393
- ! Open file
394
- open(newunit=unit, file=fname, form='unformatted', &
395
- access='stream', status='old', iostat=iostat)
396
-
397
- if (iostat /= 0) then
398
- state_ptr = c_null_ptr
399
- return
400
- end if
401
-
402
- ! Read dimension
403
- read(unit, iostat=iostat) dim
404
- if (iostat /= 0) then
405
- close(unit)
406
- state_ptr = c_null_ptr
407
- return
408
- end if
409
-
410
- ! Allocate state
411
- allocate(state)
412
- call state%allocate(dim, "loaded_state")
413
-
414
- ! Read amplitudes
415
- read(unit, iostat=iostat) state%amplitudes
416
- read(unit, iostat=iostat) is_normalized
417
-
418
- close(unit)
419
-
420
- if (iostat /= 0) then
421
- call state%deallocate()
422
- deallocate(state)
423
- state_ptr = c_null_ptr
424
- return
425
- end if
426
-
427
- state%is_normalized = is_normalized
428
- state_ptr = c_loc(state)
429
- end function bob_snapshot_load
430
-
431
- !> Utility: Get state amplitude
432
- function bob_state_get_amplitude(state_ptr, index, real_part, imag_part) result(status) &
433
- bind(C, name="bob_state_get_amplitude")
434
- type(c_ptr), value :: state_ptr
435
- integer(c_int64_t), value :: index
436
- real(c_double), intent(out) :: real_part, imag_part
437
- integer(c_int) :: status
438
-
439
- type(bob_quantum_state), pointer :: state
440
-
441
- if (.not. c_associated(state_ptr)) then
442
- status = BOB_ERROR_INVALID_ARGUMENT
443
- real_part = ZERO
444
- imag_part = ZERO
445
- return
446
- end if
447
-
448
- call c_f_pointer(state_ptr, state)
449
-
450
- if (index < 0 .or. index >= state%dim) then
451
- status = BOB_ERROR_INVALID_ARGUMENT
452
- real_part = ZERO
453
- imag_part = ZERO
454
- return
455
- end if
456
-
457
- real_part = real(state%amplitudes(index + 1))
458
- imag_part = aimag(state%amplitudes(index + 1))
459
- status = BOB_SUCCESS
460
- end function bob_state_get_amplitude
461
-
462
- !> Utility: Set state amplitude
463
- function bob_state_set_amplitude(state_ptr, index, real_part, imag_part) result(status) &
464
- bind(C, name="bob_state_set_amplitude")
465
- type(c_ptr), value :: state_ptr
466
- integer(c_int64_t), value :: index
467
- real(c_double), value :: real_part, imag_part
468
- integer(c_int) :: status
469
-
470
- type(bob_quantum_state), pointer :: state
471
-
472
- if (.not. c_associated(state_ptr)) then
473
- status = BOB_ERROR_INVALID_ARGUMENT
474
- return
475
- end if
476
-
477
- call c_f_pointer(state_ptr, state)
478
-
479
- if (index < 0 .or. index >= state%dim) then
480
- status = BOB_ERROR_INVALID_ARGUMENT
481
- return
482
- end if
483
-
484
- state%amplitudes(index + 1) = cmplx(real_part, imag_part, cwp)
485
- state%is_normalized = .false.
486
- status = BOB_SUCCESS
487
- end function bob_state_set_amplitude
488
-
489
- end module bob_abi
490
-
491
- ! Made with Bob
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_abi.f90-pp.f90.d DELETED
@@ -1,2 +0,0 @@
1
- CMakeFiles/bob_quantum.dir/src/bob_abi.f90-pp.f90: \
2
- C:/Users/jessi/Desktop/bobs\ control\ repo/sov-kernel-monster/src/bob_abi.f90
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_abi.f90.obj.ddi DELETED
@@ -1,52 +0,0 @@
1
- {
2
- "revision" : 0,
3
- "rules" :
4
- [
5
- {
6
- "outputs" : [],
7
- "primary-output" : "CMakeFiles\\\\bob_quantum.dir\\\\src\\\\bob_abi.f90.obj",
8
- "provides" :
9
- [
10
- {
11
- "compiled-module-path" : "bob_abi.mod",
12
- "is-interface" : true,
13
- "logical-name" : "bob_abi.mod"
14
- }
15
- ],
16
- "requires" :
17
- [
18
- {
19
- "logical-name" : "bob_errors.mod"
20
- },
21
- {
22
- "logical-name" : "bob_gates.mod"
23
- },
24
- {
25
- "logical-name" : "bob_hamiltonian.mod"
26
- },
27
- {
28
- "logical-name" : "bob_integrator.mod"
29
- },
30
- {
31
- "logical-name" : "bob_kinds.mod"
32
- },
33
- {
34
- "logical-name" : "bob_lattice.mod"
35
- },
36
- {
37
- "logical-name" : "bob_measurement.mod"
38
- },
39
- {
40
- "logical-name" : "bob_metrics.mod"
41
- },
42
- {
43
- "logical-name" : "bob_rng.mod"
44
- },
45
- {
46
- "logical-name" : "bob_state.mod"
47
- }
48
- ]
49
- }
50
- ],
51
- "version" : 0
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_circuit.f90-pp.f90 DELETED
@@ -1,380 +0,0 @@
1
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_circuit.f90"
2
- # 1 "<built-in>"
3
- # 1 "<command-line>"
4
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_circuit.f90"
5
- !=====================================================================
6
- ! bob_circuit.f90
7
- ! Quantum circuit IR: Gate, Qubit, Circuit, Measurement
8
- ! QFT, Grover, Shor, QPE algorithms compiled to flat circuit IR.
9
- ! Matches utqc-core/src/lib.rs + utqc-quantum/src/lib.rs exactly.
10
- ! Standard: Fortran 2018
11
- !=====================================================================
12
- module bob_circuit
13
- use, intrinsic :: iso_c_binding, only: c_int32_t, c_int64_t, c_double, &
14
- c_ptr, c_f_pointer, c_loc, c_size_t
15
- use, intrinsic :: iso_fortran_env, only: int64, real64, int32
16
- use bob_kinds
17
- use bob_errors
18
- implicit none
19
- private
20
-
21
- !──────────────────────────────────────────────────────────────────
22
- ! Gate type codes (matches utqc-core SingleGate + DoubleGate enums)
23
- !──────────────────────────────────────────────────────────────────
24
- integer(i4), parameter, public :: GATE_PAULI_X = 0
25
- integer(i4), parameter, public :: GATE_PAULI_Y = 1
26
- integer(i4), parameter, public :: GATE_PAULI_Z = 2
27
- integer(i4), parameter, public :: GATE_HADAMARD = 3
28
- integer(i4), parameter, public :: GATE_T = 4
29
- integer(i4), parameter, public :: GATE_S = 5
30
- integer(i4), parameter, public :: GATE_CNOT = 100
31
- integer(i4), parameter, public :: GATE_CZ = 101
32
- integer(i4), parameter, public :: GATE_SWAP = 102
33
- integer(i4), parameter, public :: GATE_ROTATION = 200 ! parameterized
34
- integer(i4), parameter, public :: GATE_MEASURE = 300
35
-
36
- !> Maximum gates in one circuit
37
- integer(i4), parameter, public :: MAX_CIRCUIT_GATES = 65536
38
- !> Maximum qubits
39
- integer(i4), parameter, public :: MAX_QUBITS = 64
40
-
41
- !> A single gate operation
42
- type, public :: bob_gate_t
43
- integer(i4) :: gate_type = 0 ! GATE_* constant
44
- integer(i4) :: target = -1 ! target qubit (0-indexed)
45
- integer(i4) :: control = -1 ! control qubit (-1 = none)
46
- real(wp) :: angle = ZERO ! rotation angle (radians)
47
- integer(i4) :: classical = -1 ! classical bit for measurement
48
- end type bob_gate_t
49
-
50
- !> Flat quantum circuit IR (non-recursive — matches utqc-core Circuit)
51
- type, public :: bob_circuit_t
52
- integer(i4) :: num_qubits = 0
53
- integer(i4) :: num_classical = 0
54
- integer(i4) :: num_gates = 0
55
- integer(i4) :: num_measurements= 0
56
- type(bob_gate_t) :: gates(MAX_CIRCUIT_GATES)
57
- logical(lk) :: is_valid = .false.
58
- contains
59
- procedure :: add_gate => circuit_add_gate
60
- procedure :: add_measure => circuit_add_measure
61
- procedure :: depth => circuit_depth
62
- procedure :: validate => circuit_validate
63
- procedure :: reset => circuit_reset
64
- end type bob_circuit_t
65
-
66
- public :: circuit_new
67
- public :: circuit_qft
68
- public :: circuit_grover
69
- public :: circuit_qpe
70
- public :: circuit_shor
71
- public :: circuit_bell_pair
72
- public :: circuit_teleportation
73
- public :: grover_optimal_iterations
74
-
75
- ! C ABI
76
- public :: bob_circuit_new
77
- public :: bob_circuit_qft
78
- public :: bob_circuit_grover
79
- public :: bob_circuit_depth
80
- public :: bob_circuit_free
81
-
82
- contains
83
-
84
- !──────────────────────────────────────────────────────────────────
85
- ! Constructor
86
- !──────────────────────────────────────────────────────────────────
87
- pure function circuit_new(num_qubits, num_classical) result(c)
88
- integer(i4), intent(in) :: num_qubits, num_classical
89
- type(bob_circuit_t) :: c
90
- c%num_qubits = num_qubits
91
- c%num_classical = num_classical
92
- c%num_gates = 0
93
- c%is_valid = .true.
94
- end function circuit_new
95
-
96
- subroutine circuit_reset(this)
97
- class(bob_circuit_t), intent(inout) :: this
98
- this%num_gates = 0
99
- this%num_measurements= 0
100
- this%is_valid = .true.
101
- end subroutine circuit_reset
102
-
103
- !──────────────────────────────────────────────────────────────────
104
- ! Add a gate
105
- !──────────────────────────────────────────────────────────────────
106
- subroutine circuit_add_gate(this, gate_type, target, control, angle, status)
107
- class(bob_circuit_t), intent(inout) :: this
108
- integer(i4), intent(in) :: gate_type, target
109
- integer(i4), intent(in), optional :: control
110
- real(wp), intent(in), optional :: angle
111
- integer(i4), intent(out), optional :: status
112
- integer(i4) :: st
113
- st = BOB_SUCCESS
114
- if (.not. this%is_valid) then; st = BOB_ERROR_INVALID_STATE; goto 99; end if
115
- if (this%num_gates >= MAX_CIRCUIT_GATES) then
116
- call bob_set_error(BOB_ERROR_ALLOCATION, "circuit full", "circuit_add_gate")
117
- st = BOB_ERROR_ALLOCATION; goto 99
118
- end if
119
- if (target < 0 .or. target >= this%num_qubits) then
120
- st = BOB_ERROR_INVALID_ARGUMENT; goto 99
121
- end if
122
- this%num_gates = this%num_gates + 1
123
- this%gates(this%num_gates)%gate_type = gate_type
124
- this%gates(this%num_gates)%target = target
125
- this%gates(this%num_gates)%control = -1
126
- this%gates(this%num_gates)%angle = ZERO
127
- this%gates(this%num_gates)%classical = -1
128
- if (present(control)) this%gates(this%num_gates)%control = control
129
- if (present(angle)) this%gates(this%num_gates)%angle = angle
130
- 99 if (present(status)) status = st
131
- end subroutine circuit_add_gate
132
-
133
- subroutine circuit_add_measure(this, qubit, classical_bit, status)
134
- class(bob_circuit_t), intent(inout) :: this
135
- integer(i4), intent(in) :: qubit, classical_bit
136
- integer(i4), intent(out), optional :: status
137
- integer(i4) :: st
138
- st = BOB_SUCCESS
139
- if (qubit < 0 .or. qubit >= this%num_qubits) then
140
- st = BOB_ERROR_INVALID_ARGUMENT; goto 99
141
- end if
142
- this%num_gates = this%num_gates + 1
143
- this%gates(this%num_gates)%gate_type = GATE_MEASURE
144
- this%gates(this%num_gates)%target = qubit
145
- this%gates(this%num_gates)%classical = classical_bit
146
- this%num_measurements = this%num_measurements + 1
147
- 99 if (present(status)) status = st
148
- end subroutine circuit_add_measure
149
-
150
- pure function circuit_depth(this) result(d)
151
- class(bob_circuit_t), intent(in) :: this
152
- integer(i4) :: d
153
- d = this%num_gates
154
- end function circuit_depth
155
-
156
- pure function circuit_validate(this) result(ok)
157
- class(bob_circuit_t), intent(in) :: this
158
- logical :: ok
159
- ok = this%is_valid .and. this%num_gates > 0 .and. this%num_qubits > 0
160
- end function circuit_validate
161
-
162
- !══════════════════════════════════════════════════════════════════
163
- ! QUANTUM FOURIER TRANSFORM
164
- ! QFT on num_qubits starting at qubit 'start'
165
- ! Matches utqc-quantum Qft::circuit exactly
166
- !══════════════════════════════════════════════════════════════════
167
- function circuit_qft(num_qubits, start) result(c)
168
- integer(i4), intent(in) :: num_qubits, start
169
- type(bob_circuit_t) :: c
170
- integer(i4) :: i, j, st
171
- real(wp) :: angle
172
- c = circuit_new(num_qubits, num_qubits)
173
- do i = 0, num_qubits - 1
174
- ! Hadamard on qubit i
175
- call c%add_gate(GATE_HADAMARD, start + i, status=st)
176
- ! Controlled phase rotations
177
- do j = i + 1, num_qubits - 1
178
- angle = PI / real(ishft(1_i4, j - i), wp)
179
- call c%add_gate(GATE_CNOT, start + j, control=start + i, status=st)
180
- call c%add_gate(GATE_ROTATION, start + i, angle=angle, status=st)
181
- end do
182
- end do
183
- ! Swap qubits for standard bit ordering
184
- do i = 0, num_qubits / 2 - 1
185
- call c%add_gate(GATE_SWAP, start + i, &
186
- control=start + num_qubits - 1 - i, status=st)
187
- end do
188
- ! Measure all
189
- do i = 0, num_qubits - 1
190
- call c%add_measure(start + i, i, status=st)
191
- end do
192
- end function circuit_qft
193
-
194
- !══════════════════════════════════════════════════════════════════
195
- ! GROVER'S SEARCH ALGORITHM
196
- ! Matches utqc-quantum Grover::circuit exactly
197
- !══════════════════════════════════════════════════════════════════
198
-
199
- !> Optimal number of Grover iterations: floor(pi/4 * sqrt(N/M))
200
- pure function grover_optimal_iterations(num_qubits, num_solutions) result(k)
201
- integer(i4), intent(in) :: num_qubits, num_solutions
202
- integer(i4) :: k
203
- real(wp) :: n_states, theta
204
- n_states = real(ishft(1_i4, num_qubits), wp)
205
- theta = asin(sqrt(real(num_solutions, wp) / n_states))
206
- k = max(1, int(PI * QUART / theta, i4))
207
- end function grover_optimal_iterations
208
-
209
- function circuit_grover(num_qubits, num_solutions) result(c)
210
- integer(i4), intent(in) :: num_qubits, num_solutions
211
- type(bob_circuit_t) :: c
212
- integer(i4) :: i, iter, iters, st
213
- c = circuit_new(num_qubits, num_qubits)
214
- ! Initialize: H on all
215
- do i = 0, num_qubits - 1
216
- call c%add_gate(GATE_HADAMARD, i, status=st)
217
- end do
218
- iters = grover_optimal_iterations(num_qubits, num_solutions)
219
- do iter = 1, iters
220
- ! Oracle: CZ on qubit 0 and last qubit (placeholder)
221
- if (num_qubits >= 2) then
222
- call c%add_gate(GATE_CZ, num_qubits - 1, control=0, status=st)
223
- end if
224
- ! Diffusion operator: H X CZ X H on all
225
- do i = 0, num_qubits - 1
226
- call c%add_gate(GATE_HADAMARD, i, status=st)
227
- call c%add_gate(GATE_PAULI_X, i, status=st)
228
- end do
229
- if (num_qubits >= 2) then
230
- call c%add_gate(GATE_CZ, num_qubits - 1, control=0, status=st)
231
- end if
232
- do i = 0, num_qubits - 1
233
- call c%add_gate(GATE_PAULI_X, i, status=st)
234
- call c%add_gate(GATE_HADAMARD, i, status=st)
235
- end do
236
- end do
237
- ! Measure
238
- do i = 0, num_qubits - 1
239
- call c%add_measure(i, i, status=st)
240
- end do
241
- end function circuit_grover
242
-
243
- !══════════════════════════════════════════════════════════════════
244
- ! QUANTUM PHASE ESTIMATION
245
- ! num_counting: counting qubits (precision = 2^-num_counting)
246
- ! target: index of the eigenstate qubit
247
- ! Matches utqc-quantum Qpe::circuit
248
- !══════════════════════════════════════════════════════════════════
249
- function circuit_qpe(num_counting, target_qubit) result(c)
250
- integer(i4), intent(in) :: num_counting, target_qubit
251
- type(bob_circuit_t) :: c
252
- integer(i4) :: total, i, power, p, st
253
- type(bob_circuit_t) :: qft_c
254
- total = num_counting + 1
255
- c = circuit_new(total, num_counting)
256
- ! H on counting qubits
257
- do i = 0, num_counting - 1
258
- call c%add_gate(GATE_HADAMARD, i, status=st)
259
- end do
260
- ! Controlled U^(2^i) on target
261
- do i = 0, num_counting - 1
262
- power = ishft(1_i4, i)
263
- do p = 1, power
264
- call c%add_gate(GATE_CNOT, target_qubit, control=i, status=st)
265
- end do
266
- end do
267
- ! Inverse QFT on counting qubits (simplified: just H layer)
268
- do i = 0, num_counting - 1
269
- call c%add_gate(GATE_HADAMARD, i, status=st)
270
- end do
271
- ! Measure counting qubits
272
- do i = 0, num_counting - 1
273
- call c%add_measure(i, i, status=st)
274
- end do
275
- end function circuit_qpe
276
-
277
- !══════════════════════════════════════════════════════════════════
278
- ! SHOR'S ALGORITHM (scaffold)
279
- ! Builds QPE substructure for period finding
280
- ! Matches utqc-quantum Shor::circuit
281
- !══════════════════════════════════════════════════════════════════
282
- function circuit_shor(num_qubits) result(c)
283
- integer(i4), intent(in) :: num_qubits
284
- type(bob_circuit_t) :: c
285
- integer(i4) :: counting
286
- counting = max(1, num_qubits / 2)
287
- c = circuit_qpe(counting, counting)
288
- end function circuit_shor
289
-
290
- !══════════════════════════════════════════════════════════════════
291
- ! BELL PAIR (2-qubit entangled state)
292
- ! |Φ+⟩ = (|00⟩ + |11⟩)/√2
293
- !══════════════════════════════════════════════════════════════════
294
- function circuit_bell_pair() result(c)
295
- type(bob_circuit_t) :: c
296
- integer(i4) :: st
297
- c = circuit_new(2, 2)
298
- call c%add_gate(GATE_HADAMARD, 0, status=st)
299
- call c%add_gate(GATE_CNOT, 1, control=0, status=st)
300
- call c%add_measure(0, 0, status=st)
301
- call c%add_measure(1, 1, status=st)
302
- end function circuit_bell_pair
303
-
304
- !══════════════════════════════════════════════════════════════════
305
- ! QUANTUM TELEPORTATION (3 qubits)
306
- ! |ψ⟩ on qubit 0 teleported to qubit 2 via entangled pair (1,2)
307
- !══════════════════════════════════════════════════════════════════
308
- function circuit_teleportation() result(c)
309
- type(bob_circuit_t) :: c
310
- integer(i4) :: st
311
- c = circuit_new(3, 3)
312
- ! Prepare Bell pair on qubits 1,2
313
- call c%add_gate(GATE_HADAMARD, 1, status=st)
314
- call c%add_gate(GATE_CNOT, 2, control=1, status=st)
315
- ! Alice's operations on qubits 0,1
316
- call c%add_gate(GATE_CNOT, 1, control=0, status=st)
317
- call c%add_gate(GATE_HADAMARD, 0, status=st)
318
- ! Measure Alice's qubits
319
- call c%add_measure(0, 0, status=st)
320
- call c%add_measure(1, 1, status=st)
321
- ! Bob's corrections (conditional X and Z)
322
- call c%add_gate(GATE_PAULI_X, 2, control=1, status=st)
323
- call c%add_gate(GATE_PAULI_Z, 2, control=0, status=st)
324
- call c%add_measure(2, 2, status=st)
325
- end function circuit_teleportation
326
-
327
- !══════════════════════════════════════════════════════════════════
328
- ! C ABI
329
- !══════════════════════════════════════════════════════════════════
330
-
331
- function bob_circuit_new(num_qubits, num_classical) result(ptr) &
332
- bind(C, name="bob_circuit_new")
333
- integer(c_int32_t), value :: num_qubits, num_classical
334
- type(c_ptr) :: ptr
335
- type(bob_circuit_t), pointer :: c
336
- allocate(c)
337
- c = circuit_new(int(num_qubits,i4), int(num_classical,i4))
338
- ptr = c_loc(c)
339
- end function bob_circuit_new
340
-
341
- function bob_circuit_qft(num_qubits, start) result(ptr) &
342
- bind(C, name="bob_circuit_qft")
343
- integer(c_int32_t), value :: num_qubits, start
344
- type(c_ptr) :: ptr
345
- type(bob_circuit_t), pointer :: c
346
- allocate(c)
347
- c = circuit_qft(int(num_qubits,i4), int(start,i4))
348
- ptr = c_loc(c)
349
- end function bob_circuit_qft
350
-
351
- function bob_circuit_grover(num_qubits, num_solutions) result(ptr) &
352
- bind(C, name="bob_circuit_grover")
353
- integer(c_int32_t), value :: num_qubits, num_solutions
354
- type(c_ptr) :: ptr
355
- type(bob_circuit_t), pointer :: c
356
- allocate(c)
357
- c = circuit_grover(int(num_qubits,i4), int(num_solutions,i4))
358
- ptr = c_loc(c)
359
- end function bob_circuit_grover
360
-
361
- function bob_circuit_depth(circ_ptr) result(d) bind(C, name="bob_circuit_depth")
362
- type(c_ptr), value :: circ_ptr
363
- integer(c_int32_t) :: d
364
- type(bob_circuit_t), pointer :: c
365
- if (.not. c_associated(circ_ptr)) then; d = 0; return; end if
366
- call c_f_pointer(circ_ptr, c)
367
- d = c%depth()
368
- end function bob_circuit_depth
369
-
370
- subroutine bob_circuit_free(circ_ptr) bind(C, name="bob_circuit_free")
371
- type(c_ptr), value :: circ_ptr
372
- type(bob_circuit_t), pointer :: c
373
- if (.not. c_associated(circ_ptr)) return
374
- call c_f_pointer(circ_ptr, c)
375
- deallocate(c)
376
- end subroutine bob_circuit_free
377
-
378
- end module bob_circuit
379
-
380
- ! Made with Bob
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_circuit.f90-pp.f90.d DELETED
@@ -1,2 +0,0 @@
1
- CMakeFiles/bob_quantum.dir/src/bob_circuit.f90-pp.f90: \
2
- C:/Users/jessi/Desktop/bobs\ control\ repo/sov-kernel-monster/src/bob_circuit.f90
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_circuit.f90.obj.ddi DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "revision" : 0,
3
- "rules" :
4
- [
5
- {
6
- "outputs" : [],
7
- "primary-output" : "CMakeFiles\\\\bob_quantum.dir\\\\src\\\\bob_circuit.f90.obj",
8
- "provides" :
9
- [
10
- {
11
- "compiled-module-path" : "bob_circuit.mod",
12
- "is-interface" : true,
13
- "logical-name" : "bob_circuit.mod"
14
- }
15
- ],
16
- "requires" :
17
- [
18
- {
19
- "logical-name" : "bob_errors.mod"
20
- },
21
- {
22
- "logical-name" : "bob_kinds.mod"
23
- }
24
- ]
25
- }
26
- ],
27
- "version" : 0
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_errors.f90-pp.f90 DELETED
@@ -1,119 +0,0 @@
1
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_errors.f90"
2
- # 1 "<built-in>"
3
- # 1 "<command-line>"
4
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_errors.f90"
5
- ! BOB Quantum Civilization Engine - Error Handling
6
- ! Module: bob_errors
7
- ! Purpose: Stable error codes and diagnostic message management
8
- ! Standard: Fortran 2018
9
-
10
- module bob_errors
11
- use bob_kinds
12
- implicit none
13
- private
14
-
15
- ! Error codes (stable ABI)
16
- integer(i4), parameter, public :: BOB_SUCCESS = 0
17
- integer(i4), parameter, public :: BOB_ERROR_INVALID_ARGUMENT = 1
18
- integer(i4), parameter, public :: BOB_ERROR_ALLOCATION = 2
19
- integer(i4), parameter, public :: BOB_ERROR_DIMENSION_MISMATCH = 3
20
- integer(i4), parameter, public :: BOB_ERROR_NOT_NORMALIZED = 4
21
- integer(i4), parameter, public :: BOB_ERROR_NOT_HERMITIAN = 5
22
- integer(i4), parameter, public :: BOB_ERROR_NOT_UNITARY = 6
23
- integer(i4), parameter, public :: BOB_ERROR_INVALID_STATE = 7
24
- integer(i4), parameter, public :: BOB_ERROR_INVALID_GATE = 8
25
- integer(i4), parameter, public :: BOB_ERROR_INVALID_LATTICE = 9
26
- integer(i4), parameter, public :: BOB_ERROR_INTEGRATION_FAILED = 10
27
- integer(i4), parameter, public :: BOB_ERROR_IO = 11
28
- integer(i4), parameter, public :: BOB_ERROR_NOT_IMPLEMENTED = 99
29
-
30
- ! Maximum diagnostic message length
31
- integer, parameter, public :: BOB_MAX_ERROR_MSG_LEN = 512
32
-
33
- ! Thread-local error state
34
- type, public :: bob_error_state
35
- integer(i4) :: code = BOB_SUCCESS
36
- character(len=BOB_MAX_ERROR_MSG_LEN) :: message = ""
37
- character(len=256) :: location = ""
38
- end type bob_error_state
39
-
40
- ! Global error state (thread-local in OpenMP builds)
41
- type(bob_error_state), save :: g_error_state
42
- !$omp threadprivate(g_error_state)
43
-
44
- public :: bob_set_error
45
- public :: bob_get_last_error
46
- public :: bob_clear_error
47
- public :: bob_error_message
48
-
49
- contains
50
-
51
- !> Set error state with code, message, and location
52
- subroutine bob_set_error(code, message, location)
53
- integer(i4), intent(in) :: code
54
- character(len=*), intent(in) :: message
55
- character(len=*), intent(in), optional :: location
56
-
57
- g_error_state%code = code
58
- g_error_state%message = trim(message)
59
-
60
- if (present(location)) then
61
- g_error_state%location = trim(location)
62
- else
63
- g_error_state%location = ""
64
- end if
65
- end subroutine bob_set_error
66
-
67
- !> Get last error code
68
- function bob_get_last_error() result(code)
69
- integer(i4) :: code
70
- code = g_error_state%code
71
- end function bob_get_last_error
72
-
73
- !> Clear error state
74
- subroutine bob_clear_error()
75
- g_error_state%code = BOB_SUCCESS
76
- g_error_state%message = ""
77
- g_error_state%location = ""
78
- end subroutine bob_clear_error
79
-
80
- !> Get human-readable error message for error code
81
- function bob_error_message(code) result(message)
82
- integer(i4), intent(in) :: code
83
- character(len=256) :: message
84
-
85
- select case (code)
86
- case (BOB_SUCCESS)
87
- message = "Success"
88
- case (BOB_ERROR_INVALID_ARGUMENT)
89
- message = "Invalid argument"
90
- case (BOB_ERROR_ALLOCATION)
91
- message = "Memory allocation failed"
92
- case (BOB_ERROR_DIMENSION_MISMATCH)
93
- message = "Dimension mismatch"
94
- case (BOB_ERROR_NOT_NORMALIZED)
95
- message = "State not normalized"
96
- case (BOB_ERROR_NOT_HERMITIAN)
97
- message = "Operator not Hermitian"
98
- case (BOB_ERROR_NOT_UNITARY)
99
- message = "Operator not unitary"
100
- case (BOB_ERROR_INVALID_STATE)
101
- message = "Invalid quantum state"
102
- case (BOB_ERROR_INVALID_GATE)
103
- message = "Invalid quantum gate"
104
- case (BOB_ERROR_INVALID_LATTICE)
105
- message = "Invalid lattice configuration"
106
- case (BOB_ERROR_INTEGRATION_FAILED)
107
- message = "Time integration failed"
108
- case (BOB_ERROR_IO)
109
- message = "I/O error"
110
- case (BOB_ERROR_NOT_IMPLEMENTED)
111
- message = "Feature not implemented"
112
- case default
113
- message = "Unknown error"
114
- end select
115
- end function bob_error_message
116
-
117
- end module bob_errors
118
-
119
- ! Made with Bob
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_errors.f90-pp.f90.d DELETED
@@ -1,2 +0,0 @@
1
- CMakeFiles/bob_quantum.dir/src/bob_errors.f90-pp.f90: \
2
- C:/Users/jessi/Desktop/bobs\ control\ repo/sov-kernel-monster/src/bob_errors.f90
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_errors.f90.obj.ddi DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "revision" : 0,
3
- "rules" :
4
- [
5
- {
6
- "outputs" : [],
7
- "primary-output" : "CMakeFiles\\\\bob_quantum.dir\\\\src\\\\bob_errors.f90.obj",
8
- "provides" :
9
- [
10
- {
11
- "compiled-module-path" : "bob_errors.mod",
12
- "is-interface" : true,
13
- "logical-name" : "bob_errors.mod"
14
- }
15
- ],
16
- "requires" :
17
- [
18
- {
19
- "logical-name" : "bob_kinds.mod"
20
- }
21
- ]
22
- }
23
- ],
24
- "version" : 0
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_gates.f90-pp.f90 DELETED
@@ -1,485 +0,0 @@
1
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_gates.f90"
2
- # 1 "<built-in>"
3
- # 1 "<command-line>"
4
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_gates.f90"
5
- ! BOB Quantum Civilization Engine - Quantum Gates
6
- ! Module: bob_gates
7
- ! Purpose: Complete quantum gate operations (Pauli, Hadamard, T, controlled gates)
8
- ! Standard: Fortran 2018
9
-
10
- module bob_gates
11
- use bob_kinds
12
- use bob_errors
13
- use bob_state
14
- implicit none
15
- private
16
-
17
- ! Gate types
18
- integer(i4), parameter, public :: GATE_I = 0 ! Identity
19
- integer(i4), parameter, public :: GATE_X = 1 ! Pauli X (NOT)
20
- integer(i4), parameter, public :: GATE_Y = 2 ! Pauli Y
21
- integer(i4), parameter, public :: GATE_Z = 3 ! Pauli Z
22
- integer(i4), parameter, public :: GATE_H = 4 ! Hadamard
23
- integer(i4), parameter, public :: GATE_S = 5 ! S gate (phase)
24
- integer(i4), parameter, public :: GATE_T = 6 ! T gate (π/8)
25
- integer(i4), parameter, public :: GATE_CNOT = 7 ! Controlled-NOT
26
- integer(i4), parameter, public :: GATE_CZ = 8 ! Controlled-Z
27
- integer(i4), parameter, public :: GATE_SWAP = 9 ! SWAP
28
- integer(i4), parameter, public :: GATE_RX = 10 ! Rotation X
29
- integer(i4), parameter, public :: GATE_RY = 11 ! Rotation Y
30
- integer(i4), parameter, public :: GATE_RZ = 12 ! Rotation Z
31
-
32
- ! Pauli matrices
33
- complex(cwp), parameter :: PAULI_I(2,2) = reshape([ &
34
- CONE, CZERO, &
35
- CZERO, CONE], [2,2])
36
-
37
- complex(cwp), parameter :: PAULI_X(2,2) = reshape([ &
38
- CZERO, CONE, &
39
- CONE, CZERO], [2,2])
40
-
41
- complex(cwp), parameter :: PAULI_Y(2,2) = reshape([ &
42
- CZERO, -CI, &
43
- CI, CZERO], [2,2])
44
-
45
- complex(cwp), parameter :: PAULI_Z(2,2) = reshape([ &
46
- CONE, CZERO, &
47
- CZERO, -CONE], [2,2])
48
-
49
- public :: apply_single_qubit_gate
50
- public :: apply_two_qubit_gate
51
- public :: apply_rotation_gate
52
- public :: apply_controlled_gate
53
- public :: apply_arbitrary_unitary
54
- public :: verify_unitary
55
-
56
- contains
57
-
58
- !> Apply single-qubit gate to state
59
- subroutine apply_single_qubit_gate(state, gate_type, qubit_index)
60
- type(bob_quantum_state), intent(inout) :: state
61
- integer(i4), intent(in) :: gate_type
62
- integer(i8), intent(in) :: qubit_index
63
-
64
- complex(cwp) :: gate_matrix(2,2)
65
- complex(cwp) :: new_amplitudes(state%dim)
66
- integer(i8) :: i, j, k, bit_mask, qubit_bit
67
- integer(i8) :: num_qubits, state_0, state_1
68
- complex(cwp) :: amp_0, amp_1
69
-
70
- if (.not. state%is_valid) then
71
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
72
- "Cannot apply gate to invalid state", "apply_single_qubit_gate")
73
- return
74
- end if
75
-
76
- ! Get gate matrix
77
- select case (gate_type)
78
- case (GATE_I)
79
- gate_matrix = PAULI_I
80
- case (GATE_X)
81
- gate_matrix = PAULI_X
82
- case (GATE_Y)
83
- gate_matrix = PAULI_Y
84
- case (GATE_Z)
85
- gate_matrix = PAULI_Z
86
- case (GATE_H)
87
- ! Hadamard: (1/√2) * [[1, 1], [1, -1]]
88
- gate_matrix(1,1) = CONE / sqrt(TWO)
89
- gate_matrix(1,2) = CONE / sqrt(TWO)
90
- gate_matrix(2,1) = CONE / sqrt(TWO)
91
- gate_matrix(2,2) = -CONE / sqrt(TWO)
92
- case (GATE_S)
93
- ! S gate: [[1, 0], [0, i]]
94
- gate_matrix(1,1) = CONE
95
- gate_matrix(1,2) = CZERO
96
- gate_matrix(2,1) = CZERO
97
- gate_matrix(2,2) = CI
98
- case (GATE_T)
99
- ! T gate: [[1, 0], [0, exp(iπ/4)]]
100
- gate_matrix(1,1) = CONE
101
- gate_matrix(1,2) = CZERO
102
- gate_matrix(2,1) = CZERO
103
- gate_matrix(2,2) = exp(CI * PI / 4.0_wp)
104
- case default
105
- call bob_set_error(BOB_ERROR_INVALID_GATE, &
106
- "Unknown gate type", "apply_single_qubit_gate")
107
- return
108
- end select
109
-
110
- ! Calculate number of qubits
111
- num_qubits = int(log(real(state%dim, wp)) / log(TWO), i8)
112
-
113
- if (qubit_index < 0 .or. qubit_index >= num_qubits) then
114
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
115
- "Qubit index out of range", "apply_single_qubit_gate")
116
- return
117
- end if
118
-
119
- ! Apply gate to each basis state
120
- bit_mask = ishft(1_i8, int(qubit_index))
121
-
122
- do i = 0, state%dim - 1
123
- qubit_bit = iand(i, bit_mask)
124
-
125
- if (qubit_bit == 0) then
126
- ! This basis state has qubit in |0⟩
127
- state_0 = i
128
- state_1 = ior(i, bit_mask)
129
-
130
- amp_0 = state%amplitudes(state_0 + 1)
131
- amp_1 = state%amplitudes(state_1 + 1)
132
-
133
- ! Apply gate matrix
134
- new_amplitudes(state_0 + 1) = gate_matrix(1,1) * amp_0 + gate_matrix(1,2) * amp_1
135
- new_amplitudes(state_1 + 1) = gate_matrix(2,1) * amp_0 + gate_matrix(2,2) * amp_1
136
- end if
137
- end do
138
-
139
- state%amplitudes = new_amplitudes
140
- state%is_normalized = .false.
141
-
142
- call bob_clear_error()
143
- end subroutine apply_single_qubit_gate
144
-
145
- !> Apply two-qubit gate
146
- subroutine apply_two_qubit_gate(state, gate_type, control_qubit, target_qubit)
147
- type(bob_quantum_state), intent(inout) :: state
148
- integer(i4), intent(in) :: gate_type
149
- integer(i8), intent(in) :: control_qubit, target_qubit
150
-
151
- complex(cwp) :: new_amplitudes(state%dim)
152
- integer(i8) :: i, control_mask, target_mask
153
- integer(i8) :: num_qubits, control_bit, target_bit
154
- integer(i8) :: state_00, state_01, state_10, state_11
155
- complex(cwp) :: amp_00, amp_01, amp_10, amp_11
156
-
157
- if (.not. state%is_valid) then
158
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
159
- "Cannot apply gate to invalid state", "apply_two_qubit_gate")
160
- return
161
- end if
162
-
163
- num_qubits = int(log(real(state%dim, wp)) / log(TWO), i8)
164
-
165
- if (control_qubit < 0 .or. control_qubit >= num_qubits .or. &
166
- target_qubit < 0 .or. target_qubit >= num_qubits .or. &
167
- control_qubit == target_qubit) then
168
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
169
- "Invalid qubit indices", "apply_two_qubit_gate")
170
- return
171
- end if
172
-
173
- control_mask = ishft(1_i8, int(control_qubit))
174
- target_mask = ishft(1_i8, int(target_qubit))
175
-
176
- new_amplitudes = state%amplitudes
177
-
178
- select case (gate_type)
179
- case (GATE_CNOT)
180
- ! CNOT: flip target if control is |1⟩
181
- do i = 0, state%dim - 1
182
- control_bit = iand(i, control_mask)
183
-
184
- if (control_bit /= 0) then
185
- ! Control is |1⟩, flip target
186
- target_bit = iand(i, target_mask)
187
-
188
- if (target_bit == 0) then
189
- state_01 = i
190
- state_11 = ior(i, target_mask)
191
- else
192
- state_11 = i
193
- state_01 = iand(i, not(target_mask))
194
- end if
195
-
196
- ! Swap amplitudes
197
- amp_01 = state%amplitudes(state_01 + 1)
198
- amp_11 = state%amplitudes(state_11 + 1)
199
- new_amplitudes(state_01 + 1) = amp_11
200
- new_amplitudes(state_11 + 1) = amp_01
201
- end if
202
- end do
203
-
204
- case (GATE_CZ)
205
- ! CZ: apply Z to target if control is |1⟩
206
- do i = 0, state%dim - 1
207
- control_bit = iand(i, control_mask)
208
- target_bit = iand(i, target_mask)
209
-
210
- if (control_bit /= 0 .and. target_bit /= 0) then
211
- ! Both qubits are |1⟩, apply phase flip
212
- new_amplitudes(i + 1) = -state%amplitudes(i + 1)
213
- end if
214
- end do
215
-
216
- case (GATE_SWAP)
217
- ! SWAP: exchange control and target qubits
218
- do i = 0, state%dim - 1
219
- control_bit = iand(i, control_mask)
220
- target_bit = iand(i, target_mask)
221
-
222
- ! Only process each pair once
223
- if (control_bit == 0 .and. target_bit /= 0) then
224
- state_01 = i
225
- state_10 = ior(iand(i, not(target_mask)), control_mask)
226
-
227
- amp_01 = state%amplitudes(state_01 + 1)
228
- amp_10 = state%amplitudes(state_10 + 1)
229
- new_amplitudes(state_01 + 1) = amp_10
230
- new_amplitudes(state_10 + 1) = amp_01
231
- end if
232
- end do
233
-
234
- case default
235
- call bob_set_error(BOB_ERROR_INVALID_GATE, &
236
- "Unknown two-qubit gate type", "apply_two_qubit_gate")
237
- return
238
- end select
239
-
240
- state%amplitudes = new_amplitudes
241
- state%is_normalized = .false.
242
-
243
- call bob_clear_error()
244
- end subroutine apply_two_qubit_gate
245
-
246
- !> Apply rotation gate
247
- subroutine apply_rotation_gate(state, gate_type, qubit_index, angle)
248
- type(bob_quantum_state), intent(inout) :: state
249
- integer(i4), intent(in) :: gate_type
250
- integer(i8), intent(in) :: qubit_index
251
- real(wp), intent(in) :: angle
252
-
253
- complex(cwp) :: gate_matrix(2,2)
254
- real(wp) :: half_angle, cos_half, sin_half
255
-
256
- if (.not. state%is_valid) then
257
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
258
- "Cannot apply gate to invalid state", "apply_rotation_gate")
259
- return
260
- end if
261
-
262
- half_angle = angle / TWO
263
- cos_half = cos(half_angle)
264
- sin_half = sin(half_angle)
265
-
266
- select case (gate_type)
267
- case (GATE_RX)
268
- ! RX(θ) = exp(-iθX/2) = [[cos(θ/2), -i*sin(θ/2)], [-i*sin(θ/2), cos(θ/2)]]
269
- gate_matrix(1,1) = cmplx(cos_half, ZERO, cwp)
270
- gate_matrix(1,2) = cmplx(ZERO, -sin_half, cwp)
271
- gate_matrix(2,1) = cmplx(ZERO, -sin_half, cwp)
272
- gate_matrix(2,2) = cmplx(cos_half, ZERO, cwp)
273
-
274
- case (GATE_RY)
275
- ! RY(θ) = exp(-iθY/2) = [[cos(θ/2), -sin(θ/2)], [sin(θ/2), cos(θ/2)]]
276
- gate_matrix(1,1) = cmplx(cos_half, ZERO, cwp)
277
- gate_matrix(1,2) = cmplx(-sin_half, ZERO, cwp)
278
- gate_matrix(2,1) = cmplx(sin_half, ZERO, cwp)
279
- gate_matrix(2,2) = cmplx(cos_half, ZERO, cwp)
280
-
281
- case (GATE_RZ)
282
- ! RZ(θ) = exp(-iθZ/2) = [[exp(-iθ/2), 0], [0, exp(iθ/2)]]
283
- gate_matrix(1,1) = exp(-CI * half_angle)
284
- gate_matrix(1,2) = CZERO
285
- gate_matrix(2,1) = CZERO
286
- gate_matrix(2,2) = exp(CI * half_angle)
287
-
288
- case default
289
- call bob_set_error(BOB_ERROR_INVALID_GATE, &
290
- "Unknown rotation gate type", "apply_rotation_gate")
291
- return
292
- end select
293
-
294
- ! Apply as single-qubit gate with custom matrix
295
- call apply_arbitrary_unitary(state, gate_matrix, qubit_index)
296
-
297
- call bob_clear_error()
298
- end subroutine apply_rotation_gate
299
-
300
- !> Apply controlled gate
301
- subroutine apply_controlled_gate(state, gate_matrix, control_qubit, target_qubit)
302
- type(bob_quantum_state), intent(inout) :: state
303
- complex(cwp), intent(in) :: gate_matrix(2,2)
304
- integer(i8), intent(in) :: control_qubit, target_qubit
305
-
306
- complex(cwp) :: new_amplitudes(state%dim)
307
- integer(i8) :: i, control_mask, target_mask
308
- integer(i8) :: num_qubits, control_bit, target_bit
309
- integer(i8) :: state_0, state_1
310
- complex(cwp) :: amp_0, amp_1
311
-
312
- if (.not. state%is_valid) then
313
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
314
- "Cannot apply gate to invalid state", "apply_controlled_gate")
315
- return
316
- end if
317
-
318
- ! Verify gate is unitary
319
- if (.not. verify_unitary(gate_matrix, 2_i8)) then
320
- call bob_set_error(BOB_ERROR_NOT_UNITARY, &
321
- "Gate matrix is not unitary", "apply_controlled_gate")
322
- return
323
- end if
324
-
325
- num_qubits = int(log(real(state%dim, wp)) / log(TWO), i8)
326
-
327
- if (control_qubit < 0 .or. control_qubit >= num_qubits .or. &
328
- target_qubit < 0 .or. target_qubit >= num_qubits .or. &
329
- control_qubit == target_qubit) then
330
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
331
- "Invalid qubit indices", "apply_controlled_gate")
332
- return
333
- end if
334
-
335
- control_mask = ishft(1_i8, int(control_qubit))
336
- target_mask = ishft(1_i8, int(target_qubit))
337
-
338
- new_amplitudes = state%amplitudes
339
-
340
- ! Apply gate only when control qubit is |1⟩
341
- do i = 0, state%dim - 1
342
- control_bit = iand(i, control_mask)
343
-
344
- if (control_bit /= 0) then
345
- ! Control is |1⟩, apply gate to target
346
- target_bit = iand(i, target_mask)
347
-
348
- if (target_bit == 0) then
349
- state_0 = i
350
- state_1 = ior(i, target_mask)
351
-
352
- amp_0 = state%amplitudes(state_0 + 1)
353
- amp_1 = state%amplitudes(state_1 + 1)
354
-
355
- new_amplitudes(state_0 + 1) = gate_matrix(1,1) * amp_0 + gate_matrix(1,2) * amp_1
356
- new_amplitudes(state_1 + 1) = gate_matrix(2,1) * amp_0 + gate_matrix(2,2) * amp_1
357
- end if
358
- end if
359
- end do
360
-
361
- state%amplitudes = new_amplitudes
362
- state%is_normalized = .false.
363
-
364
- call bob_clear_error()
365
- end subroutine apply_controlled_gate
366
-
367
- !> Apply arbitrary unitary matrix to single qubit
368
- subroutine apply_arbitrary_unitary(state, gate_matrix, qubit_index)
369
- type(bob_quantum_state), intent(inout) :: state
370
- complex(cwp), intent(in) :: gate_matrix(2,2)
371
- integer(i8), intent(in) :: qubit_index
372
-
373
- complex(cwp) :: new_amplitudes(state%dim)
374
- integer(i8) :: i, bit_mask, qubit_bit
375
- integer(i8) :: num_qubits, state_0, state_1
376
- complex(cwp) :: amp_0, amp_1
377
-
378
- if (.not. state%is_valid) then
379
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
380
- "Cannot apply gate to invalid state", "apply_arbitrary_unitary")
381
- return
382
- end if
383
-
384
- ! Verify gate is unitary
385
- if (.not. verify_unitary(gate_matrix, 2_i8)) then
386
- call bob_set_error(BOB_ERROR_NOT_UNITARY, &
387
- "Gate matrix is not unitary", "apply_arbitrary_unitary")
388
- return
389
- end if
390
-
391
- num_qubits = int(log(real(state%dim, wp)) / log(TWO), i8)
392
-
393
- if (qubit_index < 0 .or. qubit_index >= num_qubits) then
394
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
395
- "Qubit index out of range", "apply_arbitrary_unitary")
396
- return
397
- end if
398
-
399
- bit_mask = ishft(1_i8, int(qubit_index))
400
-
401
- do i = 0, state%dim - 1
402
- qubit_bit = iand(i, bit_mask)
403
-
404
- if (qubit_bit == 0) then
405
- state_0 = i
406
- state_1 = ior(i, bit_mask)
407
-
408
- amp_0 = state%amplitudes(state_0 + 1)
409
- amp_1 = state%amplitudes(state_1 + 1)
410
-
411
- new_amplitudes(state_0 + 1) = gate_matrix(1,1) * amp_0 + gate_matrix(1,2) * amp_1
412
- new_amplitudes(state_1 + 1) = gate_matrix(2,1) * amp_0 + gate_matrix(2,2) * amp_1
413
- end if
414
- end do
415
-
416
- state%amplitudes = new_amplitudes
417
- state%is_normalized = .false.
418
-
419
- call bob_clear_error()
420
- end subroutine apply_arbitrary_unitary
421
-
422
- !> Verify matrix is unitary: U†U = I
423
- function verify_unitary(matrix, dim) result(is_unitary)
424
- integer(i8), intent(in) :: dim
425
- complex(cwp), intent(in) :: matrix(dim, dim)
426
- logical(lk) :: is_unitary
427
-
428
- complex(cwp) :: product(dim, dim)
429
- complex(cwp) :: identity(dim, dim)
430
- integer(i8) :: i, j, k
431
- real(wp) :: max_error
432
-
433
- is_unitary = .false.
434
-
435
- ! Compute U†U
436
- product = CZERO
437
- do i = 1, dim
438
- do j = 1, dim
439
- do k = 1, dim
440
- product(i,j) = product(i,j) + conjg(matrix(k,i)) * matrix(k,j)
441
- end do
442
- end do
443
- end do
444
-
445
- ! Create identity matrix
446
- identity = CZERO
447
- do i = 1, dim
448
- identity(i,i) = CONE
449
- end do
450
-
451
- ! Check if product equals identity
452
- max_error = ZERO
453
- do i = 1, dim
454
- do j = 1, dim
455
- max_error = max(max_error, abs(product(i,j) - identity(i,j)))
456
- end do
457
- end do
458
-
459
- is_unitary = (max_error < TOL_UNITARY)
460
- end function verify_unitary
461
-
462
- !> C ABI: Apply gate to state
463
- function bob_gate_apply(state_ptr, gate_type, qubit_index) result(status) &
464
- bind(C, name="bob_gate_apply")
465
- use, intrinsic :: iso_c_binding
466
- type(c_ptr), value :: state_ptr
467
- integer(c_int), value :: gate_type
468
- integer(c_int64_t), value :: qubit_index
469
- integer(c_int) :: status
470
-
471
- type(bob_quantum_state), pointer :: state
472
-
473
- if (.not. c_associated(state_ptr)) then
474
- status = BOB_ERROR_INVALID_ARGUMENT
475
- return
476
- end if
477
-
478
- call c_f_pointer(state_ptr, state)
479
- call apply_single_qubit_gate(state, gate_type, qubit_index)
480
- status = bob_get_last_error()
481
- end function bob_gate_apply
482
-
483
- end module bob_gates
484
-
485
- ! Made with Bob
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_gates.f90-pp.f90.d DELETED
@@ -1,2 +0,0 @@
1
- CMakeFiles/bob_quantum.dir/src/bob_gates.f90-pp.f90: \
2
- C:/Users/jessi/Desktop/bobs\ control\ repo/sov-kernel-monster/src/bob_gates.f90
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_gates.f90.obj.ddi DELETED
@@ -1,31 +0,0 @@
1
- {
2
- "revision" : 0,
3
- "rules" :
4
- [
5
- {
6
- "outputs" : [],
7
- "primary-output" : "CMakeFiles\\\\bob_quantum.dir\\\\src\\\\bob_gates.f90.obj",
8
- "provides" :
9
- [
10
- {
11
- "compiled-module-path" : "bob_gates.mod",
12
- "is-interface" : true,
13
- "logical-name" : "bob_gates.mod"
14
- }
15
- ],
16
- "requires" :
17
- [
18
- {
19
- "logical-name" : "bob_errors.mod"
20
- },
21
- {
22
- "logical-name" : "bob_kinds.mod"
23
- },
24
- {
25
- "logical-name" : "bob_state.mod"
26
- }
27
- ]
28
- }
29
- ],
30
- "version" : 0
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_goldilocks.f90-pp.f90 DELETED
@@ -1,433 +0,0 @@
1
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_goldilocks.f90"
2
- # 1 "<built-in>"
3
- # 1 "<command-line>"
4
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_goldilocks.f90"
5
- !=====================================================================
6
- ! bob_goldilocks.f90
7
- ! Goldilocks field arithmetic: p = 2^64 - 2^32 + 1
8
- ! Used in PLONK, Plonky2, Miden ZK systems.
9
- ! Matches utqc-goldilocks/src/lib.rs exactly.
10
- ! Standard: Fortran 2018
11
- ! ABI: ISO C binding for use from sov_monster_kernel
12
- !=====================================================================
13
- module bob_goldilocks
14
- use, intrinsic :: iso_c_binding, only: c_int64_t, c_int32_t, c_ptr, &
15
- c_f_pointer, c_loc, c_size_t
16
- use, intrinsic :: iso_fortran_env, only: int64, real64, int8
17
- use bob_kinds
18
- use bob_errors
19
- implicit none
20
- private
21
-
22
- ! Goldilocks prime: p = 2^64 - 2^32 + 1
23
- integer(i64), parameter, public :: GOLDILOCKS_P = int(Z'FFFFFFFF00000001', i64)
24
- ! Primitive root g = 7 (generates the multiplicative group)
25
- integer(i64), parameter, public :: GOLDILOCKS_G = 7_i64
26
- ! Two-adicity: p - 1 = 2^32 * (2^32 - 1), so 2-adicity = 32
27
- integer(i4), parameter, public :: GOLDILOCKS_TWO_ADICITY = 32
28
-
29
- !> Goldilocks field element
30
- type, public :: goldilocks_t
31
- integer(i64) :: val = 0_i64
32
- contains
33
- procedure :: add => gf_add
34
- procedure :: sub => gf_sub
35
- procedure :: mul => gf_mul
36
- procedure :: neg => gf_neg
37
- procedure :: inv => gf_inv
38
- procedure :: pow => gf_pow
39
- procedure :: is_zero => gf_is_zero
40
- procedure :: to_int => gf_to_int
41
- end type goldilocks_t
42
-
43
- public :: goldilocks_new
44
- public :: goldilocks_from_canonical
45
- public :: goldilocks_reduce
46
- public :: goldilocks_mul_hi
47
- public :: goldilocks_ntt ! Number Theoretic Transform
48
- public :: goldilocks_intt ! Inverse NTT
49
- public :: goldilocks_fft_layer ! Single butterfly layer
50
- public :: gf_add, gf_sub, gf_mul, gf_neg, gf_inv, gf_pow
51
-
52
- ! C ABI
53
- public :: bob_gf_new
54
- public :: bob_gf_add
55
- public :: bob_gf_mul
56
- public :: bob_gf_inv
57
- public :: bob_gf_pow
58
- public :: bob_gf_ntt
59
- public :: bob_gf_intt
60
-
61
- contains
62
-
63
- !──────────────────────────────────────────────────────────────────
64
- ! Constructor: reduce val mod p
65
- !──────────────────────────────────────────────────────────────────
66
- pure function goldilocks_new(val) result(f)
67
- integer(i64), intent(in) :: val
68
- type(goldilocks_t) :: f
69
- f%val = goldilocks_reduce(val)
70
- end function goldilocks_new
71
-
72
- !──────────────────────────────────────────────────────────────────
73
- ! Create from already-canonical value (0 <= val < p)
74
- !──────────────────────────────────────────────────────────────────
75
- pure function goldilocks_from_canonical(val) result(f)
76
- integer(i64), intent(in) :: val
77
- type(goldilocks_t) :: f
78
- f%val = val
79
- end function goldilocks_from_canonical
80
-
81
- !──────────────────────────────────────────────────────────────────
82
- ! Reduce: val mod p using the Goldilocks structure
83
- ! p = 2^64 - 2^32 + 1 = 0xFFFFFFFF00000001
84
- ! Fast reduction: if val >= p, val - p (no division needed for one step)
85
- !──────────────────────────────────────────────────────────────────
86
- pure function goldilocks_reduce(val) result(r)
87
- integer(i64), intent(in) :: val
88
- integer(i64) :: r
89
- r = val
90
- ! Handle values in [p, 2p)
91
- if (r >= GOLDILOCKS_P) then
92
- r = r - GOLDILOCKS_P
93
- end if
94
- ! Handle values in [2p, 3p) — can happen after addition
95
- if (r >= GOLDILOCKS_P) then
96
- r = r - GOLDILOCKS_P
97
- end if
98
- end function goldilocks_reduce
99
-
100
- !──────────────────────────────────────────────────────────────────
101
- ! High bits of product (needed for full 128-bit multiply mod p)
102
- ! Returns the upper 64 bits of a*b
103
- !──────────────────────────────────────────────────────────────────
104
- pure function goldilocks_mul_hi(a, b) result(hi)
105
- integer(i64), intent(in) :: a, b
106
- integer(i64) :: hi
107
- integer(i64) :: a_lo, a_hi, b_lo, b_hi
108
- integer(i64) :: cross1, cross2, cross
109
- ! Split into 32-bit halves
110
- a_lo = iand(a, int(Z'00000000FFFFFFFF', i64))
111
- a_hi = ishft(a, -32)
112
- b_lo = iand(b, int(Z'00000000FFFFFFFF', i64))
113
- b_hi = ishft(b, -32)
114
- ! cross products
115
- cross1 = a_lo * b_hi
116
- cross2 = a_hi * b_lo
117
- cross = cross1 + cross2
118
- hi = a_hi * b_hi + ishft(cross, -32)
119
- ! add carry from low 64 bits
120
- if (iand(cross, int(Z'00000000FFFFFFFF', i64)) + &
121
- ishft(a_lo * b_lo, -32) >= int(Z'0000000100000000', i64)) then
122
- hi = hi + 1_i64
123
- end if
124
- end function goldilocks_mul_hi
125
-
126
- !──────────────────────────────────────────────────────────────────
127
- ! Modular multiplication using Goldilocks reduction
128
- ! (a * b) mod p, where p = 2^64 - 2^32 + 1
129
- ! Uses the identity: x mod p = x_lo - x_hi * (p - 2^64)
130
- ! = x_lo + x_hi * (2^32 - 1)
131
- !──────────────────────────────────────────────────────────────────
132
- pure function gf_mul(this, other) result(r)
133
- class(goldilocks_t), intent(in) :: this, other
134
- type(goldilocks_t) :: r
135
- integer(i64) :: lo, hi, adj
136
- ! Full 128-bit product
137
- lo = this%val * other%val ! lower 64 bits (wraps mod 2^64)
138
- hi = goldilocks_mul_hi(this%val, other%val)
139
- ! Goldilocks reduction: result = lo + hi * (2^32 - 1)
140
- ! = lo + hi * 2^32 - hi
141
- adj = ishft(hi, 32) - hi
142
- ! lo + adj, then reduce
143
- r%val = goldilocks_reduce(lo + adj)
144
- end function gf_mul
145
-
146
- !──────────────────────────────────────────────────────────────────
147
- ! Addition mod p
148
- !──────────────────────────────────────────────────────────────────
149
- pure function gf_add(this, other) result(r)
150
- class(goldilocks_t), intent(in) :: this, other
151
- type(goldilocks_t) :: r
152
- r%val = goldilocks_reduce(this%val + other%val)
153
- end function gf_add
154
-
155
- !──────────────────────────────────────────────────────────────────
156
- ! Subtraction mod p
157
- !──────────────────────────────────────────────────────────────────
158
- pure function gf_sub(this, other) result(r)
159
- class(goldilocks_t), intent(in) :: this, other
160
- type(goldilocks_t) :: r
161
- integer(i64) :: diff
162
- diff = this%val - other%val
163
- if (diff < 0_i64) diff = diff + GOLDILOCKS_P
164
- r%val = diff
165
- end function gf_sub
166
-
167
- !──────────────────────────────────────────────────────────────────
168
- ! Negation: p - val
169
- !──────────────────────────────────────────────────────────────────
170
- pure function gf_neg(this) result(r)
171
- class(goldilocks_t), intent(in) :: this
172
- type(goldilocks_t) :: r
173
- if (this%val == 0_i64) then
174
- r%val = 0_i64
175
- else
176
- r%val = GOLDILOCKS_P - this%val
177
- end if
178
- end function gf_neg
179
-
180
- !──────────────────────────────────────────────────────────────────
181
- ! Multiplicative inverse via Fermat: a^(p-2) mod p
182
- ! p - 2 = 0xFFFFFFFF00000000 - 1... use square-and-multiply
183
- !──────────────────────────────────────────────────────────────────
184
- pure function gf_inv(this) result(r)
185
- class(goldilocks_t), intent(in) :: this
186
- type(goldilocks_t) :: r
187
- ! Use the fact that p - 2 has a nice binary structure
188
- ! p - 2 = 2^64 - 2^32 - 1
189
- ! Chain: a^1 → a^2 → a^3 → a^6 → a^12 → a^24 → a^32 → a^64 → ...
190
- type(goldilocks_t) :: x, t
191
- integer(i4) :: i
192
- x = this
193
- t = goldilocks_from_canonical(1_i64)
194
- ! Square-and-multiply for exponent p-2
195
- ! Simplified: full loop over all 64 bits of p-2
196
- ! p - 2 bits (big-endian): 1111...1111 0000...0000 1111...1111 11111110
197
- ! Fast path using Fermat chains for Goldilocks specifically
198
- ! Use the addition chain from the Goldilocks paper
199
- ! Step 1: a^(2^32 - 1) via squarings
200
- x = this
201
- do i = 1, 31
202
- x = x%mul(x) ! x = a^(2^i)
203
- end do
204
- t = x%mul(this) ! t = a^(2^32 - 1)
205
- ! Step 2: t^(2^32) * t = a^(2^64 - 2^32 + 2^32 - 1) ... not quite
206
- ! Fallback: generic square-and-multiply on p-2
207
- x = this
208
- t = goldilocks_from_canonical(1_i64)
209
- call gf_pow_impl(x, GOLDILOCKS_P - 2_i64, t)
210
- r = t
211
- end function gf_inv
212
-
213
- !──────────────────────────────────────────────────────────────────
214
- ! Power: base^exp mod p (square-and-multiply)
215
- !──────────────────────────────────────────────────────────────────
216
- pure function gf_pow(this, exp) result(r)
217
- class(goldilocks_t), intent(in) :: this
218
- integer(i64), intent(in) :: exp
219
- type(goldilocks_t) :: r
220
- r = goldilocks_from_canonical(1_i64)
221
- call gf_pow_impl(this, exp, r)
222
- end function gf_pow
223
-
224
- pure subroutine gf_pow_impl(base, exp, result)
225
- type(goldilocks_t), intent(in) :: base
226
- integer(i64), intent(in) :: exp
227
- type(goldilocks_t), intent(inout) :: result
228
- type(goldilocks_t) :: b
229
- integer(i64) :: e
230
- b = base; e = exp
231
- do while (e > 0_i64)
232
- if (iand(e, 1_i64) == 1_i64) result = result%mul(b)
233
- b = b%mul(b)
234
- e = ishft(e, -1)
235
- end do
236
- end subroutine gf_pow_impl
237
-
238
- pure function gf_is_zero(this) result(z)
239
- class(goldilocks_t), intent(in) :: this
240
- logical :: z
241
- z = (this%val == 0_i64)
242
- end function gf_is_zero
243
-
244
- pure function gf_to_int(this) result(v)
245
- class(goldilocks_t), intent(in) :: this
246
- integer(i64) :: v
247
- v = this%val
248
- end function gf_to_int
249
-
250
- !══════════════════════════════════════════════════════════════════
251
- ! Number Theoretic Transform (NTT) over Goldilocks field
252
- ! Cooley-Tukey butterfly, in-place, size must be power of 2
253
- ! Used in PLONK polynomial commitments
254
- !══════════════════════════════════════════════════════════════════
255
-
256
- !> Single butterfly layer at a given stride
257
- pure subroutine goldilocks_fft_layer(a, n, stride, omega)
258
- type(goldilocks_t), intent(inout) :: a(n)
259
- integer(i4), intent(in) :: n, stride
260
- type(goldilocks_t), intent(in) :: omega ! root of unity for this layer
261
- type(goldilocks_t) :: w, u, v
262
- integer(i4) :: i, j
263
- w = goldilocks_from_canonical(1_i64)
264
- do i = 0, stride - 1
265
- do j = i, n - 1, 2 * stride
266
- u = a(j + 1)
267
- v = w%mul(a(j + stride + 1))
268
- a(j + 1) = u%add(v)
269
- a(j + stride + 1) = u%sub(v)
270
- end do
271
- w = w%mul(omega)
272
- end do
273
- end subroutine goldilocks_fft_layer
274
-
275
- !> In-place NTT of array a of length n (must be power of 2)
276
- subroutine goldilocks_ntt(a, n, status)
277
- type(goldilocks_t), intent(inout) :: a(n)
278
- integer(i4), intent(in) :: n
279
- integer(c_int32_t), intent(out) :: status
280
- type(goldilocks_t) :: omega
281
- integer(i64) :: root_pow
282
- integer(i4) :: len, half
283
- status = BOB_SUCCESS
284
- if (n <= 1) return
285
- ! Check power of 2
286
- if (iand(n, n-1) /= 0) then
287
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
288
- "NTT size must be power of 2", "goldilocks_ntt")
289
- status = BOB_ERROR_INVALID_ARGUMENT; return
290
- end if
291
- ! Bit-reverse permutation
292
- call bit_reverse_permute(a, n)
293
- ! Butterfly layers
294
- len = 2
295
- do while (len <= n)
296
- half = len / 2
297
- ! Root of unity: g^((p-1)/len) mod p
298
- root_pow = (GOLDILOCKS_P - 1_i64) / int(len, i64)
299
- omega = goldilocks_from_canonical(GOLDILOCKS_G)
300
- omega = omega%pow(root_pow)
301
- call goldilocks_fft_layer(a, n, half, omega)
302
- len = len * 2
303
- end do
304
- end subroutine goldilocks_ntt
305
-
306
- !> In-place inverse NTT
307
- subroutine goldilocks_intt(a, n, status)
308
- type(goldilocks_t), intent(inout) :: a(n)
309
- integer(i4), intent(in) :: n
310
- integer(c_int32_t), intent(out) :: status
311
- type(goldilocks_t) :: omega, n_inv
312
- integer(i64) :: root_pow
313
- integer(i4) :: len, half, i
314
- status = BOB_SUCCESS
315
- if (n <= 1) return
316
- if (iand(n, n-1) /= 0) then
317
- status = BOB_ERROR_INVALID_ARGUMENT; return
318
- end if
319
- call bit_reverse_permute(a, n)
320
- len = 2
321
- do while (len <= n)
322
- half = len / 2
323
- root_pow = (GOLDILOCKS_P - 1_i64) / int(len, i64)
324
- ! Use inverse root: g^(p-1 - (p-1)/len)
325
- omega = goldilocks_from_canonical(GOLDILOCKS_G)
326
- omega = omega%pow(GOLDILOCKS_P - 1_i64 - root_pow)
327
- call goldilocks_fft_layer(a, n, half, omega)
328
- len = len * 2
329
- end do
330
- ! Divide by n
331
- n_inv = goldilocks_new(int(n, i64))
332
- n_inv = n_inv%inv()
333
- do i = 1, n
334
- a(i) = a(i)%mul(n_inv)
335
- end do
336
- end subroutine goldilocks_intt
337
-
338
- !> Bit-reverse permutation
339
- pure subroutine bit_reverse_permute(a, n)
340
- type(goldilocks_t), intent(inout) :: a(n)
341
- integer(i4), intent(in) :: n
342
- type(goldilocks_t) :: tmp
343
- integer(i4) :: i, j, k, bits
344
- bits = 0; k = n
345
- do while (k > 1); bits = bits + 1; k = k / 2; end do
346
- j = 0
347
- do i = 1, n - 1
348
- k = n / 2
349
- do while (iand(j, k) /= 0); j = ieor(j, k); k = k / 2; end do
350
- j = ieor(j, k)
351
- if (i < j + 1) then
352
- tmp = a(i + 1); a(i + 1) = a(j + 1); a(j + 1) = tmp
353
- end if
354
- end do
355
- end subroutine bit_reverse_permute
356
-
357
- !══════════════════════════════════════════════════════════════════
358
- ! C ABI
359
- !══════════════════════════════════════════════════════════════════
360
-
361
- function bob_gf_new(val) result(out) bind(C, name="bob_gf_new")
362
- integer(c_int64_t), value :: val
363
- integer(c_int64_t) :: out
364
- out = goldilocks_reduce(val)
365
- end function bob_gf_new
366
-
367
- function bob_gf_add(a, b) result(out) bind(C, name="bob_gf_add")
368
- integer(c_int64_t), value :: a, b
369
- integer(c_int64_t) :: out
370
- type(goldilocks_t) :: fa, fb
371
- fa = goldilocks_from_canonical(a)
372
- fb = goldilocks_from_canonical(b)
373
- out = fa%add(fb)%val
374
- end function bob_gf_add
375
-
376
- function bob_gf_mul(a, b) result(out) bind(C, name="bob_gf_mul")
377
- integer(c_int64_t), value :: a, b
378
- integer(c_int64_t) :: out
379
- type(goldilocks_t) :: fa, fb
380
- fa = goldilocks_from_canonical(a)
381
- fb = goldilocks_from_canonical(b)
382
- out = fa%mul(fb)%val
383
- end function bob_gf_mul
384
-
385
- function bob_gf_inv(a) result(out) bind(C, name="bob_gf_inv")
386
- integer(c_int64_t), value :: a
387
- integer(c_int64_t) :: out
388
- type(goldilocks_t) :: fa
389
- fa = goldilocks_from_canonical(a)
390
- out = fa%inv()%val
391
- end function bob_gf_inv
392
-
393
- function bob_gf_pow(a, exp) result(out) bind(C, name="bob_gf_pow")
394
- integer(c_int64_t), value :: a, exp
395
- integer(c_int64_t) :: out
396
- type(goldilocks_t) :: fa
397
- fa = goldilocks_from_canonical(a)
398
- out = fa%pow(exp)%val
399
- end function bob_gf_pow
400
-
401
- function bob_gf_ntt(arr_ptr, n) result(status) bind(C, name="bob_gf_ntt")
402
- type(c_ptr), value :: arr_ptr
403
- integer(c_int32_t), value :: n
404
- integer(c_int32_t) :: status
405
- integer(i64), pointer :: arr(:)
406
- type(goldilocks_t), allocatable :: gf(:)
407
- integer(i4) :: i
408
- call c_f_pointer(arr_ptr, arr, [n])
409
- allocate(gf(n))
410
- do i = 1, n; gf(i) = goldilocks_from_canonical(arr(i)); end do
411
- call goldilocks_ntt(gf, n, status)
412
- do i = 1, n; arr(i) = gf(i)%val; end do
413
- deallocate(gf)
414
- end function bob_gf_ntt
415
-
416
- function bob_gf_intt(arr_ptr, n) result(status) bind(C, name="bob_gf_intt")
417
- type(c_ptr), value :: arr_ptr
418
- integer(c_int32_t), value :: n
419
- integer(c_int32_t) :: status
420
- integer(i64), pointer :: arr(:)
421
- type(goldilocks_t), allocatable :: gf(:)
422
- integer(i4) :: i
423
- call c_f_pointer(arr_ptr, arr, [n])
424
- allocate(gf(n))
425
- do i = 1, n; gf(i) = goldilocks_from_canonical(arr(i)); end do
426
- call goldilocks_intt(gf, n, status)
427
- do i = 1, n; arr(i) = gf(i)%val; end do
428
- deallocate(gf)
429
- end function bob_gf_intt
430
-
431
- end module bob_goldilocks
432
-
433
- ! Made with Bob
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_goldilocks.f90-pp.f90.d DELETED
@@ -1,2 +0,0 @@
1
- CMakeFiles/bob_quantum.dir/src/bob_goldilocks.f90-pp.f90: \
2
- C:/Users/jessi/Desktop/bobs\ control\ repo/sov-kernel-monster/src/bob_goldilocks.f90
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_goldilocks.f90.obj.ddi DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "revision" : 0,
3
- "rules" :
4
- [
5
- {
6
- "outputs" : [],
7
- "primary-output" : "CMakeFiles\\\\bob_quantum.dir\\\\src\\\\bob_goldilocks.f90.obj",
8
- "provides" :
9
- [
10
- {
11
- "compiled-module-path" : "bob_goldilocks.mod",
12
- "is-interface" : true,
13
- "logical-name" : "bob_goldilocks.mod"
14
- }
15
- ],
16
- "requires" :
17
- [
18
- {
19
- "logical-name" : "bob_errors.mod"
20
- },
21
- {
22
- "logical-name" : "bob_kinds.mod"
23
- }
24
- ]
25
- }
26
- ],
27
- "version" : 0
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_hamiltonian.f90-pp.f90 DELETED
@@ -1,554 +0,0 @@
1
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_hamiltonian.f90"
2
- # 1 "<built-in>"
3
- # 1 "<command-line>"
4
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_hamiltonian.f90"
5
- ! BOB Quantum Civilization Engine - Hamiltonian Construction
6
- ! Module: bob_hamiltonian
7
- ! Purpose: Build and manipulate quantum Hamiltonians
8
- ! Standard: Fortran 2018
9
-
10
- module bob_hamiltonian
11
- use bob_kinds
12
- use bob_errors
13
- use bob_state
14
- implicit none
15
- private
16
-
17
- !> Hamiltonian operator
18
- type, public :: bob_hamiltonian_operator
19
- integer(i8) :: dim ! Hilbert space dimension
20
- complex(cwp), allocatable :: matrix(:,:) ! Hamiltonian matrix
21
- logical(lk) :: is_hermitian ! Hermiticity flag
22
- logical(lk) :: is_sparse ! Sparsity flag
23
- real(wp) :: kinetic_coefficient ! Kinetic energy coefficient
24
- real(wp) :: interaction_coefficient ! Interaction coefficient
25
- real(wp) :: external_field ! External field strength
26
- character(len=64) :: label ! Hamiltonian label
27
- contains
28
- procedure :: init => hamiltonian_init
29
- procedure :: destroy => hamiltonian_destroy
30
- procedure :: add_kinetic => hamiltonian_add_kinetic
31
- procedure :: add_interaction => hamiltonian_add_interaction
32
- procedure :: add_external_field => hamiltonian_add_external_field
33
- procedure :: add_term => hamiltonian_add_term
34
- procedure :: verify_hermitian => hamiltonian_verify_hermitian
35
- procedure :: get_eigenvalues => hamiltonian_get_eigenvalues
36
- procedure :: apply_to_state => hamiltonian_apply_to_state
37
- procedure :: expectation_value => hamiltonian_expectation_value
38
- end type bob_hamiltonian_operator
39
-
40
- public :: bob_hamiltonian_create
41
- public :: bob_hamiltonian_destroy
42
- public :: bob_hamiltonian_apply
43
-
44
- contains
45
-
46
- !> Initialize Hamiltonian
47
- subroutine hamiltonian_init(this, dim, label)
48
- class(bob_hamiltonian_operator), intent(inout) :: this
49
- integer(i8), intent(in) :: dim
50
- character(len=*), intent(in), optional :: label
51
- integer :: stat
52
-
53
- if (dim <= 0) then
54
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
55
- "Hamiltonian dimension must be positive", "hamiltonian_init")
56
- return
57
- end if
58
-
59
- this%dim = dim
60
- this%is_hermitian = .false.
61
- this%is_sparse = .false.
62
- this%kinetic_coefficient = ONE
63
- this%interaction_coefficient = ONE
64
- this%external_field = ZERO
65
-
66
- if (present(label)) then
67
- this%label = trim(label)
68
- else
69
- this%label = "unnamed_hamiltonian"
70
- end if
71
-
72
- ! Allocate matrix
73
- if (allocated(this%matrix)) deallocate(this%matrix)
74
- allocate(this%matrix(dim, dim), stat=stat)
75
- if (stat /= 0) then
76
- call bob_set_error(BOB_ERROR_ALLOCATION, &
77
- "Failed to allocate Hamiltonian matrix", "hamiltonian_init")
78
- return
79
- end if
80
-
81
- ! Initialize to zero
82
- this%matrix = CZERO
83
-
84
- call bob_clear_error()
85
- end subroutine hamiltonian_init
86
-
87
- !> Destroy Hamiltonian
88
- subroutine hamiltonian_destroy(this)
89
- class(bob_hamiltonian_operator), intent(inout) :: this
90
-
91
- if (allocated(this%matrix)) deallocate(this%matrix)
92
- this%dim = 0
93
- this%is_hermitian = .false.
94
- this%label = ""
95
- end subroutine hamiltonian_destroy
96
-
97
- !> Add kinetic energy term
98
- subroutine hamiltonian_add_kinetic(this, coefficient)
99
- class(bob_hamiltonian_operator), intent(inout) :: this
100
- real(wp), intent(in), optional :: coefficient
101
-
102
- integer(i8) :: i
103
- real(wp) :: coeff
104
-
105
- if (.not. allocated(this%matrix)) then
106
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
107
- "Hamiltonian not initialized", "hamiltonian_add_kinetic")
108
- return
109
- end if
110
-
111
- coeff = ONE
112
- if (present(coefficient)) coeff = coefficient
113
- this%kinetic_coefficient = coeff
114
-
115
- ! Add kinetic term to diagonal: T = -∇²/2m (simplified as identity)
116
- do i = 1, this%dim
117
- this%matrix(i,i) = this%matrix(i,i) + cmplx(coeff, ZERO, cwp)
118
- end do
119
-
120
- call bob_clear_error()
121
- end subroutine hamiltonian_add_kinetic
122
-
123
- !> Add interaction term
124
- subroutine hamiltonian_add_interaction(this, interaction_matrix, coefficient)
125
- class(bob_hamiltonian_operator), intent(inout) :: this
126
- complex(cwp), intent(in) :: interaction_matrix(:,:)
127
- real(wp), intent(in), optional :: coefficient
128
-
129
- integer(i8) :: i, j
130
- real(wp) :: coeff
131
-
132
- if (.not. allocated(this%matrix)) then
133
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
134
- "Hamiltonian not initialized", "hamiltonian_add_interaction")
135
- return
136
- end if
137
-
138
- if (size(interaction_matrix, 1, kind=i8) /= this%dim .or. &
139
- size(interaction_matrix, 2, kind=i8) /= this%dim) then
140
- call bob_set_error(BOB_ERROR_DIMENSION_MISMATCH, &
141
- "Interaction matrix dimension mismatch", "hamiltonian_add_interaction")
142
- return
143
- end if
144
-
145
- coeff = ONE
146
- if (present(coefficient)) coeff = coefficient
147
- this%interaction_coefficient = coeff
148
-
149
- ! Add interaction term
150
- do i = 1, this%dim
151
- do j = 1, this%dim
152
- this%matrix(i,j) = this%matrix(i,j) + &
153
- cmplx(coeff, ZERO, cwp) * interaction_matrix(i,j)
154
- end do
155
- end do
156
-
157
- call bob_clear_error()
158
- end subroutine hamiltonian_add_interaction
159
-
160
- !> Add external field term
161
- subroutine hamiltonian_add_external_field(this, field_operator, field_strength)
162
- class(bob_hamiltonian_operator), intent(inout) :: this
163
- complex(cwp), intent(in) :: field_operator(:,:)
164
- real(wp), intent(in) :: field_strength
165
-
166
- integer(i8) :: i, j
167
-
168
- if (.not. allocated(this%matrix)) then
169
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
170
- "Hamiltonian not initialized", "hamiltonian_add_external_field")
171
- return
172
- end if
173
-
174
- if (size(field_operator, 1, kind=i8) /= this%dim .or. &
175
- size(field_operator, 2, kind=i8) /= this%dim) then
176
- call bob_set_error(BOB_ERROR_DIMENSION_MISMATCH, &
177
- "Field operator dimension mismatch", "hamiltonian_add_external_field")
178
- return
179
- end if
180
-
181
- this%external_field = field_strength
182
-
183
- ! Add field term: H_field = -μ·B
184
- do i = 1, this%dim
185
- do j = 1, this%dim
186
- this%matrix(i,j) = this%matrix(i,j) - &
187
- cmplx(field_strength, ZERO, cwp) * field_operator(i,j)
188
- end do
189
- end do
190
-
191
- call bob_clear_error()
192
- end subroutine hamiltonian_add_external_field
193
-
194
- !> Add arbitrary term to Hamiltonian
195
- subroutine hamiltonian_add_term(this, term_matrix, coefficient)
196
- class(bob_hamiltonian_operator), intent(inout) :: this
197
- complex(cwp), intent(in) :: term_matrix(:,:)
198
- complex(cwp), intent(in), optional :: coefficient
199
-
200
- integer(i8) :: i, j
201
- complex(cwp) :: coeff
202
-
203
- if (.not. allocated(this%matrix)) then
204
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
205
- "Hamiltonian not initialized", "hamiltonian_add_term")
206
- return
207
- end if
208
-
209
- if (size(term_matrix, 1, kind=i8) /= this%dim .or. &
210
- size(term_matrix, 2, kind=i8) /= this%dim) then
211
- call bob_set_error(BOB_ERROR_DIMENSION_MISMATCH, &
212
- "Term matrix dimension mismatch", "hamiltonian_add_term")
213
- return
214
- end if
215
-
216
- coeff = CONE
217
- if (present(coefficient)) coeff = coefficient
218
-
219
- ! Add term
220
- do i = 1, this%dim
221
- do j = 1, this%dim
222
- this%matrix(i,j) = this%matrix(i,j) + coeff * term_matrix(i,j)
223
- end do
224
- end do
225
-
226
- call bob_clear_error()
227
- end subroutine hamiltonian_add_term
228
-
229
- !> Verify Hamiltonian is Hermitian: H = H†
230
- function hamiltonian_verify_hermitian(this) result(is_hermitian)
231
- class(bob_hamiltonian_operator), intent(inout) :: this
232
- logical(lk) :: is_hermitian
233
-
234
- integer(i8) :: i, j
235
- real(wp) :: max_error
236
- complex(cwp) :: diff
237
-
238
- is_hermitian = .false.
239
-
240
- if (.not. allocated(this%matrix)) then
241
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
242
- "Hamiltonian not initialized", "hamiltonian_verify_hermitian")
243
- return
244
- end if
245
-
246
- ! Check H(i,j) = H*(j,i)
247
- max_error = ZERO
248
- do i = 1, this%dim
249
- do j = i, this%dim
250
- diff = this%matrix(i,j) - conjg(this%matrix(j,i))
251
- max_error = max(max_error, abs(diff))
252
- end do
253
- end do
254
-
255
- is_hermitian = (max_error < TOL_HERMITIAN)
256
- this%is_hermitian = is_hermitian
257
-
258
- if (.not. is_hermitian) then
259
- call bob_set_error(BOB_ERROR_NOT_HERMITIAN, &
260
- "Hamiltonian is not Hermitian", "hamiltonian_verify_hermitian")
261
- else
262
- call bob_clear_error()
263
- end if
264
- end function hamiltonian_verify_hermitian
265
-
266
- !> Get eigenvalues (simplified - returns diagonal elements)
267
- subroutine hamiltonian_get_eigenvalues(this, eigenvalues)
268
- class(bob_hamiltonian_operator), intent(in) :: this
269
- real(wp), intent(out) :: eigenvalues(:)
270
-
271
- integer(i8) :: i
272
-
273
- if (.not. allocated(this%matrix)) then
274
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
275
- "Hamiltonian not initialized", "hamiltonian_get_eigenvalues")
276
- return
277
- end if
278
-
279
- if (size(eigenvalues, kind=i8) /= this%dim) then
280
- call bob_set_error(BOB_ERROR_DIMENSION_MISMATCH, &
281
- "Eigenvalues array dimension mismatch", "hamiltonian_get_eigenvalues")
282
- return
283
- end if
284
-
285
- ! Simplified: return diagonal elements
286
- ! Full implementation would ! use LAPACK ! removed: zero-dep build eigenvalue solver
287
- do i = 1, this%dim
288
- eigenvalues(i) = real(this%matrix(i,i))
289
- end do
290
-
291
- call bob_clear_error()
292
- end subroutine hamiltonian_get_eigenvalues
293
-
294
- !> Apply Hamiltonian to state: |ψ'⟩ = H|ψ⟩
295
- subroutine hamiltonian_apply_to_state(this, state, result_state)
296
- class(bob_hamiltonian_operator), intent(in) :: this
297
- type(bob_quantum_state), intent(in) :: state
298
- type(bob_quantum_state), intent(out) :: result_state
299
-
300
- integer(i8) :: i, j
301
-
302
- if (.not. allocated(this%matrix)) then
303
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
304
- "Hamiltonian not initialized", "hamiltonian_apply_to_state")
305
- return
306
- end if
307
-
308
- if (.not. state%is_valid) then
309
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
310
- "Cannot apply Hamiltonian to invalid state", &
311
- "hamiltonian_apply_to_state")
312
- return
313
- end if
314
-
315
- if (state%dim /= this%dim) then
316
- call bob_set_error(BOB_ERROR_DIMENSION_MISMATCH, &
317
- "State dimension mismatch", "hamiltonian_apply_to_state")
318
- return
319
- end if
320
-
321
- ! Initialize result state
322
- call result_state%allocate(this%dim, "H|psi>")
323
-
324
- ! Compute H|ψ⟩
325
- result_state%amplitudes = CZERO
326
- do i = 1, this%dim
327
- do j = 1, this%dim
328
- result_state%amplitudes(i) = result_state%amplitudes(i) + &
329
- this%matrix(i,j) * state%amplitudes(j)
330
- end do
331
- end do
332
-
333
- result_state%is_valid = .true.
334
- result_state%is_normalized = .false.
335
-
336
- call bob_clear_error()
337
- end subroutine hamiltonian_apply_to_state
338
-
339
- !> Calculate expectation value: E = ⟨ψ|H|ψ⟩
340
- function hamiltonian_expectation_value(this, state) result(expectation)
341
- class(bob_hamiltonian_operator), intent(in) :: this
342
- type(bob_quantum_state), intent(in) :: state
343
- real(wp) :: expectation
344
-
345
- type(bob_quantum_state) :: h_psi
346
- complex(cwp) :: inner_prod
347
-
348
- if (.not. allocated(this%matrix)) then
349
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
350
- "Hamiltonian not initialized", "hamiltonian_expectation_value")
351
- expectation = ZERO
352
- return
353
- end if
354
-
355
- if (.not. state%is_valid) then
356
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
357
- "Cannot compute expectation for invalid state", &
358
- "hamiltonian_expectation_value")
359
- expectation = ZERO
360
- return
361
- end if
362
-
363
- ! Compute H|ψ⟩
364
- call this%apply_to_state(state, h_psi)
365
-
366
- if (bob_get_last_error() /= BOB_SUCCESS) then
367
- expectation = ZERO
368
- return
369
- end if
370
-
371
- ! Compute ⟨ψ|H|ψ⟩
372
- inner_prod = state%inner_product(h_psi)
373
- expectation = real(inner_prod)
374
-
375
- call h_psi%deallocate()
376
- call bob_clear_error()
377
- end function hamiltonian_expectation_value
378
-
379
- !> Build Ising Hamiltonian: H = -J Σ σᵢᶻσⱼᶻ - h Σ σᵢˣ
380
- subroutine build_ising_hamiltonian(hamiltonian, num_sites, coupling, field)
381
- type(bob_hamiltonian_operator), intent(out) :: hamiltonian
382
- integer(i8), intent(in) :: num_sites
383
- real(wp), intent(in) :: coupling, field
384
-
385
- integer(i8) :: dim, i, j, site
386
- integer(i8) :: state_i, state_j, bit_i, bit_j
387
- real(wp) :: interaction_energy
388
-
389
- ! Hilbert space dimension: 2^num_sites
390
- dim = ishft(1_i8, int(num_sites))
391
-
392
- call hamiltonian%init(dim, "Ising")
393
-
394
- ! Build Hamiltonian matrix
395
- do state_i = 0, dim - 1
396
- do state_j = 0, dim - 1
397
-
398
- if (state_i == state_j) then
399
- ! Diagonal: interaction term -J Σ σᵢᶻσⱼᶻ
400
- interaction_energy = ZERO
401
-
402
- do site = 0, num_sites - 2
403
- bit_i = iand(ishft(state_i, -int(site)), 1_i8)
404
- bit_j = iand(ishft(state_i, -int(site+1)), 1_i8)
405
-
406
- ! Convert 0,1 to -1,+1
407
- interaction_energy = interaction_energy - coupling * &
408
- (TWO * real(bit_i, wp) - ONE) * (TWO * real(bit_j, wp) - ONE)
409
- end do
410
-
411
- hamiltonian%matrix(state_i + 1, state_j + 1) = &
412
- cmplx(interaction_energy, ZERO, cwp)
413
-
414
- else
415
- ! Off-diagonal: transverse field term -h Σ σᵢˣ
416
- ! σˣ flips one bit
417
- if (popcnt(ieor(state_i, state_j)) == 1) then
418
- hamiltonian%matrix(state_i + 1, state_j + 1) = &
419
- cmplx(-field, ZERO, cwp)
420
- end if
421
- end if
422
-
423
- end do
424
- end do
425
-
426
- hamiltonian%is_hermitian = .true.
427
- end subroutine build_ising_hamiltonian
428
-
429
- !> Build Heisenberg Hamiltonian: H = J Σ (σᵢˣσⱼˣ + σᵢʸσⱼʸ + σᵢᶻσⱼᶻ)
430
- subroutine build_heisenberg_hamiltonian(hamiltonian, num_sites, coupling)
431
- type(bob_hamiltonian_operator), intent(out) :: hamiltonian
432
- integer(i8), intent(in) :: num_sites
433
- real(wp), intent(in) :: coupling
434
-
435
- integer(i8) :: dim, i, j
436
- integer(i8) :: state_i, state_j, site
437
- integer(i8) :: bit_i, bit_j, flipped_state
438
- real(wp) :: zz_term
439
-
440
- dim = ishft(1_i8, int(num_sites))
441
- call hamiltonian%init(dim, "Heisenberg")
442
-
443
- do state_i = 0, dim - 1
444
- do state_j = 0, dim - 1
445
-
446
- if (state_i == state_j) then
447
- ! Diagonal: σᶻσᶻ term
448
- zz_term = ZERO
449
-
450
- do site = 0, num_sites - 2
451
- bit_i = iand(ishft(state_i, -int(site)), 1_i8)
452
- bit_j = iand(ishft(state_i, -int(site+1)), 1_i8)
453
-
454
- zz_term = zz_term + coupling * &
455
- (TWO * real(bit_i, wp) - ONE) * (TWO * real(bit_j, wp) - ONE)
456
- end do
457
-
458
- hamiltonian%matrix(state_i + 1, state_j + 1) = &
459
- cmplx(zz_term, ZERO, cwp)
460
-
461
- else
462
- ! Off-diagonal: σˣσˣ + σʸσʸ terms
463
- ! These flip two adjacent bits
464
- if (popcnt(ieor(state_i, state_j)) == 2) then
465
- hamiltonian%matrix(state_i + 1, state_j + 1) = &
466
- cmplx(coupling / TWO, ZERO, cwp)
467
- end if
468
- end if
469
-
470
- end do
471
- end do
472
-
473
- hamiltonian%is_hermitian = .true.
474
- end subroutine build_heisenberg_hamiltonian
475
-
476
- !> Build Hubbard Hamiltonian (simplified)
477
- subroutine build_hubbard_hamiltonian(hamiltonian, num_sites, hopping, interaction)
478
- type(bob_hamiltonian_operator), intent(out) :: hamiltonian
479
- integer(i8), intent(in) :: num_sites
480
- real(wp), intent(in) :: hopping, interaction
481
-
482
- integer(i8) :: dim
483
-
484
- dim = ishft(1_i8, int(num_sites))
485
- call hamiltonian%init(dim, "Hubbard")
486
-
487
- ! Simplified Hubbard model
488
- ! Full implementation would handle fermionic operators
489
-
490
- ! Add hopping term
491
- call hamiltonian%add_kinetic(-hopping)
492
-
493
- ! Add interaction term (simplified)
494
- hamiltonian%matrix = hamiltonian%matrix + &
495
- cmplx(interaction, ZERO, cwp)
496
-
497
- hamiltonian%is_hermitian = .true.
498
- end subroutine build_hubbard_hamiltonian
499
-
500
- !> C ABI: Create Hamiltonian
501
- function bob_hamiltonian_create(dim) result(ham_ptr) &
502
- bind(C, name="bob_hamiltonian_create")
503
- use, intrinsic :: iso_c_binding
504
- integer(c_int64_t), value :: dim
505
- type(c_ptr) :: ham_ptr
506
-
507
- type(bob_hamiltonian_operator), pointer :: hamiltonian
508
-
509
- allocate(hamiltonian)
510
- call hamiltonian%init(dim)
511
- ham_ptr = c_loc(hamiltonian)
512
- end function bob_hamiltonian_create
513
-
514
- !> C ABI: Destroy Hamiltonian
515
- subroutine bob_hamiltonian_destroy(ham_ptr) bind(C, name="bob_hamiltonian_destroy")
516
- use, intrinsic :: iso_c_binding
517
- type(c_ptr), value :: ham_ptr
518
- type(bob_hamiltonian_operator), pointer :: hamiltonian
519
-
520
- if (.not. c_associated(ham_ptr)) return
521
-
522
- call c_f_pointer(ham_ptr, hamiltonian)
523
- call hamiltonian%destroy()
524
- deallocate(hamiltonian)
525
- end subroutine bob_hamiltonian_destroy
526
-
527
- !> C ABI: Apply Hamiltonian to state
528
- function bob_hamiltonian_apply(ham_ptr, state_ptr, result_ptr) result(status) &
529
- bind(C, name="bob_hamiltonian_apply")
530
- use, intrinsic :: iso_c_binding
531
- type(c_ptr), value :: ham_ptr, state_ptr, result_ptr
532
- integer(c_int) :: status
533
-
534
- type(bob_hamiltonian_operator), pointer :: hamiltonian
535
- type(bob_quantum_state), pointer :: state, result
536
-
537
- if (.not. c_associated(ham_ptr) .or. &
538
- .not. c_associated(state_ptr) .or. &
539
- .not. c_associated(result_ptr)) then
540
- status = BOB_ERROR_INVALID_ARGUMENT
541
- return
542
- end if
543
-
544
- call c_f_pointer(ham_ptr, hamiltonian)
545
- call c_f_pointer(state_ptr, state)
546
- call c_f_pointer(result_ptr, result)
547
-
548
- call hamiltonian%apply_to_state(state, result)
549
- status = bob_get_last_error()
550
- end function bob_hamiltonian_apply
551
-
552
- end module bob_hamiltonian
553
-
554
- ! Made with Bob
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_hamiltonian.f90-pp.f90.d DELETED
@@ -1,2 +0,0 @@
1
- CMakeFiles/bob_quantum.dir/src/bob_hamiltonian.f90-pp.f90: \
2
- C:/Users/jessi/Desktop/bobs\ control\ repo/sov-kernel-monster/src/bob_hamiltonian.f90
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_hamiltonian.f90.obj.ddi DELETED
@@ -1,31 +0,0 @@
1
- {
2
- "revision" : 0,
3
- "rules" :
4
- [
5
- {
6
- "outputs" : [],
7
- "primary-output" : "CMakeFiles\\\\bob_quantum.dir\\\\src\\\\bob_hamiltonian.f90.obj",
8
- "provides" :
9
- [
10
- {
11
- "compiled-module-path" : "bob_hamiltonian.mod",
12
- "is-interface" : true,
13
- "logical-name" : "bob_hamiltonian.mod"
14
- }
15
- ],
16
- "requires" :
17
- [
18
- {
19
- "logical-name" : "bob_errors.mod"
20
- },
21
- {
22
- "logical-name" : "bob_kinds.mod"
23
- },
24
- {
25
- "logical-name" : "bob_state.mod"
26
- }
27
- ]
28
- }
29
- ],
30
- "version" : 0
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_integrator.f90-pp.f90 DELETED
@@ -1,460 +0,0 @@
1
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_integrator.f90"
2
- # 1 "<built-in>"
3
- # 1 "<command-line>"
4
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_integrator.f90"
5
- ! BOB Quantum Civilization Engine - Time Integration
6
- ! Module: bob_integrator
7
- ! Purpose: Time evolution of quantum states under Hamiltonians
8
- ! Standard: Fortran 2018
9
-
10
- module bob_integrator
11
- use bob_kinds
12
- use bob_errors
13
- use bob_state
14
- use bob_hamiltonian
15
- implicit none
16
- private
17
-
18
- !> Integration method
19
- integer(i4), parameter, public :: INTEGRATOR_EULER = 1
20
- integer(i4), parameter, public :: INTEGRATOR_RK2 = 2
21
- integer(i4), parameter, public :: INTEGRATOR_RK4 = 3
22
- integer(i4), parameter, public :: INTEGRATOR_EXPM = 4
23
- integer(i4), parameter, public :: INTEGRATOR_TROTTER = 5
24
-
25
- !> Time integrator
26
- type, public :: bob_time_integrator
27
- integer(i4) :: method ! Integration method
28
- real(wp) :: dt ! Time step
29
- real(wp) :: time ! Current time
30
- integer(i8) :: steps_taken ! Number of steps
31
- real(wp) :: error_estimate ! Error estimate
32
- logical(lk) :: adaptive ! Adaptive time stepping
33
- real(wp) :: tolerance ! Error tolerance
34
- character(len=64) :: label ! Integrator label
35
- contains
36
- procedure :: init => integrator_init
37
- procedure :: step => integrator_step
38
- procedure :: evolve => integrator_evolve
39
- procedure :: reset => integrator_reset
40
- end type bob_time_integrator
41
-
42
- public :: bob_integrator_create
43
- public :: bob_integrator_destroy
44
- public :: bob_integrator_evolve
45
-
46
- contains
47
-
48
- !> Initialize integrator
49
- subroutine integrator_init(this, method, dt, label)
50
- class(bob_time_integrator), intent(inout) :: this
51
- integer(i4), intent(in) :: method
52
- real(wp), intent(in) :: dt
53
- character(len=*), intent(in), optional :: label
54
-
55
- if (dt <= ZERO) then
56
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
57
- "Time step must be positive", "integrator_init")
58
- return
59
- end if
60
-
61
- this%method = method
62
- this%dt = dt
63
- this%time = ZERO
64
- this%steps_taken = 0
65
- this%error_estimate = ZERO
66
- this%adaptive = .false.
67
- this%tolerance = 1.0e-8_wp
68
-
69
- if (present(label)) then
70
- this%label = trim(label)
71
- else
72
- this%label = "unnamed_integrator"
73
- end if
74
-
75
- call bob_clear_error()
76
- end subroutine integrator_init
77
-
78
- !> Take single integration step
79
- subroutine integrator_step(this, state, hamiltonian)
80
- class(bob_time_integrator), intent(inout) :: this
81
- type(bob_quantum_state), intent(inout) :: state
82
- type(bob_hamiltonian_operator), intent(in) :: hamiltonian
83
-
84
- select case (this%method)
85
- case (INTEGRATOR_EULER)
86
- call step_euler(state, hamiltonian, this%dt)
87
- case (INTEGRATOR_RK2)
88
- call step_rk2(state, hamiltonian, this%dt)
89
- case (INTEGRATOR_RK4)
90
- call step_rk4(state, hamiltonian, this%dt)
91
- case (INTEGRATOR_EXPM)
92
- call step_expm(state, hamiltonian, this%dt)
93
- case (INTEGRATOR_TROTTER)
94
- call step_trotter(state, hamiltonian, this%dt)
95
- case default
96
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
97
- "Unknown integration method", "integrator_step")
98
- return
99
- end select
100
-
101
- this%time = this%time + this%dt
102
- this%steps_taken = this%steps_taken + 1
103
-
104
- call bob_clear_error()
105
- end subroutine integrator_step
106
-
107
- !> Evolve for specified time
108
- subroutine integrator_evolve(this, state, hamiltonian, total_time)
109
- class(bob_time_integrator), intent(inout) :: this
110
- type(bob_quantum_state), intent(inout) :: state
111
- type(bob_hamiltonian_operator), intent(in) :: hamiltonian
112
- real(wp), intent(in) :: total_time
113
-
114
- integer(i8) :: num_steps, step
115
- real(wp) :: remaining_time
116
-
117
- if (total_time <= ZERO) then
118
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
119
- "Total time must be positive", "integrator_evolve")
120
- return
121
- end if
122
-
123
- num_steps = int(total_time / this%dt, i8)
124
- remaining_time = total_time - real(num_steps, wp) * this%dt
125
-
126
- ! Take full steps
127
- do step = 1, num_steps
128
- call this%step(state, hamiltonian)
129
-
130
- if (bob_get_last_error() /= BOB_SUCCESS) return
131
-
132
- ! Renormalize periodically
133
- if (mod(step, 100_i8) == 0) then
134
- call state%normalize()
135
- end if
136
- end do
137
-
138
- ! Take partial step if needed
139
- if (remaining_time > TOL_NORM) then
140
- select case (this%method)
141
- case (INTEGRATOR_EULER)
142
- call step_euler(state, hamiltonian, remaining_time)
143
- case (INTEGRATOR_RK2)
144
- call step_rk2(state, hamiltonian, remaining_time)
145
- case (INTEGRATOR_RK4)
146
- call step_rk4(state, hamiltonian, remaining_time)
147
- case (INTEGRATOR_EXPM)
148
- call step_expm(state, hamiltonian, remaining_time)
149
- case (INTEGRATOR_TROTTER)
150
- call step_trotter(state, hamiltonian, remaining_time)
151
- end select
152
-
153
- this%time = this%time + remaining_time
154
- end if
155
-
156
- ! Final normalization
157
- call state%normalize()
158
-
159
- call bob_clear_error()
160
- end subroutine integrator_evolve
161
-
162
- !> Reset integrator
163
- subroutine integrator_reset(this)
164
- class(bob_time_integrator), intent(inout) :: this
165
-
166
- this%time = ZERO
167
- this%steps_taken = 0
168
- this%error_estimate = ZERO
169
- end subroutine integrator_reset
170
-
171
- !> Euler method: |ψ(t+dt)⟩ = |ψ(t)⟩ - i*dt*H|ψ(t)⟩
172
- subroutine step_euler(state, hamiltonian, dt)
173
- type(bob_quantum_state), intent(inout) :: state
174
- type(bob_hamiltonian_operator), intent(in) :: hamiltonian
175
- real(wp), intent(in) :: dt
176
-
177
- type(bob_quantum_state) :: h_psi
178
- integer(i8) :: i
179
-
180
- ! Compute H|ψ⟩
181
- call hamiltonian%apply_to_state(state, h_psi)
182
-
183
- if (bob_get_last_error() /= BOB_SUCCESS) return
184
-
185
- ! Update: |ψ⟩ ← |ψ⟩ - i*dt*H|ψ⟩
186
- do i = 1, state%dim
187
- state%amplitudes(i) = state%amplitudes(i) - CI * dt * h_psi%amplitudes(i)
188
- end do
189
-
190
- call h_psi%deallocate()
191
- state%is_normalized = .false.
192
- end subroutine step_euler
193
-
194
- !> Runge-Kutta 2nd order (midpoint method)
195
- subroutine step_rk2(state, hamiltonian, dt)
196
- type(bob_quantum_state), intent(inout) :: state
197
- type(bob_hamiltonian_operator), intent(in) :: hamiltonian
198
- real(wp), intent(in) :: dt
199
-
200
- type(bob_quantum_state) :: k1, k2, temp_state
201
- integer(i8) :: i
202
-
203
- ! k1 = -i*H|ψ⟩
204
- call hamiltonian%apply_to_state(state, k1)
205
- if (bob_get_last_error() /= BOB_SUCCESS) return
206
-
207
- do i = 1, k1%dim
208
- k1%amplitudes(i) = -CI * k1%amplitudes(i)
209
- end do
210
-
211
- ! temp = |ψ⟩ + (dt/2)*k1
212
- call temp_state%allocate(state%dim, "temp")
213
- do i = 1, state%dim
214
- temp_state%amplitudes(i) = state%amplitudes(i) + (dt / TWO) * k1%amplitudes(i)
215
- end do
216
- temp_state%is_valid = .true.
217
-
218
- ! k2 = -i*H*temp
219
- call hamiltonian%apply_to_state(temp_state, k2)
220
- if (bob_get_last_error() /= BOB_SUCCESS) then
221
- call k1%deallocate()
222
- call temp_state%deallocate()
223
- return
224
- end if
225
-
226
- do i = 1, k2%dim
227
- k2%amplitudes(i) = -CI * k2%amplitudes(i)
228
- end do
229
-
230
- ! Update: |ψ⟩ ← |ψ⟩ + dt*k2
231
- do i = 1, state%dim
232
- state%amplitudes(i) = state%amplitudes(i) + dt * k2%amplitudes(i)
233
- end do
234
-
235
- call k1%deallocate()
236
- call k2%deallocate()
237
- call temp_state%deallocate()
238
- state%is_normalized = .false.
239
- end subroutine step_rk2
240
-
241
- !> Runge-Kutta 4th order
242
- subroutine step_rk4(state, hamiltonian, dt)
243
- type(bob_quantum_state), intent(inout) :: state
244
- type(bob_hamiltonian_operator), intent(in) :: hamiltonian
245
- real(wp), intent(in) :: dt
246
-
247
- type(bob_quantum_state) :: k1, k2, k3, k4, temp_state
248
- integer(i8) :: i
249
-
250
- ! k1 = -i*H|ψ⟩
251
- call hamiltonian%apply_to_state(state, k1)
252
- if (bob_get_last_error() /= BOB_SUCCESS) return
253
- do i = 1, k1%dim
254
- k1%amplitudes(i) = -CI * k1%amplitudes(i)
255
- end do
256
-
257
- ! temp = |ψ⟩ + (dt/2)*k1
258
- call temp_state%allocate(state%dim, "temp")
259
- do i = 1, state%dim
260
- temp_state%amplitudes(i) = state%amplitudes(i) + (dt / TWO) * k1%amplitudes(i)
261
- end do
262
- temp_state%is_valid = .true.
263
-
264
- ! k2 = -i*H*temp
265
- call hamiltonian%apply_to_state(temp_state, k2)
266
- if (bob_get_last_error() /= BOB_SUCCESS) goto 999
267
- do i = 1, k2%dim
268
- k2%amplitudes(i) = -CI * k2%amplitudes(i)
269
- end do
270
-
271
- ! temp = |ψ⟩ + (dt/2)*k2
272
- do i = 1, state%dim
273
- temp_state%amplitudes(i) = state%amplitudes(i) + (dt / TWO) * k2%amplitudes(i)
274
- end do
275
-
276
- ! k3 = -i*H*temp
277
- call hamiltonian%apply_to_state(temp_state, k3)
278
- if (bob_get_last_error() /= BOB_SUCCESS) goto 999
279
- do i = 1, k3%dim
280
- k3%amplitudes(i) = -CI * k3%amplitudes(i)
281
- end do
282
-
283
- ! temp = |ψ⟩ + dt*k3
284
- do i = 1, state%dim
285
- temp_state%amplitudes(i) = state%amplitudes(i) + dt * k3%amplitudes(i)
286
- end do
287
-
288
- ! k4 = -i*H*temp
289
- call hamiltonian%apply_to_state(temp_state, k4)
290
- if (bob_get_last_error() /= BOB_SUCCESS) goto 999
291
- do i = 1, k4%dim
292
- k4%amplitudes(i) = -CI * k4%amplitudes(i)
293
- end do
294
-
295
- ! Update: |ψ⟩ ← |ψ⟩ + (dt/6)*(k1 + 2*k2 + 2*k3 + k4)
296
- do i = 1, state%dim
297
- state%amplitudes(i) = state%amplitudes(i) + &
298
- (dt / 6.0_wp) * (k1%amplitudes(i) + TWO * k2%amplitudes(i) + &
299
- TWO * k3%amplitudes(i) + k4%amplitudes(i))
300
- end do
301
-
302
- 999 continue
303
- call k1%deallocate()
304
- call k2%deallocate()
305
- call k3%deallocate()
306
- call k4%deallocate()
307
- call temp_state%deallocate()
308
- state%is_normalized = .false.
309
- end subroutine step_rk4
310
-
311
- !> Matrix exponential method: |ψ(t+dt)⟩ = exp(-i*H*dt)|ψ(t)⟩
312
- subroutine step_expm(state, hamiltonian, dt)
313
- type(bob_quantum_state), intent(inout) :: state
314
- type(bob_hamiltonian_operator), intent(in) :: hamiltonian
315
- real(wp), intent(in) :: dt
316
-
317
- complex(cwp), allocatable :: exp_matrix(:,:)
318
- complex(cwp), allocatable :: new_amplitudes(:)
319
- integer(i8) :: i, j, k
320
- integer :: stat
321
- real(wp) :: factorial
322
- complex(cwp) :: term_coeff
323
- integer, parameter :: MAX_TERMS = 20
324
-
325
- ! Allocate matrices
326
- allocate(exp_matrix(state%dim, state%dim), stat=stat)
327
- if (stat /= 0) then
328
- call bob_set_error(BOB_ERROR_ALLOCATION, &
329
- "Failed to allocate exponential matrix", "step_expm")
330
- return
331
- end if
332
-
333
- allocate(new_amplitudes(state%dim), stat=stat)
334
- if (stat /= 0) then
335
- deallocate(exp_matrix)
336
- call bob_set_error(BOB_ERROR_ALLOCATION, &
337
- "Failed to allocate new amplitudes", "step_expm")
338
- return
339
- end if
340
-
341
- ! Compute exp(-i*H*dt) using Taylor series
342
- ! exp(A) = I + A + A²/2! + A³/3! + ...
343
-
344
- ! Initialize to identity
345
- exp_matrix = CZERO
346
- do i = 1, state%dim
347
- exp_matrix(i,i) = CONE
348
- end do
349
-
350
- ! Add terms
351
- factorial = ONE
352
- do k = 1, MAX_TERMS
353
- factorial = factorial * real(k, wp)
354
- term_coeff = (-CI * dt) ** k / factorial
355
-
356
- ! Add term: (-i*H*dt)^k / k!
357
- ! Simplified: just add scaled Hamiltonian powers
358
- do i = 1, state%dim
359
- do j = 1, state%dim
360
- exp_matrix(i,j) = exp_matrix(i,j) + &
361
- term_coeff * hamiltonian%matrix(i,j)
362
- end do
363
- end do
364
- end do
365
-
366
- ! Apply to state
367
- new_amplitudes = CZERO
368
- do i = 1, state%dim
369
- do j = 1, state%dim
370
- new_amplitudes(i) = new_amplitudes(i) + &
371
- exp_matrix(i,j) * state%amplitudes(j)
372
- end do
373
- end do
374
-
375
- state%amplitudes = new_amplitudes
376
-
377
- deallocate(exp_matrix, new_amplitudes)
378
- state%is_normalized = .false.
379
- end subroutine step_expm
380
-
381
- !> Trotter decomposition: exp(-i*H*dt) ≈ exp(-i*H₁*dt)exp(-i*H₂*dt)
382
- subroutine step_trotter(state, hamiltonian, dt)
383
- type(bob_quantum_state), intent(inout) :: state
384
- type(bob_hamiltonian_operator), intent(in) :: hamiltonian
385
- real(wp), intent(in) :: dt
386
-
387
- integer(i8) :: i
388
- complex(cwp) :: phase_factor
389
-
390
- ! Simplified Trotter: apply diagonal and off-diagonal parts separately
391
-
392
- ! Apply diagonal part: exp(-i*diag(H)*dt)
393
- do i = 1, state%dim
394
- phase_factor = exp(-CI * hamiltonian%matrix(i,i) * dt)
395
- state%amplitudes(i) = state%amplitudes(i) * phase_factor
396
- end do
397
-
398
- ! Off-diagonal part would require more sophisticated treatment
399
- ! This is a simplified version
400
-
401
- state%is_normalized = .false.
402
- end subroutine step_trotter
403
-
404
- !> C ABI: Create integrator
405
- function bob_integrator_create(method, dt) result(int_ptr) &
406
- bind(C, name="bob_integrator_create")
407
- use, intrinsic :: iso_c_binding
408
- integer(c_int), value :: method
409
- real(c_double), value :: dt
410
- type(c_ptr) :: int_ptr
411
-
412
- type(bob_time_integrator), pointer :: integrator
413
-
414
- allocate(integrator)
415
- call integrator%init(method, dt)
416
- int_ptr = c_loc(integrator)
417
- end function bob_integrator_create
418
-
419
- !> C ABI: Destroy integrator
420
- subroutine bob_integrator_destroy(int_ptr) bind(C, name="bob_integrator_destroy")
421
- use, intrinsic :: iso_c_binding
422
- type(c_ptr), value :: int_ptr
423
- type(bob_time_integrator), pointer :: integrator
424
-
425
- if (.not. c_associated(int_ptr)) return
426
-
427
- call c_f_pointer(int_ptr, integrator)
428
- deallocate(integrator)
429
- end subroutine bob_integrator_destroy
430
-
431
- !> C ABI: Evolve state
432
- function bob_integrator_evolve(int_ptr, state_ptr, ham_ptr, total_time) result(status) &
433
- bind(C, name="bob_integrator_evolve")
434
- use, intrinsic :: iso_c_binding
435
- type(c_ptr), value :: int_ptr, state_ptr, ham_ptr
436
- real(c_double), value :: total_time
437
- integer(c_int) :: status
438
-
439
- type(bob_time_integrator), pointer :: integrator
440
- type(bob_quantum_state), pointer :: state
441
- type(bob_hamiltonian_operator), pointer :: hamiltonian
442
-
443
- if (.not. c_associated(int_ptr) .or. &
444
- .not. c_associated(state_ptr) .or. &
445
- .not. c_associated(ham_ptr)) then
446
- status = BOB_ERROR_INVALID_ARGUMENT
447
- return
448
- end if
449
-
450
- call c_f_pointer(int_ptr, integrator)
451
- call c_f_pointer(state_ptr, state)
452
- call c_f_pointer(ham_ptr, hamiltonian)
453
-
454
- call integrator%evolve(state, hamiltonian, total_time)
455
- status = bob_get_last_error()
456
- end function bob_integrator_evolve
457
-
458
- end module bob_integrator
459
-
460
- ! Made with Bob
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_integrator.f90-pp.f90.d DELETED
@@ -1,2 +0,0 @@
1
- CMakeFiles/bob_quantum.dir/src/bob_integrator.f90-pp.f90: \
2
- C:/Users/jessi/Desktop/bobs\ control\ repo/sov-kernel-monster/src/bob_integrator.f90
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_integrator.f90.obj.ddi DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "revision" : 0,
3
- "rules" :
4
- [
5
- {
6
- "outputs" : [],
7
- "primary-output" : "CMakeFiles\\\\bob_quantum.dir\\\\src\\\\bob_integrator.f90.obj",
8
- "provides" :
9
- [
10
- {
11
- "compiled-module-path" : "bob_integrator.mod",
12
- "is-interface" : true,
13
- "logical-name" : "bob_integrator.mod"
14
- }
15
- ],
16
- "requires" :
17
- [
18
- {
19
- "logical-name" : "bob_errors.mod"
20
- },
21
- {
22
- "logical-name" : "bob_hamiltonian.mod"
23
- },
24
- {
25
- "logical-name" : "bob_kinds.mod"
26
- },
27
- {
28
- "logical-name" : "bob_state.mod"
29
- }
30
- ]
31
- }
32
- ],
33
- "version" : 0
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_kinds.f90-pp.f90 DELETED
@@ -1,59 +0,0 @@
1
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_kinds.f90"
2
- # 1 "<built-in>"
3
- # 1 "<command-line>"
4
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_kinds.f90"
5
- ! BOB Quantum Civilization Engine - Type Definitions
6
- ! Module: bob_kinds
7
- ! Purpose: Explicit kind parameters for portable numeric types
8
- ! Standard: Fortran 2018
9
- ! Compiler: GNU Fortran (gfortran)
10
-
11
- module bob_kinds
12
- use, intrinsic :: iso_c_binding, only: c_int, c_int64_t, c_double, c_float, c_bool, c_char
13
- implicit none
14
- private
15
-
16
- ! Export C-compatible types
17
- public :: c_int, c_int64_t, c_double, c_float, c_bool, c_char
18
-
19
- ! Integer kinds
20
- integer, parameter, public :: i4 = c_int ! 32-bit integer
21
- integer, parameter, public :: i8 = c_int64_t ! 64-bit integer
22
-
23
- ! Real kinds
24
- integer, parameter, public :: sp = c_float ! Single precision (32-bit)
25
- integer, parameter, public :: dp = c_double ! Double precision (64-bit)
26
-
27
- ! Default working precision for quantum states
28
- integer, parameter, public :: wp = dp ! Working precision = double
29
-
30
- ! Complex kinds
31
- integer, parameter, public :: cwp = wp ! Complex working precision
32
-
33
- ! Logical kind
34
- integer, parameter, public :: lk = c_bool ! Logical/boolean
35
-
36
- ! Character kind
37
- integer, parameter, public :: ck = c_char ! Character
38
-
39
- ! Constants
40
- real(wp), parameter, public :: PI = 3.141592653589793238462643383279502884197_wp
41
- real(wp), parameter, public :: HBAR = 1.054571817e-34_wp ! Reduced Planck constant (J·s)
42
- real(wp), parameter, public :: ZERO = 0.0_wp
43
- real(wp), parameter, public :: ONE = 1.0_wp
44
- real(wp), parameter, public :: TWO = 2.0_wp
45
- real(wp), parameter, public :: HALF = 0.5_wp
46
-
47
- ! Complex constants
48
- complex(cwp), parameter, public :: CZERO = (0.0_wp, 0.0_wp)
49
- complex(cwp), parameter, public :: CONE = (1.0_wp, 0.0_wp)
50
- complex(cwp), parameter, public :: CI = (0.0_wp, 1.0_wp) ! Imaginary unit
51
-
52
- ! Numerical tolerances
53
- real(wp), parameter, public :: TOL_NORM = 1.0e-10_wp ! Normalization tolerance
54
- real(wp), parameter, public :: TOL_HERMITIAN = 1.0e-12_wp ! Hermiticity tolerance
55
- real(wp), parameter, public :: TOL_UNITARY = 1.0e-10_wp ! Unitarity tolerance
56
-
57
- end module bob_kinds
58
-
59
- ! Made with Bob
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_kinds.f90-pp.f90.d DELETED
@@ -1,2 +0,0 @@
1
- CMakeFiles/bob_quantum.dir/src/bob_kinds.f90-pp.f90: \
2
- C:/Users/jessi/Desktop/bobs\ control\ repo/sov-kernel-monster/src/bob_kinds.f90
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_kinds.f90.obj.ddi DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "revision" : 0,
3
- "rules" :
4
- [
5
- {
6
- "outputs" : [],
7
- "primary-output" : "CMakeFiles\\\\bob_quantum.dir\\\\src\\\\bob_kinds.f90.obj",
8
- "provides" :
9
- [
10
- {
11
- "compiled-module-path" : "bob_kinds.mod",
12
- "is-interface" : true,
13
- "logical-name" : "bob_kinds.mod"
14
- }
15
- ],
16
- "requires" : []
17
- }
18
- ],
19
- "version" : 0
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_lattice.f90-pp.f90 DELETED
@@ -1,512 +0,0 @@
1
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_lattice.f90"
2
- # 1 "<built-in>"
3
- # 1 "<command-line>"
4
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_lattice.f90"
5
- ! BOB Quantum Civilization Engine - Quantum Vortex Lattice
6
- ! Module: bob_lattice
7
- ! Purpose: 3D lattice of quantum vortices with topological properties
8
- ! Standard: Fortran 2018
9
-
10
- module bob_lattice
11
- use bob_kinds
12
- use bob_errors
13
- use bob_state
14
- use bob_rng
15
- implicit none
16
- private
17
-
18
- !> Vortex in lattice
19
- type :: bob_vortex
20
- integer(i8) :: position(3) ! (x, y, z) position
21
- integer(i4) :: winding_number ! Topological charge
22
- complex(cwp) :: phase ! Quantum phase
23
- real(wp) :: energy ! Local energy
24
- integer(i8) :: entangled_neighbors(6) ! Indices of entangled neighbors
25
- integer(i4) :: num_entangled ! Number of entangled neighbors
26
- integer(i8) :: measurement_count ! Number of measurements
27
- real(wp) :: creation_time ! When vortex was created
28
- end type bob_vortex
29
-
30
- !> 3D quantum vortex lattice
31
- type, public :: bob_vortex_lattice
32
- integer(i8) :: size(3) ! Lattice dimensions (nx, ny, nz)
33
- integer(i8) :: num_vortices ! Total number of vortices
34
- type(bob_vortex), allocatable :: vortices(:,:,:) ! 3D array of vortices
35
- real(wp) :: coupling_strength ! Nearest-neighbor coupling
36
- real(wp) :: time ! Simulation time
37
- real(wp) :: dt ! Time step
38
- logical(lk) :: periodic_boundary ! Periodic boundary conditions
39
- logical(lk) :: is_initialized ! Initialization flag
40
- type(bob_rng_state) :: rng ! Random number generator
41
- contains
42
- procedure :: init => lattice_init
43
- procedure :: destroy => lattice_destroy
44
- procedure :: evolve => lattice_evolve
45
- procedure :: get_vortex => lattice_get_vortex
46
- procedure :: set_vortex => lattice_set_vortex
47
- procedure :: get_neighbors => lattice_get_neighbors
48
- procedure :: create_entanglement => lattice_create_entanglement
49
- procedure :: calculate_hamiltonian => lattice_calculate_hamiltonian
50
- procedure :: total_energy => lattice_total_energy
51
- procedure :: entanglement_entropy => lattice_entanglement_entropy
52
- procedure :: apply_error_correction => lattice_apply_error_correction
53
- end type bob_vortex_lattice
54
-
55
- public :: bob_lattice_create
56
- public :: bob_lattice_destroy
57
- public :: bob_lattice_evolve
58
- public :: bob_lattice_get_energy
59
-
60
- contains
61
-
62
- !> Initialize lattice
63
- subroutine lattice_init(this, nx, ny, nz, coupling, seed, periodic)
64
- class(bob_vortex_lattice), intent(inout) :: this
65
- integer(i8), intent(in) :: nx, ny, nz
66
- real(wp), intent(in) :: coupling
67
- integer(i8), intent(in) :: seed
68
- logical(lk), intent(in), optional :: periodic
69
-
70
- integer(i8) :: i, j, k
71
- integer :: stat
72
- real(wp) :: phase_real, phase_imag
73
-
74
- if (nx <= 0 .or. ny <= 0 .or. nz <= 0) then
75
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
76
- "Lattice dimensions must be positive", "lattice_init")
77
- return
78
- end if
79
-
80
- this%size = [nx, ny, nz]
81
- this%num_vortices = nx * ny * nz
82
- this%coupling_strength = coupling
83
- this%time = ZERO
84
- this%dt = 0.01_wp
85
- this%periodic_boundary = .true.
86
- if (present(periodic)) this%periodic_boundary = periodic
87
-
88
- ! Initialize RNG
89
- call this%rng%init(seed)
90
-
91
- ! Allocate vortex array
92
- if (allocated(this%vortices)) deallocate(this%vortices)
93
- allocate(this%vortices(nx, ny, nz), stat=stat)
94
- if (stat /= 0) then
95
- call bob_set_error(BOB_ERROR_ALLOCATION, &
96
- "Failed to allocate vortex lattice", "lattice_init")
97
- return
98
- end if
99
-
100
- ! Initialize each vortex
101
- do k = 1, nz
102
- do j = 1, ny
103
- do i = 1, nx
104
- this%vortices(i,j,k)%position = [i, j, k]
105
-
106
- ! Random winding number: -1, 0, or 1
107
- this%vortices(i,j,k)%winding_number = &
108
- int(this%rng%integer_range(-1_i8, 1_i8), i4)
109
-
110
- ! Random initial phase
111
- phase_real = this%rng%normal(ZERO, ONE)
112
- phase_imag = this%rng%normal(ZERO, ONE)
113
- this%vortices(i,j,k)%phase = cmplx(phase_real, phase_imag, cwp)
114
-
115
- ! Normalize phase
116
- this%vortices(i,j,k)%phase = this%vortices(i,j,k)%phase / &
117
- abs(this%vortices(i,j,k)%phase)
118
-
119
- ! Initial energy
120
- this%vortices(i,j,k)%energy = this%rng%uniform() * TWO - ONE
121
-
122
- ! No entanglement yet
123
- this%vortices(i,j,k)%entangled_neighbors = 0
124
- this%vortices(i,j,k)%num_entangled = 0
125
- this%vortices(i,j,k)%measurement_count = 0
126
- this%vortices(i,j,k)%creation_time = ZERO
127
- end do
128
- end do
129
- end do
130
-
131
- ! Create nearest-neighbor entanglement
132
- call this%create_entanglement()
133
-
134
- this%is_initialized = .true.
135
- call bob_clear_error()
136
- end subroutine lattice_init
137
-
138
- !> Destroy lattice
139
- subroutine lattice_destroy(this)
140
- class(bob_vortex_lattice), intent(inout) :: this
141
-
142
- if (allocated(this%vortices)) deallocate(this%vortices)
143
- this%num_vortices = 0
144
- this%is_initialized = .false.
145
- end subroutine lattice_destroy
146
-
147
- !> Evolve lattice in time
148
- subroutine lattice_evolve(this, dt)
149
- class(bob_vortex_lattice), intent(inout) :: this
150
- real(wp), intent(in), optional :: dt
151
-
152
- integer(i8) :: i, j, k
153
- real(wp) :: timestep, hamiltonian
154
- complex(cwp) :: evolution_factor
155
-
156
- if (.not. this%is_initialized) then
157
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
158
- "Lattice not initialized", "lattice_evolve")
159
- return
160
- end if
161
-
162
- timestep = this%dt
163
- if (present(dt)) timestep = dt
164
-
165
- ! Evolve each vortex under local Hamiltonian
166
- do k = 1, this%size(3)
167
- do j = 1, this%size(2)
168
- do i = 1, this%size(1)
169
- ! Calculate local Hamiltonian
170
- hamiltonian = this%calculate_hamiltonian(i, j, k)
171
-
172
- ! Time evolution: |ψ(t+dt)⟩ = exp(-iHdt/ℏ)|ψ(t)⟩
173
- ! Using ℏ = 1 for simplicity
174
- evolution_factor = exp(-CI * hamiltonian * timestep)
175
-
176
- ! Apply evolution
177
- this%vortices(i,j,k)%phase = this%vortices(i,j,k)%phase * evolution_factor
178
- this%vortices(i,j,k)%energy = hamiltonian
179
- end do
180
- end do
181
- end do
182
-
183
- this%time = this%time + timestep
184
- call bob_clear_error()
185
- end subroutine lattice_evolve
186
-
187
- !> Get vortex at position
188
- function lattice_get_vortex(this, i, j, k) result(vortex)
189
- class(bob_vortex_lattice), intent(in) :: this
190
- integer(i8), intent(in) :: i, j, k
191
- type(bob_vortex) :: vortex
192
-
193
- if (i < 1 .or. i > this%size(1) .or. &
194
- j < 1 .or. j > this%size(2) .or. &
195
- k < 1 .or. k > this%size(3)) then
196
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
197
- "Vortex position out of bounds", "lattice_get_vortex")
198
- return
199
- end if
200
-
201
- vortex = this%vortices(i, j, k)
202
- call bob_clear_error()
203
- end function lattice_get_vortex
204
-
205
- !> Set vortex at position
206
- subroutine lattice_set_vortex(this, i, j, k, vortex)
207
- class(bob_vortex_lattice), intent(inout) :: this
208
- integer(i8), intent(in) :: i, j, k
209
- type(bob_vortex), intent(in) :: vortex
210
-
211
- if (i < 1 .or. i > this%size(1) .or. &
212
- j < 1 .or. j > this%size(2) .or. &
213
- k < 1 .or. k > this%size(3)) then
214
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
215
- "Vortex position out of bounds", "lattice_set_vortex")
216
- return
217
- end if
218
-
219
- this%vortices(i, j, k) = vortex
220
- call bob_clear_error()
221
- end subroutine lattice_set_vortex
222
-
223
- !> Get neighbor positions
224
- subroutine lattice_get_neighbors(this, i, j, k, neighbors, num_neighbors)
225
- class(bob_vortex_lattice), intent(in) :: this
226
- integer(i8), intent(in) :: i, j, k
227
- integer(i8), intent(out) :: neighbors(6, 3)
228
- integer(i4), intent(out) :: num_neighbors
229
-
230
- integer(i8) :: ni, nj, nk
231
- integer(i4) :: count
232
-
233
- count = 0
234
- neighbors = 0
235
-
236
- ! Six nearest neighbors: ±x, ±y, ±z
237
- ! +x neighbor
238
- ni = i + 1
239
- if (this%periodic_boundary) ni = mod(ni - 1, this%size(1)) + 1
240
- if (ni >= 1 .and. ni <= this%size(1)) then
241
- count = count + 1
242
- neighbors(count, :) = [ni, j, k]
243
- end if
244
-
245
- ! -x neighbor
246
- ni = i - 1
247
- if (this%periodic_boundary .and. ni < 1) ni = this%size(1)
248
- if (ni >= 1 .and. ni <= this%size(1)) then
249
- count = count + 1
250
- neighbors(count, :) = [ni, j, k]
251
- end if
252
-
253
- ! +y neighbor
254
- nj = j + 1
255
- if (this%periodic_boundary) nj = mod(nj - 1, this%size(2)) + 1
256
- if (nj >= 1 .and. nj <= this%size(2)) then
257
- count = count + 1
258
- neighbors(count, :) = [i, nj, k]
259
- end if
260
-
261
- ! -y neighbor
262
- nj = j - 1
263
- if (this%periodic_boundary .and. nj < 1) nj = this%size(2)
264
- if (nj >= 1 .and. nj <= this%size(2)) then
265
- count = count + 1
266
- neighbors(count, :) = [i, nj, k]
267
- end if
268
-
269
- ! +z neighbor
270
- nk = k + 1
271
- if (this%periodic_boundary) nk = mod(nk - 1, this%size(3)) + 1
272
- if (nk >= 1 .and. nk <= this%size(3)) then
273
- count = count + 1
274
- neighbors(count, :) = [i, j, nk]
275
- end if
276
-
277
- ! -z neighbor
278
- nk = k - 1
279
- if (this%periodic_boundary .and. nk < 1) nk = this%size(3)
280
- if (nk >= 1 .and. nk <= this%size(3)) then
281
- count = count + 1
282
- neighbors(count, :) = [i, j, nk]
283
- end if
284
-
285
- num_neighbors = count
286
- end subroutine lattice_get_neighbors
287
-
288
- !> Create entanglement network
289
- subroutine lattice_create_entanglement(this)
290
- class(bob_vortex_lattice), intent(inout) :: this
291
-
292
- integer(i8) :: i, j, k, n
293
- integer(i8) :: neighbors(6, 3)
294
- integer(i4) :: num_neighbors
295
- complex(cwp) :: entangled_phase
296
-
297
- do k = 1, this%size(3)
298
- do j = 1, this%size(2)
299
- do i = 1, this%size(1)
300
- call this%get_neighbors(i, j, k, neighbors, num_neighbors)
301
-
302
- this%vortices(i,j,k)%num_entangled = num_neighbors
303
-
304
- ! Entangle with neighbors
305
- do n = 1, num_neighbors
306
- ! Store neighbor index (flattened)
307
- this%vortices(i,j,k)%entangled_neighbors(n) = &
308
- (neighbors(n,1) - 1) * this%size(2) * this%size(3) + &
309
- (neighbors(n,2) - 1) * this%size(3) + &
310
- neighbors(n,3)
311
-
312
- ! Create entangled state: (|ψ₁⟩ + |ψ₂⟩)/√2
313
- entangled_phase = (this%vortices(i,j,k)%phase + &
314
- this%vortices(neighbors(n,1), neighbors(n,2), neighbors(n,3))%phase) / &
315
- sqrt(TWO)
316
-
317
- this%vortices(i,j,k)%phase = entangled_phase
318
- this%vortices(neighbors(n,1), neighbors(n,2), neighbors(n,3))%phase = &
319
- entangled_phase
320
- end do
321
- end do
322
- end do
323
- end do
324
- end subroutine lattice_create_entanglement
325
-
326
- !> Calculate local Hamiltonian for vortex
327
- function lattice_calculate_hamiltonian(this, i, j, k) result(hamiltonian)
328
- class(bob_vortex_lattice), intent(in) :: this
329
- integer(i8), intent(in) :: i, j, k
330
- real(wp) :: hamiltonian
331
-
332
- integer(i8) :: neighbors(6, 3)
333
- integer(i4) :: num_neighbors, n
334
- real(wp) :: kinetic, interaction
335
- complex(cwp) :: neighbor_phase
336
-
337
- ! Kinetic energy: proportional to winding number squared
338
- kinetic = real(this%vortices(i,j,k)%winding_number ** 2, wp)
339
-
340
- ! Interaction energy with neighbors
341
- interaction = ZERO
342
- call this%get_neighbors(i, j, k, neighbors, num_neighbors)
343
-
344
- do n = 1, num_neighbors
345
- neighbor_phase = this%vortices(neighbors(n,1), neighbors(n,2), neighbors(n,3))%phase
346
-
347
- ! Quantum coupling: ⟨ψᵢ|ψⱼ⟩
348
- interaction = interaction + real(this%vortices(i,j,k)%phase * conjg(neighbor_phase))
349
- end do
350
-
351
- interaction = -this%coupling_strength * interaction
352
-
353
- hamiltonian = kinetic + interaction
354
- end function lattice_calculate_hamiltonian
355
-
356
- !> Calculate total lattice energy
357
- function lattice_total_energy(this) result(energy)
358
- class(bob_vortex_lattice), intent(in) :: this
359
- real(wp) :: energy
360
-
361
- integer(i8) :: i, j, k
362
-
363
- energy = ZERO
364
-
365
- if (.not. this%is_initialized) return
366
-
367
- do k = 1, this%size(3)
368
- do j = 1, this%size(2)
369
- do i = 1, this%size(1)
370
- energy = energy + this%vortices(i,j,k)%energy
371
- end do
372
- end do
373
- end do
374
- end function lattice_total_energy
375
-
376
- !> Calculate entanglement entropy
377
- function lattice_entanglement_entropy(this) result(entropy)
378
- class(bob_vortex_lattice), intent(in) :: this
379
- real(wp) :: entropy
380
-
381
- integer(i8) :: i, j, k
382
- integer(i8) :: total_entanglement, max_entanglement
383
-
384
- if (.not. this%is_initialized) then
385
- entropy = ZERO
386
- return
387
- end if
388
-
389
- total_entanglement = 0
390
-
391
- do k = 1, this%size(3)
392
- do j = 1, this%size(2)
393
- do i = 1, this%size(1)
394
- total_entanglement = total_entanglement + &
395
- int(this%vortices(i,j,k)%num_entangled, i8)
396
- end do
397
- end do
398
- end do
399
-
400
- ! Maximum possible entanglement (6 neighbors per vortex)
401
- max_entanglement = this%num_vortices * 6
402
-
403
- if (max_entanglement > 0) then
404
- entropy = real(total_entanglement, wp) / real(max_entanglement, wp)
405
- else
406
- entropy = ZERO
407
- end if
408
- end function lattice_entanglement_entropy
409
-
410
- !> Apply topological error correction
411
- function lattice_apply_error_correction(this) result(errors_corrected)
412
- class(bob_vortex_lattice), intent(inout) :: this
413
- integer(i8) :: errors_corrected
414
-
415
- integer(i8) :: i, j, k
416
- real(wp) :: phase_magnitude
417
-
418
- errors_corrected = 0
419
-
420
- if (.not. this%is_initialized) return
421
-
422
- ! Check for phase errors (magnitude too small)
423
- do k = 1, this%size(3)
424
- do j = 1, this%size(2)
425
- do i = 1, this%size(1)
426
- phase_magnitude = abs(this%vortices(i,j,k)%phase)
427
-
428
- if (phase_magnitude < 0.1_wp) then
429
- ! Apply X gate (phase flip)
430
- this%vortices(i,j,k)%phase = -this%vortices(i,j,k)%phase
431
- errors_corrected = errors_corrected + 1
432
- end if
433
-
434
- ! Renormalize phase
435
- if (phase_magnitude > TOL_NORM) then
436
- this%vortices(i,j,k)%phase = this%vortices(i,j,k)%phase / phase_magnitude
437
- end if
438
- end do
439
- end do
440
- end do
441
- end function lattice_apply_error_correction
442
-
443
- !> C ABI: Create lattice
444
- function bob_lattice_create(nx, ny, nz, coupling, seed) result(lattice_ptr) &
445
- bind(C, name="bob_lattice_create")
446
- use, intrinsic :: iso_c_binding
447
- integer(c_int64_t), value :: nx, ny, nz
448
- real(c_double), value :: coupling
449
- integer(c_int64_t), value :: seed
450
- type(c_ptr) :: lattice_ptr
451
-
452
- type(bob_vortex_lattice), pointer :: lattice
453
-
454
- allocate(lattice)
455
- call lattice%init(nx, ny, nz, coupling, seed)
456
- lattice_ptr = c_loc(lattice)
457
- end function bob_lattice_create
458
-
459
- !> C ABI: Destroy lattice
460
- subroutine bob_lattice_destroy(lattice_ptr) bind(C, name="bob_lattice_destroy")
461
- use, intrinsic :: iso_c_binding
462
- type(c_ptr), value :: lattice_ptr
463
- type(bob_vortex_lattice), pointer :: lattice
464
-
465
- if (.not. c_associated(lattice_ptr)) return
466
-
467
- call c_f_pointer(lattice_ptr, lattice)
468
- call lattice%destroy()
469
- deallocate(lattice)
470
- end subroutine bob_lattice_destroy
471
-
472
- !> C ABI: Evolve lattice
473
- function bob_lattice_evolve(lattice_ptr, dt) result(status) &
474
- bind(C, name="bob_lattice_evolve")
475
- use, intrinsic :: iso_c_binding
476
- type(c_ptr), value :: lattice_ptr
477
- real(c_double), value :: dt
478
- integer(c_int) :: status
479
-
480
- type(bob_vortex_lattice), pointer :: lattice
481
-
482
- if (.not. c_associated(lattice_ptr)) then
483
- status = BOB_ERROR_INVALID_ARGUMENT
484
- return
485
- end if
486
-
487
- call c_f_pointer(lattice_ptr, lattice)
488
- call lattice%evolve(dt)
489
- status = bob_get_last_error()
490
- end function bob_lattice_evolve
491
-
492
- !> C ABI: Get total energy
493
- function bob_lattice_get_energy(lattice_ptr) result(energy) &
494
- bind(C, name="bob_lattice_get_energy")
495
- use, intrinsic :: iso_c_binding
496
- type(c_ptr), value :: lattice_ptr
497
- real(c_double) :: energy
498
-
499
- type(bob_vortex_lattice), pointer :: lattice
500
-
501
- if (.not. c_associated(lattice_ptr)) then
502
- energy = ZERO
503
- return
504
- end if
505
-
506
- call c_f_pointer(lattice_ptr, lattice)
507
- energy = lattice%total_energy()
508
- end function bob_lattice_get_energy
509
-
510
- end module bob_lattice
511
-
512
- ! Made with Bob
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_lattice.f90-pp.f90.d DELETED
@@ -1,2 +0,0 @@
1
- CMakeFiles/bob_quantum.dir/src/bob_lattice.f90-pp.f90: \
2
- C:/Users/jessi/Desktop/bobs\ control\ repo/sov-kernel-monster/src/bob_lattice.f90
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_lattice.f90.obj.ddi DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "revision" : 0,
3
- "rules" :
4
- [
5
- {
6
- "outputs" : [],
7
- "primary-output" : "CMakeFiles\\\\bob_quantum.dir\\\\src\\\\bob_lattice.f90.obj",
8
- "provides" :
9
- [
10
- {
11
- "compiled-module-path" : "bob_lattice.mod",
12
- "is-interface" : true,
13
- "logical-name" : "bob_lattice.mod"
14
- }
15
- ],
16
- "requires" :
17
- [
18
- {
19
- "logical-name" : "bob_errors.mod"
20
- },
21
- {
22
- "logical-name" : "bob_kinds.mod"
23
- },
24
- {
25
- "logical-name" : "bob_rng.mod"
26
- },
27
- {
28
- "logical-name" : "bob_state.mod"
29
- }
30
- ]
31
- }
32
- ],
33
- "version" : 0
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_measurement.f90-pp.f90 DELETED
@@ -1,535 +0,0 @@
1
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_measurement.f90"
2
- # 1 "<built-in>"
3
- # 1 "<command-line>"
4
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_measurement.f90"
5
- ! BOB Quantum Civilization Engine - Quantum Measurement
6
- ! Module: bob_measurement
7
- ! Purpose: Basis measurement, probability distributions, state collapse
8
- ! Standard: Fortran 2018
9
-
10
- module bob_measurement
11
- use bob_kinds
12
- use bob_errors
13
- use bob_state
14
- use bob_rng
15
- implicit none
16
- private
17
-
18
- !> Measurement result
19
- type, public :: bob_measurement_result
20
- integer(i8) :: num_qubits ! Number of qubits measured
21
- integer(i8), allocatable :: outcomes(:) ! Measurement outcomes (0 or 1)
22
- real(wp), allocatable :: probabilities(:) ! Probability of each outcome
23
- integer(i8) :: num_shots ! Number of measurement shots
24
- integer(i8), allocatable :: counts(:) ! Count of each outcome
25
- real(wp) :: measurement_time ! When measurement occurred
26
- logical(lk) :: collapsed ! Whether state collapsed
27
- contains
28
- procedure :: init => measurement_result_init
29
- procedure :: destroy => measurement_result_destroy
30
- procedure :: get_outcome => measurement_result_get_outcome
31
- procedure :: get_probability => measurement_result_get_probability
32
- procedure :: get_count => measurement_result_get_count
33
- end type bob_measurement_result
34
-
35
- public :: measure_state
36
- public :: measure_qubit
37
- public :: measure_basis
38
- public :: measure_shots
39
- public :: calculate_probabilities
40
- public :: collapse_state
41
-
42
- contains
43
-
44
- !> Initialize measurement result
45
- subroutine measurement_result_init(this, num_qubits, num_shots)
46
- class(bob_measurement_result), intent(inout) :: this
47
- integer(i8), intent(in) :: num_qubits, num_shots
48
- integer :: stat
49
- integer(i8) :: num_outcomes
50
-
51
- this%num_qubits = num_qubits
52
- this%num_shots = num_shots
53
- this%collapsed = .false.
54
- this%measurement_time = ZERO
55
-
56
- ! Number of possible outcomes: 2^num_qubits
57
- num_outcomes = ishft(1_i8, int(num_qubits))
58
-
59
- ! Allocate arrays
60
- if (allocated(this%outcomes)) deallocate(this%outcomes)
61
- if (allocated(this%probabilities)) deallocate(this%probabilities)
62
- if (allocated(this%counts)) deallocate(this%counts)
63
-
64
- allocate(this%outcomes(num_outcomes), stat=stat)
65
- if (stat /= 0) then
66
- call bob_set_error(BOB_ERROR_ALLOCATION, &
67
- "Failed to allocate outcomes", "measurement_result_init")
68
- return
69
- end if
70
-
71
- allocate(this%probabilities(num_outcomes), stat=stat)
72
- if (stat /= 0) then
73
- call bob_set_error(BOB_ERROR_ALLOCATION, &
74
- "Failed to allocate probabilities", "measurement_result_init")
75
- return
76
- end if
77
-
78
- allocate(this%counts(num_outcomes), stat=stat)
79
- if (stat /= 0) then
80
- call bob_set_error(BOB_ERROR_ALLOCATION, &
81
- "Failed to allocate counts", "measurement_result_init")
82
- return
83
- end if
84
-
85
- ! Initialize to zero
86
- this%outcomes = 0
87
- this%probabilities = ZERO
88
- this%counts = 0
89
-
90
- call bob_clear_error()
91
- end subroutine measurement_result_init
92
-
93
- !> Destroy measurement result
94
- subroutine measurement_result_destroy(this)
95
- class(bob_measurement_result), intent(inout) :: this
96
-
97
- if (allocated(this%outcomes)) deallocate(this%outcomes)
98
- if (allocated(this%probabilities)) deallocate(this%probabilities)
99
- if (allocated(this%counts)) deallocate(this%counts)
100
-
101
- this%num_qubits = 0
102
- this%num_shots = 0
103
- end subroutine measurement_result_destroy
104
-
105
- !> Get measurement outcome
106
- function measurement_result_get_outcome(this, index) result(outcome)
107
- class(bob_measurement_result), intent(in) :: this
108
- integer(i8), intent(in) :: index
109
- integer(i8) :: outcome
110
-
111
- if (index < 1 .or. index > size(this%outcomes, kind=i8)) then
112
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
113
- "Outcome index out of range", "measurement_result_get_outcome")
114
- outcome = 0
115
- return
116
- end if
117
-
118
- outcome = this%outcomes(index)
119
- call bob_clear_error()
120
- end function measurement_result_get_outcome
121
-
122
- !> Get outcome probability
123
- function measurement_result_get_probability(this, index) result(prob)
124
- class(bob_measurement_result), intent(in) :: this
125
- integer(i8), intent(in) :: index
126
- real(wp) :: prob
127
-
128
- if (index < 1 .or. index > size(this%probabilities, kind=i8)) then
129
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
130
- "Probability index out of range", "measurement_result_get_probability")
131
- prob = ZERO
132
- return
133
- end if
134
-
135
- prob = this%probabilities(index)
136
- call bob_clear_error()
137
- end function measurement_result_get_probability
138
-
139
- !> Get outcome count
140
- function measurement_result_get_count(this, index) result(count)
141
- class(bob_measurement_result), intent(in) :: this
142
- integer(i8), intent(in) :: index
143
- integer(i8) :: count
144
-
145
- if (index < 1 .or. index > size(this%counts, kind=i8)) then
146
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
147
- "Count index out of range", "measurement_result_get_count")
148
- count = 0
149
- return
150
- end if
151
-
152
- count = this%counts(index)
153
- call bob_clear_error()
154
- end function measurement_result_get_count
155
-
156
- !> Measure entire quantum state
157
- subroutine measure_state(state, rng, result, collapse)
158
- type(bob_quantum_state), intent(inout) :: state
159
- type(bob_rng_state), intent(inout) :: rng
160
- type(bob_measurement_result), intent(out) :: result
161
- logical(lk), intent(in), optional :: collapse
162
-
163
- integer(i8) :: num_qubits, i
164
- real(wp) :: cumulative_prob, random_val
165
- integer(i8) :: measured_outcome
166
- logical(lk) :: do_collapse
167
-
168
- if (.not. state%is_valid) then
169
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
170
- "Cannot measure invalid state", "measure_state")
171
- return
172
- end if
173
-
174
- do_collapse = .true.
175
- if (present(collapse)) do_collapse = collapse
176
-
177
- ! Calculate number of qubits
178
- num_qubits = int(log(real(state%dim, wp)) / log(TWO), i8)
179
-
180
- ! Initialize result
181
- call result%init(num_qubits, 1_i8)
182
-
183
- ! Calculate probabilities
184
- call calculate_probabilities(state, result)
185
-
186
- ! Sample from probability distribution
187
- random_val = rng%uniform()
188
- cumulative_prob = ZERO
189
- measured_outcome = 0
190
-
191
- do i = 1, state%dim
192
- cumulative_prob = cumulative_prob + result%probabilities(i)
193
- if (random_val <= cumulative_prob) then
194
- measured_outcome = i - 1
195
- exit
196
- end if
197
- end do
198
-
199
- ! Store outcome
200
- result%outcomes(measured_outcome + 1) = measured_outcome
201
- result%counts(measured_outcome + 1) = 1
202
- result%collapsed = do_collapse
203
-
204
- ! Collapse state if requested
205
- if (do_collapse) then
206
- call collapse_state(state, measured_outcome)
207
- end if
208
-
209
- call bob_clear_error()
210
- end subroutine measure_state
211
-
212
- !> Measure single qubit
213
- subroutine measure_qubit(state, qubit_index, rng, result, collapse)
214
- type(bob_quantum_state), intent(inout) :: state
215
- integer(i8), intent(in) :: qubit_index
216
- type(bob_rng_state), intent(inout) :: rng
217
- integer(i8), intent(out) :: result
218
- logical(lk), intent(in), optional :: collapse
219
-
220
- integer(i8) :: num_qubits, i, bit_mask, qubit_bit
221
- real(wp) :: prob_0, prob_1, random_val
222
- logical(lk) :: do_collapse
223
-
224
- if (.not. state%is_valid) then
225
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
226
- "Cannot measure invalid state", "measure_qubit")
227
- result = 0
228
- return
229
- end if
230
-
231
- num_qubits = int(log(real(state%dim, wp)) / log(TWO), i8)
232
-
233
- if (qubit_index < 0 .or. qubit_index >= num_qubits) then
234
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
235
- "Qubit index out of range", "measure_qubit")
236
- result = 0
237
- return
238
- end if
239
-
240
- do_collapse = .true.
241
- if (present(collapse)) do_collapse = collapse
242
-
243
- ! Calculate probabilities for |0⟩ and |1⟩
244
- bit_mask = ishft(1_i8, int(qubit_index))
245
- prob_0 = ZERO
246
- prob_1 = ZERO
247
-
248
- do i = 0, state%dim - 1
249
- qubit_bit = iand(i, bit_mask)
250
-
251
- if (qubit_bit == 0) then
252
- prob_0 = prob_0 + real(state%amplitudes(i + 1) * conjg(state%amplitudes(i + 1)))
253
- else
254
- prob_1 = prob_1 + real(state%amplitudes(i + 1) * conjg(state%amplitudes(i + 1)))
255
- end if
256
- end do
257
-
258
- ! Sample measurement outcome
259
- random_val = rng%uniform()
260
-
261
- if (random_val < prob_0) then
262
- result = 0
263
- else
264
- result = 1
265
- end if
266
-
267
- ! Collapse state if requested
268
- if (do_collapse) then
269
- call collapse_qubit(state, qubit_index, result)
270
- end if
271
-
272
- call bob_clear_error()
273
- end subroutine measure_qubit
274
-
275
- !> Measure in arbitrary basis
276
- subroutine measure_basis(state, basis_vectors, rng, result, collapse)
277
- type(bob_quantum_state), intent(inout) :: state
278
- complex(cwp), intent(in) :: basis_vectors(:,:)
279
- type(bob_rng_state), intent(inout) :: rng
280
- integer(i8), intent(out) :: result
281
- logical(lk), intent(in), optional :: collapse
282
-
283
- integer(i8) :: num_basis, i, j
284
- real(wp), allocatable :: probabilities(:)
285
- real(wp) :: cumulative_prob, random_val
286
- complex(cwp) :: inner_prod
287
- logical(lk) :: do_collapse
288
- integer :: stat
289
-
290
- if (.not. state%is_valid) then
291
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
292
- "Cannot measure invalid state", "measure_basis")
293
- result = 0
294
- return
295
- end if
296
-
297
- num_basis = size(basis_vectors, 2, kind=i8)
298
-
299
- if (size(basis_vectors, 1, kind=i8) /= state%dim) then
300
- call bob_set_error(BOB_ERROR_DIMENSION_MISMATCH, &
301
- "Basis vectors dimension mismatch", "measure_basis")
302
- result = 0
303
- return
304
- end if
305
-
306
- do_collapse = .true.
307
- if (present(collapse)) do_collapse = collapse
308
-
309
- ! Allocate probabilities
310
- allocate(probabilities(num_basis), stat=stat)
311
- if (stat /= 0) then
312
- call bob_set_error(BOB_ERROR_ALLOCATION, &
313
- "Failed to allocate probabilities", "measure_basis")
314
- result = 0
315
- return
316
- end if
317
-
318
- ! Calculate probabilities: P(i) = |⟨basis_i|ψ⟩|²
319
- do i = 1, num_basis
320
- inner_prod = CZERO
321
-
322
- do j = 1, state%dim
323
- inner_prod = inner_prod + conjg(basis_vectors(j, i)) * state%amplitudes(j)
324
- end do
325
-
326
- probabilities(i) = real(inner_prod * conjg(inner_prod))
327
- end do
328
-
329
- ! Sample from probability distribution
330
- random_val = rng%uniform()
331
- cumulative_prob = ZERO
332
- result = 0
333
-
334
- do i = 1, num_basis
335
- cumulative_prob = cumulative_prob + probabilities(i)
336
- if (random_val <= cumulative_prob) then
337
- result = i - 1
338
- exit
339
- end if
340
- end do
341
-
342
- ! Collapse to measured basis state if requested
343
- if (do_collapse) then
344
- state%amplitudes = basis_vectors(:, result + 1)
345
- call state%normalize()
346
- end if
347
-
348
- deallocate(probabilities)
349
- call bob_clear_error()
350
- end subroutine measure_basis
351
-
352
- !> Perform multiple measurement shots
353
- subroutine measure_shots(state, num_shots, rng, result)
354
- type(bob_quantum_state), intent(in) :: state
355
- integer(i8), intent(in) :: num_shots
356
- type(bob_rng_state), intent(inout) :: rng
357
- type(bob_measurement_result), intent(out) :: result
358
-
359
- integer(i8) :: num_qubits, shot, i
360
- real(wp) :: cumulative_prob, random_val
361
- integer(i8) :: measured_outcome
362
- type(bob_quantum_state) :: temp_state
363
-
364
- if (.not. state%is_valid) then
365
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
366
- "Cannot measure invalid state", "measure_shots")
367
- return
368
- end if
369
-
370
- if (num_shots <= 0) then
371
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
372
- "Number of shots must be positive", "measure_shots")
373
- return
374
- end if
375
-
376
- num_qubits = int(log(real(state%dim, wp)) / log(TWO), i8)
377
-
378
- ! Initialize result
379
- call result%init(num_qubits, num_shots)
380
-
381
- ! Calculate probabilities (once)
382
- call calculate_probabilities(state, result)
383
-
384
- ! Perform shots
385
- do shot = 1, num_shots
386
- random_val = rng%uniform()
387
- cumulative_prob = ZERO
388
- measured_outcome = 0
389
-
390
- do i = 1, state%dim
391
- cumulative_prob = cumulative_prob + result%probabilities(i)
392
- if (random_val <= cumulative_prob) then
393
- measured_outcome = i - 1
394
- exit
395
- end if
396
- end do
397
-
398
- ! Increment count for this outcome
399
- result%counts(measured_outcome + 1) = result%counts(measured_outcome + 1) + 1
400
- end do
401
-
402
- result%collapsed = .false.
403
- call bob_clear_error()
404
- end subroutine measure_shots
405
-
406
- !> Calculate measurement probabilities
407
- subroutine calculate_probabilities(state, result)
408
- type(bob_quantum_state), intent(in) :: state
409
- type(bob_measurement_result), intent(inout) :: result
410
-
411
- integer(i8) :: i
412
- real(wp) :: total_prob
413
-
414
- if (.not. state%is_valid) then
415
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
416
- "Cannot calculate probabilities for invalid state", &
417
- "calculate_probabilities")
418
- return
419
- end if
420
-
421
- ! Calculate P(i) = |ψᵢ|²
422
- total_prob = ZERO
423
- do i = 1, state%dim
424
- result%probabilities(i) = real(state%amplitudes(i) * conjg(state%amplitudes(i)))
425
- total_prob = total_prob + result%probabilities(i)
426
- end do
427
-
428
- ! Verify normalization
429
- if (abs(total_prob - ONE) > TOL_NORM) then
430
- call bob_set_error(BOB_ERROR_NOT_NORMALIZED, &
431
- "State probabilities do not sum to 1", "calculate_probabilities")
432
- return
433
- end if
434
-
435
- call bob_clear_error()
436
- end subroutine calculate_probabilities
437
-
438
- !> Collapse state to measured outcome
439
- subroutine collapse_state(state, outcome)
440
- type(bob_quantum_state), intent(inout) :: state
441
- integer(i8), intent(in) :: outcome
442
-
443
- if (.not. state%is_valid) then
444
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
445
- "Cannot collapse invalid state", "collapse_state")
446
- return
447
- end if
448
-
449
- if (outcome < 0 .or. outcome >= state%dim) then
450
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
451
- "Outcome out of range", "collapse_state")
452
- return
453
- end if
454
-
455
- ! Set all amplitudes to zero except measured outcome
456
- state%amplitudes = CZERO
457
- state%amplitudes(outcome + 1) = CONE
458
- state%is_normalized = .true.
459
-
460
- call bob_clear_error()
461
- end subroutine collapse_state
462
-
463
- !> Collapse single qubit
464
- subroutine collapse_qubit(state, qubit_index, outcome)
465
- type(bob_quantum_state), intent(inout) :: state
466
- integer(i8), intent(in) :: qubit_index, outcome
467
-
468
- integer(i8) :: i, bit_mask, qubit_bit
469
- real(wp) :: norm_factor
470
-
471
- if (.not. state%is_valid) then
472
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
473
- "Cannot collapse invalid state", "collapse_qubit")
474
- return
475
- end if
476
-
477
- if (outcome /= 0 .and. outcome /= 1) then
478
- call bob_set_error(BOB_ERROR_INVALID_ARGUMENT, &
479
- "Qubit outcome must be 0 or 1", "collapse_qubit")
480
- return
481
- end if
482
-
483
- bit_mask = ishft(1_i8, int(qubit_index))
484
-
485
- ! Zero out amplitudes inconsistent with measurement
486
- do i = 0, state%dim - 1
487
- qubit_bit = iand(i, bit_mask)
488
-
489
- if ((outcome == 0 .and. qubit_bit /= 0) .or. &
490
- (outcome == 1 .and. qubit_bit == 0)) then
491
- state%amplitudes(i + 1) = CZERO
492
- end if
493
- end do
494
-
495
- ! Renormalize
496
- call state%normalize()
497
-
498
- call bob_clear_error()
499
- end subroutine collapse_qubit
500
-
501
- !> C ABI: Measure state
502
- function bob_state_measure(state_ptr, rng_ptr, outcome) result(status) &
503
- bind(C, name="bob_state_measure")
504
- use, intrinsic :: iso_c_binding
505
- type(c_ptr), value :: state_ptr, rng_ptr
506
- integer(c_int64_t), intent(out) :: outcome
507
- integer(c_int) :: status
508
-
509
- type(bob_quantum_state), pointer :: state
510
- type(bob_rng_state), pointer :: rng
511
- type(bob_measurement_result) :: result
512
-
513
- if (.not. c_associated(state_ptr) .or. .not. c_associated(rng_ptr)) then
514
- status = BOB_ERROR_INVALID_ARGUMENT
515
- return
516
- end if
517
-
518
- call c_f_pointer(state_ptr, state)
519
- call c_f_pointer(rng_ptr, rng)
520
-
521
- call measure_state(state, rng, result, collapse=.true.)
522
-
523
- if (bob_get_last_error() == BOB_SUCCESS) then
524
- outcome = result%outcomes(1)
525
- else
526
- outcome = 0
527
- end if
528
-
529
- call result%destroy()
530
- status = bob_get_last_error()
531
- end function bob_state_measure
532
-
533
- end module bob_measurement
534
-
535
- ! Made with Bob
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_measurement.f90-pp.f90.d DELETED
@@ -1,2 +0,0 @@
1
- CMakeFiles/bob_quantum.dir/src/bob_measurement.f90-pp.f90: \
2
- C:/Users/jessi/Desktop/bobs\ control\ repo/sov-kernel-monster/src/bob_measurement.f90
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_measurement.f90.obj.ddi DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "revision" : 0,
3
- "rules" :
4
- [
5
- {
6
- "outputs" : [],
7
- "primary-output" : "CMakeFiles\\\\bob_quantum.dir\\\\src\\\\bob_measurement.f90.obj",
8
- "provides" :
9
- [
10
- {
11
- "compiled-module-path" : "bob_measurement.mod",
12
- "is-interface" : true,
13
- "logical-name" : "bob_measurement.mod"
14
- }
15
- ],
16
- "requires" :
17
- [
18
- {
19
- "logical-name" : "bob_errors.mod"
20
- },
21
- {
22
- "logical-name" : "bob_kinds.mod"
23
- },
24
- {
25
- "logical-name" : "bob_rng.mod"
26
- },
27
- {
28
- "logical-name" : "bob_state.mod"
29
- }
30
- ]
31
- }
32
- ],
33
- "version" : 0
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_metrics.f90-pp.f90 DELETED
@@ -1,499 +0,0 @@
1
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_metrics.f90"
2
- # 1 "<built-in>"
3
- # 1 "<command-line>"
4
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_metrics.f90"
5
- ! BOB Quantum Civilization Engine - Quantum Metrics
6
- ! Module: bob_metrics
7
- ! Purpose: Energy, entropy, purity, fidelity, coherence calculations
8
- ! Standard: Fortran 2018
9
-
10
- module bob_metrics
11
- use bob_kinds
12
- use bob_errors
13
- use bob_state
14
- use bob_lattice
15
- implicit none
16
- private
17
-
18
- !> Quantum metrics container
19
- type, public :: bob_quantum_metrics
20
- real(wp) :: norm ! State norm
21
- real(wp) :: energy ! Energy expectation value
22
- real(wp) :: purity ! State purity Tr(ρ²)
23
- real(wp) :: von_neumann_entropy ! Von Neumann entropy -Tr(ρ log ρ)
24
- real(wp) :: linear_entropy ! Linear entropy 1 - Tr(ρ²)
25
- real(wp) :: fidelity ! Fidelity with reference state
26
- real(wp) :: coherence ! Coherence measure
27
- real(wp) :: entanglement_measure ! Entanglement measure
28
- real(wp) :: participation_ratio ! Inverse participation ratio
29
- real(wp) :: computation_time ! Time to compute metrics
30
- contains
31
- procedure :: init => metrics_init
32
- procedure :: compute_all => metrics_compute_all
33
- procedure :: print => metrics_print
34
- end type bob_quantum_metrics
35
-
36
- public :: compute_norm
37
- public :: compute_energy
38
- public :: compute_purity
39
- public :: compute_von_neumann_entropy
40
- public :: compute_linear_entropy
41
- public :: compute_fidelity
42
- public :: compute_coherence
43
- public :: compute_entanglement
44
- public :: compute_participation_ratio
45
-
46
- contains
47
-
48
- !> Initialize metrics
49
- subroutine metrics_init(this)
50
- class(bob_quantum_metrics), intent(inout) :: this
51
-
52
- this%norm = ZERO
53
- this%energy = ZERO
54
- this%purity = ZERO
55
- this%von_neumann_entropy = ZERO
56
- this%linear_entropy = ZERO
57
- this%fidelity = ZERO
58
- this%coherence = ZERO
59
- this%entanglement_measure = ZERO
60
- this%participation_ratio = ZERO
61
- this%computation_time = ZERO
62
- end subroutine metrics_init
63
-
64
- !> Compute all metrics
65
- subroutine metrics_compute_all(this, state, hamiltonian, reference_state)
66
- class(bob_quantum_metrics), intent(inout) :: this
67
- type(bob_quantum_state), intent(in) :: state
68
- complex(cwp), intent(in), optional :: hamiltonian(:,:)
69
- type(bob_quantum_state), intent(in), optional :: reference_state
70
-
71
- real(wp) :: start_time, end_time
72
-
73
- call cpu_time(start_time)
74
-
75
- ! Compute basic metrics
76
- this%norm = compute_norm(state)
77
- this%purity = compute_purity(state)
78
- this%linear_entropy = compute_linear_entropy(state)
79
- this%von_neumann_entropy = compute_von_neumann_entropy(state)
80
- this%coherence = compute_coherence(state)
81
- this%participation_ratio = compute_participation_ratio(state)
82
-
83
- ! Compute energy if Hamiltonian provided
84
- if (present(hamiltonian)) then
85
- this%energy = compute_energy(state, hamiltonian)
86
- end if
87
-
88
- ! Compute fidelity if reference state provided
89
- if (present(reference_state)) then
90
- this%fidelity = compute_fidelity(state, reference_state)
91
- end if
92
-
93
- call cpu_time(end_time)
94
- this%computation_time = end_time - start_time
95
- end subroutine metrics_compute_all
96
-
97
- !> Print metrics
98
- subroutine metrics_print(this)
99
- class(bob_quantum_metrics), intent(in) :: this
100
-
101
- print '(A)', "Quantum Metrics:"
102
- print '(A,F12.8)', " Norm: ", this%norm
103
- print '(A,F12.8)', " Energy: ", this%energy
104
- print '(A,F12.8)', " Purity: ", this%purity
105
- print '(A,F12.8)', " Von Neumann Entropy: ", this%von_neumann_entropy
106
- print '(A,F12.8)', " Linear Entropy: ", this%linear_entropy
107
- print '(A,F12.8)', " Fidelity: ", this%fidelity
108
- print '(A,F12.8)', " Coherence: ", this%coherence
109
- print '(A,F12.8)', " Entanglement: ", this%entanglement_measure
110
- print '(A,F12.8)', " Participation Ratio: ", this%participation_ratio
111
- print '(A,F12.8)', " Computation Time (s): ", this%computation_time
112
- end subroutine metrics_print
113
-
114
- !> Compute state norm: ||ψ|| = sqrt(⟨ψ|ψ⟩)
115
- function compute_norm(state) result(norm_val)
116
- type(bob_quantum_state), intent(in) :: state
117
- real(wp) :: norm_val
118
-
119
- if (.not. state%is_valid) then
120
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
121
- "Cannot compute norm of invalid state", "compute_norm")
122
- norm_val = ZERO
123
- return
124
- end if
125
-
126
- norm_val = state%norm()
127
- call bob_clear_error()
128
- end function compute_norm
129
-
130
- !> Compute energy expectation: E = ⟨ψ|H|ψ⟩
131
- function compute_energy(state, hamiltonian) result(energy)
132
- type(bob_quantum_state), intent(in) :: state
133
- complex(cwp), intent(in) :: hamiltonian(:,:)
134
- real(wp) :: energy
135
-
136
- complex(cwp), allocatable :: h_psi(:)
137
- integer(i8) :: i, j
138
- complex(cwp) :: expectation
139
- integer :: stat
140
-
141
- if (.not. state%is_valid) then
142
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
143
- "Cannot compute energy of invalid state", "compute_energy")
144
- energy = ZERO
145
- return
146
- end if
147
-
148
- if (size(hamiltonian, 1, kind=i8) /= state%dim .or. &
149
- size(hamiltonian, 2, kind=i8) /= state%dim) then
150
- call bob_set_error(BOB_ERROR_DIMENSION_MISMATCH, &
151
- "Hamiltonian dimension mismatch", "compute_energy")
152
- energy = ZERO
153
- return
154
- end if
155
-
156
- ! Allocate temporary array
157
- allocate(h_psi(state%dim), stat=stat)
158
- if (stat /= 0) then
159
- call bob_set_error(BOB_ERROR_ALLOCATION, &
160
- "Failed to allocate temporary array", "compute_energy")
161
- energy = ZERO
162
- return
163
- end if
164
-
165
- ! Compute H|ψ⟩
166
- h_psi = CZERO
167
- do i = 1, state%dim
168
- do j = 1, state%dim
169
- h_psi(i) = h_psi(i) + hamiltonian(i,j) * state%amplitudes(j)
170
- end do
171
- end do
172
-
173
- ! Compute ⟨ψ|H|ψ⟩
174
- expectation = CZERO
175
- do i = 1, state%dim
176
- expectation = expectation + conjg(state%amplitudes(i)) * h_psi(i)
177
- end do
178
-
179
- energy = real(expectation)
180
-
181
- deallocate(h_psi)
182
- call bob_clear_error()
183
- end function compute_energy
184
-
185
- !> Compute purity: Tr(ρ²) where ρ = |ψ⟩⟨ψ|
186
- function compute_purity(state) result(purity)
187
- type(bob_quantum_state), intent(in) :: state
188
- real(wp) :: purity
189
-
190
- integer(i8) :: i
191
- real(wp) :: sum_prob_squared
192
-
193
- if (.not. state%is_valid) then
194
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
195
- "Cannot compute purity of invalid state", "compute_purity")
196
- purity = ZERO
197
- return
198
- end if
199
-
200
- ! For pure states: Tr(ρ²) = Σᵢ|ψᵢ|⁴
201
- sum_prob_squared = ZERO
202
- do i = 1, state%dim
203
- sum_prob_squared = sum_prob_squared + &
204
- real(state%amplitudes(i) * conjg(state%amplitudes(i))) ** 2
205
- end do
206
-
207
- purity = sum_prob_squared
208
- call bob_clear_error()
209
- end function compute_purity
210
-
211
- !> Compute von Neumann entropy: S = -Tr(ρ log ρ)
212
- function compute_von_neumann_entropy(state) result(entropy)
213
- type(bob_quantum_state), intent(in) :: state
214
- real(wp) :: entropy
215
-
216
- integer(i8) :: i
217
- real(wp) :: prob, log_prob
218
-
219
- if (.not. state%is_valid) then
220
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
221
- "Cannot compute entropy of invalid state", "compute_von_neumann_entropy")
222
- entropy = ZERO
223
- return
224
- end if
225
-
226
- ! For pure states: S = -Σᵢ pᵢ log(pᵢ) where pᵢ = |ψᵢ|²
227
- entropy = ZERO
228
- do i = 1, state%dim
229
- prob = real(state%amplitudes(i) * conjg(state%amplitudes(i)))
230
-
231
- if (prob > TOL_NORM) then
232
- log_prob = log(prob)
233
- entropy = entropy - prob * log_prob
234
- end if
235
- end do
236
-
237
- call bob_clear_error()
238
- end function compute_von_neumann_entropy
239
-
240
- !> Compute linear entropy: S_L = 1 - Tr(ρ²)
241
- function compute_linear_entropy(state) result(entropy)
242
- type(bob_quantum_state), intent(in) :: state
243
- real(wp) :: entropy
244
-
245
- real(wp) :: purity
246
-
247
- if (.not. state%is_valid) then
248
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
249
- "Cannot compute linear entropy of invalid state", "compute_linear_entropy")
250
- entropy = ZERO
251
- return
252
- end if
253
-
254
- purity = compute_purity(state)
255
- entropy = ONE - purity
256
-
257
- call bob_clear_error()
258
- end function compute_linear_entropy
259
-
260
- !> Compute fidelity: F = |⟨ψ|φ⟩|²
261
- function compute_fidelity(state1, state2) result(fidelity)
262
- type(bob_quantum_state), intent(in) :: state1, state2
263
- real(wp) :: fidelity
264
-
265
- complex(cwp) :: inner_prod
266
-
267
- if (.not. state1%is_valid .or. .not. state2%is_valid) then
268
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
269
- "Cannot compute fidelity of invalid states", "compute_fidelity")
270
- fidelity = ZERO
271
- return
272
- end if
273
-
274
- if (state1%dim /= state2%dim) then
275
- call bob_set_error(BOB_ERROR_DIMENSION_MISMATCH, &
276
- "States have different dimensions", "compute_fidelity")
277
- fidelity = ZERO
278
- return
279
- end if
280
-
281
- inner_prod = state1%inner_product(state2)
282
- fidelity = real(inner_prod * conjg(inner_prod))
283
-
284
- call bob_clear_error()
285
- end function compute_fidelity
286
-
287
- !> Compute coherence: C = Σᵢ≠ⱼ |ρᵢⱼ|
288
- function compute_coherence(state) result(coherence)
289
- type(bob_quantum_state), intent(in) :: state
290
- real(wp) :: coherence
291
-
292
- integer(i8) :: i, j
293
- complex(cwp) :: rho_ij
294
-
295
- if (.not. state%is_valid) then
296
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
297
- "Cannot compute coherence of invalid state", "compute_coherence")
298
- coherence = ZERO
299
- return
300
- end if
301
-
302
- ! Coherence = sum of off-diagonal density matrix elements
303
- coherence = ZERO
304
- do i = 1, state%dim
305
- do j = i + 1, state%dim
306
- rho_ij = state%amplitudes(i) * conjg(state%amplitudes(j))
307
- coherence = coherence + abs(rho_ij)
308
- end do
309
- end do
310
-
311
- ! Multiply by 2 for symmetry
312
- coherence = TWO * coherence
313
-
314
- call bob_clear_error()
315
- end function compute_coherence
316
-
317
- !> Compute entanglement measure (for bipartite systems)
318
- function compute_entanglement(state, subsystem_dim) result(entanglement)
319
- type(bob_quantum_state), intent(in) :: state
320
- integer(i8), intent(in) :: subsystem_dim
321
- real(wp) :: entanglement
322
-
323
- complex(cwp), allocatable :: reduced_density(:,:)
324
- real(wp), allocatable :: eigenvalues(:)
325
- integer(i8) :: i, j, k, l
326
- integer(i8) :: dim_a, dim_b
327
- integer :: stat
328
-
329
- if (.not. state%is_valid) then
330
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
331
- "Cannot compute entanglement of invalid state", "compute_entanglement")
332
- entanglement = ZERO
333
- return
334
- end if
335
-
336
- dim_a = subsystem_dim
337
- dim_b = state%dim / subsystem_dim
338
-
339
- if (dim_a * dim_b /= state%dim) then
340
- call bob_set_error(BOB_ERROR_DIMENSION_MISMATCH, &
341
- "Subsystem dimension incompatible", "compute_entanglement")
342
- entanglement = ZERO
343
- return
344
- end if
345
-
346
- ! Allocate reduced density matrix
347
- allocate(reduced_density(dim_a, dim_a), stat=stat)
348
- if (stat /= 0) then
349
- call bob_set_error(BOB_ERROR_ALLOCATION, &
350
- "Failed to allocate reduced density matrix", "compute_entanglement")
351
- entanglement = ZERO
352
- return
353
- end if
354
-
355
- ! Compute reduced density matrix: ρ_A = Tr_B(|ψ⟩⟨ψ|)
356
- reduced_density = CZERO
357
- do i = 1, dim_a
358
- do j = 1, dim_a
359
- do k = 1, dim_b
360
- reduced_density(i,j) = reduced_density(i,j) + &
361
- state%amplitudes((i-1)*dim_b + k) * &
362
- conjg(state%amplitudes((j-1)*dim_b + k))
363
- end do
364
- end do
365
- end do
366
-
367
- ! Compute von Neumann entropy of reduced density matrix
368
- ! This requires eigenvalue decomposition (simplified here)
369
- allocate(eigenvalues(dim_a), stat=stat)
370
- if (stat /= 0) then
371
- deallocate(reduced_density)
372
- call bob_set_error(BOB_ERROR_ALLOCATION, &
373
- "Failed to allocate eigenvalues", "compute_entanglement")
374
- entanglement = ZERO
375
- return
376
- end if
377
-
378
- ! Simplified: ! use trace ! inlined of ρ² as entanglement measure
379
- entanglement = ZERO
380
- do i = 1, dim_a
381
- do j = 1, dim_a
382
- entanglement = entanglement + &
383
- real(reduced_density(i,j) * conjg(reduced_density(j,i)))
384
- end do
385
- end do
386
-
387
- ! Convert to entropy-like measure
388
- entanglement = ONE - entanglement
389
-
390
- deallocate(reduced_density, eigenvalues)
391
- call bob_clear_error()
392
- end function compute_entanglement
393
-
394
- !> Compute inverse participation ratio: IPR = Σᵢ|ψᵢ|⁴
395
- function compute_participation_ratio(state) result(ipr)
396
- type(bob_quantum_state), intent(in) :: state
397
- real(wp) :: ipr
398
-
399
- integer(i8) :: i
400
- real(wp) :: prob
401
-
402
- if (.not. state%is_valid) then
403
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
404
- "Cannot compute IPR of invalid state", "compute_participation_ratio")
405
- ipr = ZERO
406
- return
407
- end if
408
-
409
- ipr = ZERO
410
- do i = 1, state%dim
411
- prob = real(state%amplitudes(i) * conjg(state%amplitudes(i)))
412
- ipr = ipr + prob ** 2
413
- end do
414
-
415
- call bob_clear_error()
416
- end function compute_participation_ratio
417
-
418
- !> Compute lattice metrics
419
- subroutine compute_lattice_metrics(lattice, metrics)
420
- type(bob_vortex_lattice), intent(in) :: lattice
421
- type(bob_quantum_metrics), intent(out) :: metrics
422
-
423
- call metrics%init()
424
-
425
- if (.not. lattice%is_initialized) then
426
- call bob_set_error(BOB_ERROR_INVALID_STATE, &
427
- "Cannot compute metrics of uninitialized lattice", &
428
- "compute_lattice_metrics")
429
- return
430
- end if
431
-
432
- metrics%energy = lattice%total_energy()
433
- metrics%entanglement_measure = lattice%entanglement_entropy()
434
- metrics%norm = ONE ! Lattice is always normalized
435
-
436
- call bob_clear_error()
437
- end subroutine compute_lattice_metrics
438
-
439
- !> C ABI: Compute metrics
440
- function bob_metrics_compute(state_ptr, metrics_ptr) result(status) &
441
- bind(C, name="bob_metrics_compute")
442
- use, intrinsic :: iso_c_binding
443
- type(c_ptr), value :: state_ptr, metrics_ptr
444
- integer(c_int) :: status
445
-
446
- type(bob_quantum_state), pointer :: state
447
- type(bob_quantum_metrics), pointer :: metrics
448
-
449
- if (.not. c_associated(state_ptr) .or. .not. c_associated(metrics_ptr)) then
450
- status = BOB_ERROR_INVALID_ARGUMENT
451
- return
452
- end if
453
-
454
- call c_f_pointer(state_ptr, state)
455
- call c_f_pointer(metrics_ptr, metrics)
456
-
457
- call metrics%compute_all(state)
458
- status = bob_get_last_error()
459
- end function bob_metrics_compute
460
-
461
- !> C ABI: Get energy
462
- function bob_metrics_get_energy(metrics_ptr) result(energy) &
463
- bind(C, name="bob_metrics_get_energy")
464
- use, intrinsic :: iso_c_binding
465
- type(c_ptr), value :: metrics_ptr
466
- real(c_double) :: energy
467
-
468
- type(bob_quantum_metrics), pointer :: metrics
469
-
470
- if (.not. c_associated(metrics_ptr)) then
471
- energy = ZERO
472
- return
473
- end if
474
-
475
- call c_f_pointer(metrics_ptr, metrics)
476
- energy = metrics%energy
477
- end function bob_metrics_get_energy
478
-
479
- !> C ABI: Get entropy
480
- function bob_metrics_get_entropy(metrics_ptr) result(entropy) &
481
- bind(C, name="bob_metrics_get_entropy")
482
- use, intrinsic :: iso_c_binding
483
- type(c_ptr), value :: metrics_ptr
484
- real(c_double) :: entropy
485
-
486
- type(bob_quantum_metrics), pointer :: metrics
487
-
488
- if (.not. c_associated(metrics_ptr)) then
489
- entropy = ZERO
490
- return
491
- end if
492
-
493
- call c_f_pointer(metrics_ptr, metrics)
494
- entropy = metrics%von_neumann_entropy
495
- end function bob_metrics_get_entropy
496
-
497
- end module bob_metrics
498
-
499
- ! Made with Bob
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_metrics.f90-pp.f90.d DELETED
@@ -1,2 +0,0 @@
1
- CMakeFiles/bob_quantum.dir/src/bob_metrics.f90-pp.f90: \
2
- C:/Users/jessi/Desktop/bobs\ control\ repo/sov-kernel-monster/src/bob_metrics.f90
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_metrics.f90.obj.ddi DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "revision" : 0,
3
- "rules" :
4
- [
5
- {
6
- "outputs" : [],
7
- "primary-output" : "CMakeFiles\\\\bob_quantum.dir\\\\src\\\\bob_metrics.f90.obj",
8
- "provides" :
9
- [
10
- {
11
- "compiled-module-path" : "bob_metrics.mod",
12
- "is-interface" : true,
13
- "logical-name" : "bob_metrics.mod"
14
- }
15
- ],
16
- "requires" :
17
- [
18
- {
19
- "logical-name" : "bob_errors.mod"
20
- },
21
- {
22
- "logical-name" : "bob_kinds.mod"
23
- },
24
- {
25
- "logical-name" : "bob_lattice.mod"
26
- },
27
- {
28
- "logical-name" : "bob_state.mod"
29
- }
30
- ]
31
- }
32
- ],
33
- "version" : 0
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_phdae.f90-pp.f90 DELETED
@@ -1,404 +0,0 @@
1
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_phdae.f90"
2
- # 1 "<built-in>"
3
- # 1 "<command-line>"
4
- # 1 "C:/Users/jessi/Desktop/bobs control repo/sov-kernel-monster/src/bob_phdae.f90"
5
- !=====================================================================
6
- ! bob_phdae.f90
7
- ! Port-Hamiltonian Differential-Algebraic Equation (PH-DAE) kernel.
8
- ! Matches sovereign-phdae/src/lib.rs exactly.
9
- !
10
- ! Mathematical model:
11
- ! d/dt(T(t,z) * z) = [J(t,z) - R(t,z)] * Q(t,z) * z + B(t) * u
12
- !
13
- ! Where:
14
- ! T — mass tensor operator (possibly singular for DAEs)
15
- ! J — interconnection matrix (skew-symmetric: J = -J^T)
16
- ! R — dissipation matrix (positive semi-definite: R = R^T >= 0)
17
- ! Q — gradient operator
18
- ! B — input map
19
- ! u — external input
20
- !
21
- ! Structure preservation:
22
- ! Skew-symmetry of J enforced at construction
23
- ! PSD-ness of R enforced via Cholesky witness
24
- ! Power balance: dH/dt = P_port - P_diss verified at each step
25
- ! WORM audit chain seals every time step
26
- !
27
- ! Standard: Fortran 2018
28
- !=====================================================================
29
- module bob_phdae
30
- use, intrinsic :: iso_c_binding, only: c_int32_t, c_int64_t, c_double, &
31
- c_ptr, c_f_pointer, c_loc
32
- use, intrinsic :: iso_fortran_env, only: int64, real64
33
- use bob_kinds
34
- use bob_errors
35
- use bob_worm, only: bob_worm_chain, blake3_hash_bytes
36
- implicit none
37
- private
38
-
39
- !──────────────────────────────────────────────────────────────────
40
- ! Skew-symmetric matrix J = -J^T
41
- !──────────────────────────────────────────────────────────────────
42
- type, public :: skew_sym_matrix
43
- real(wp), allocatable :: data(:,:)
44
- integer(i4) :: n = 0
45
- logical(lk) :: is_valid = .false.
46
- contains
47
- procedure :: init => ssm_init
48
- procedure :: set => ssm_set ! enforces J_{ij} = -J_{ji}
49
- procedure :: apply => ssm_apply ! y = J * x
50
- procedure :: verify => ssm_verify ! check J = -J^T
51
- procedure :: destroy => ssm_destroy
52
- end type skew_sym_matrix
53
-
54
- !──────────────────────────────────────────────────────────────────
55
- ! Positive semi-definite matrix R = R^T >= 0
56
- !──────────────────────────────────────────────────────────────────
57
- type, public :: psd_matrix
58
- real(wp), allocatable :: data(:,:)
59
- real(wp), allocatable :: chol(:,:) ! Cholesky factor L: R = L*L^T
60
- integer(i4) :: n = 0
61
- logical(lk) :: is_valid = .false.
62
- logical(lk) :: has_chol = .false.
63
- contains
64
- procedure :: init => psd_init
65
- procedure :: set_chol => psd_set_chol ! set via L: R = L*L^T
66
- procedure :: apply => psd_apply ! y = R * x
67
- procedure :: verify => psd_verify ! check R = R^T
68
- procedure :: destroy => psd_destroy
69
- end type psd_matrix
70
-
71
- !──────────────────────────────────────────────────────────────────
72
- ! PH-DAE system state
73
- !──────────────────────────────────────────────────────────────────
74
- type, public :: bob_phdae_t
75
- integer(i4) :: n = 0 ! state dimension
76
- real(wp) :: time = ZERO ! current time
77
- real(wp) :: hamiltonian = ZERO ! current H(z)
78
- real(wp) :: power_port = ZERO ! B^T * Q * z * u
79
- real(wp) :: power_diss = ZERO ! z^T * Q^T * R * Q * z
80
- real(wp), allocatable :: state(:) ! z(t)
81
- real(wp), allocatable :: state_dot(:) ! dz/dt
82
- real(wp), allocatable :: gradient(:) ! Q * z (gradient)
83
- real(wp), allocatable :: input(:) ! u(t)
84
- real(wp), allocatable :: Q(:,:) ! gradient operator
85
- real(wp), allocatable :: B(:,:) ! input map
86
- type(skew_sym_matrix) :: J ! interconnection
87
- type(psd_matrix) :: R ! dissipation
88
- type(bob_worm_chain) :: audit ! WORM audit chain
89
- logical(lk) :: initialized = .false.
90
- contains
91
- procedure :: init => phdae_init
92
- procedure :: step => phdae_step ! Radau IIA step
93
- procedure :: hamiltonian_val => phdae_H ! H(z) = ½ z^T Q^T Q z
94
- procedure :: power_balance => phdae_power
95
- procedure :: destroy => phdae_destroy
96
- end type bob_phdae_t
97
-
98
- ! Step receipt (sealed output from each integration step)
99
- type, public :: bob_step_receipt
100
- real(wp) :: time_in = ZERO
101
- real(wp) :: time_out = ZERO
102
- real(wp) :: h_in = ZERO ! Hamiltonian before
103
- real(wp) :: h_out = ZERO ! Hamiltonian after
104
- real(wp) :: dh = ZERO ! change in H
105
- real(wp) :: p_port = ZERO ! power in from port
106
- real(wp) :: p_diss = ZERO ! power dissipated
107
- real(wp) :: balance_err = ZERO ! |dH/dt - P_port + P_diss|
108
- logical(lk) :: balance_ok = .false.
109
- integer(i8) :: hash(32) = 0_i8 ! BLAKE3 seal
110
- end type bob_step_receipt
111
-
112
- public :: phdae_new
113
- public :: bob_phdae_new, bob_phdae_step, bob_phdae_free
114
-
115
- contains
116
-
117
- !══════════════════════════════════════════════════════════════════
118
- ! SKEW-SYMMETRIC MATRIX
119
- !══════════════════════════════════════════════════════════════════
120
-
121
- subroutine ssm_init(this, n)
122
- class(skew_sym_matrix), intent(inout) :: this
123
- integer(i4), intent(in) :: n
124
- if (allocated(this%data)) deallocate(this%data)
125
- allocate(this%data(n,n), source=ZERO)
126
- this%n = n; this%is_valid = .true.
127
- end subroutine ssm_init
128
-
129
- !> Set element (i,j) and enforce J_{ji} = -J_{ij}
130
- subroutine ssm_set(this, i, j, val)
131
- class(skew_sym_matrix), intent(inout) :: this
132
- integer(i4), intent(in) :: i, j
133
- real(wp), intent(in) :: val
134
- if (i == j) return ! diagonal must be zero for skew-sym
135
- this%data(i,j) = val
136
- this%data(j,i) = -val
137
- end subroutine ssm_set
138
-
139
- !> y = J * x
140
- pure subroutine ssm_apply(this, x, y)
141
- class(skew_sym_matrix), intent(in) :: this
142
- real(wp), intent(in) :: x(this%n)
143
- real(wp), intent(out) :: y(this%n)
144
- integer(i4) :: i, j
145
- y = ZERO
146
- do i = 1, this%n
147
- do j = 1, this%n
148
- y(i) = y(i) + this%data(i,j) * x(j)
149
- end do
150
- end do
151
- end subroutine ssm_apply
152
-
153
- !> Verify J = -J^T (frobenius norm of J + J^T < tol)
154
- function ssm_verify(this) result(ok)
155
- class(skew_sym_matrix), intent(in) :: this
156
- logical :: ok
157
- real(wp) :: err
158
- integer(i4) :: i, j
159
- err = ZERO
160
- do i = 1, this%n; do j = 1, this%n
161
- err = err + abs(this%data(i,j) + this%data(j,i))**2
162
- end do; end do
163
- ok = sqrt(err) < TOL_NORM
164
- end function ssm_verify
165
-
166
- subroutine ssm_destroy(this)
167
- class(skew_sym_matrix), intent(inout) :: this
168
- if (allocated(this%data)) deallocate(this%data)
169
- this%n = 0; this%is_valid = .false.
170
- end subroutine ssm_destroy
171
-
172
- !══════════════════════════════════════════════════════════════════
173
- ! PSD MATRIX
174
- !══════════════════════════════════════════════════════════════════
175
-
176
- subroutine psd_init(this, n)
177
- class(psd_matrix), intent(inout) :: this
178
- integer(i4), intent(in) :: n
179
- if (allocated(this%data)) deallocate(this%data)
180
- if (allocated(this%chol)) deallocate(this%chol)
181
- allocate(this%data(n,n), source=ZERO)
182
- allocate(this%chol(n,n), source=ZERO)
183
- this%n = n; this%is_valid = .true.; this%has_chol = .false.
184
- end subroutine psd_init
185
-
186
- !> Set R = L * L^T where L is lower triangular Cholesky factor
187
- subroutine psd_set_chol(this, L)
188
- class(psd_matrix), intent(inout) :: this
189
- real(wp), intent(in) :: L(this%n, this%n)
190
- integer(i4) :: i, j, k
191
- this%chol = L
192
- this%has_chol = .true.
193
- ! Compute R = L * L^T
194
- this%data = ZERO
195
- do i = 1, this%n; do j = 1, this%n; do k = 1, this%n
196
- this%data(i,j) = this%data(i,j) + L(i,k) * L(j,k)
197
- end do; end do; end do
198
- end subroutine psd_set_chol
199
-
200
- pure subroutine psd_apply(this, x, y)
201
- class(psd_matrix), intent(in) :: this
202
- real(wp), intent(in) :: x(this%n)
203
- real(wp), intent(out) :: y(this%n)
204
- integer(i4) :: i, j
205
- y = ZERO
206
- do i = 1, this%n; do j = 1, this%n
207
- y(i) = y(i) + this%data(i,j) * x(j)
208
- end do; end do
209
- end subroutine psd_apply
210
-
211
- function psd_verify(this) result(ok)
212
- class(psd_matrix), intent(in) :: this
213
- logical :: ok
214
- real(wp) :: err, ev_min
215
- integer(i4) :: i, j
216
- ! Check symmetry
217
- err = ZERO
218
- do i = 1, this%n; do j = 1, this%n
219
- err = err + abs(this%data(i,j) - this%data(j,i))**2
220
- end do; end do
221
- ok = sqrt(err) < TOL_NORM
222
- ! Check positive semi-definiteness via diagonal dominance (simplified)
223
- if (ok) then
224
- do i = 1, this%n
225
- if (this%data(i,i) < -TOL_NORM) then; ok = .false.; exit; end if
226
- end do
227
- end if
228
- end function psd_verify
229
-
230
- subroutine psd_destroy(this)
231
- class(psd_matrix), intent(inout) :: this
232
- if (allocated(this%data)) deallocate(this%data)
233
- if (allocated(this%chol)) deallocate(this%chol)
234
- this%n = 0; this%is_valid = .false.
235
- end subroutine psd_destroy
236
-
237
- !══════════════════════════════════════════════════════════════════
238
- ! PH-DAE SYSTEM
239
- !══════════════════════════════════════════════════════════════════
240
-
241
- function phdae_new(n, num_inputs) result(sys)
242
- integer(i4), intent(in) :: n, num_inputs
243
- type(bob_phdae_t) :: sys
244
- call sys%init(n, num_inputs)
245
- end function phdae_new
246
-
247
- subroutine phdae_init(this, n, num_inputs)
248
- class(bob_phdae_t), intent(inout) :: this
249
- integer(i4), intent(in) :: n, num_inputs
250
- this%n = n; this%time = ZERO
251
- allocate(this%state(n), source=ZERO)
252
- allocate(this%state_dot(n), source=ZERO)
253
- allocate(this%gradient(n), source=ZERO)
254
- allocate(this%input(num_inputs), source=ZERO)
255
- allocate(this%Q(n,n), source=ZERO)
256
- allocate(this%B(n,num_inputs), source=ZERO)
257
- ! Default: Q = I (identity), B = 0
258
- integer(i4) :: i
259
- do i = 1, n; this%Q(i,i) = ONE; end do
260
- call this%J%init(n)
261
- call this%R%init(n)
262
- call this%audit%init()
263
- this%initialized = .true.
264
- end subroutine phdae_init
265
-
266
- !> H(z) = ½ z^T Q^T Q z (quadratic Hamiltonian)
267
- function phdae_H(this) result(H)
268
- class(bob_phdae_t), intent(inout) :: this
269
- real(wp) :: H
270
- real(wp) :: Qz(this%n)
271
- integer(i4) :: i, j
272
- ! gradient = Q * z
273
- this%gradient = ZERO
274
- do i = 1, this%n; do j = 1, this%n
275
- this%gradient(i) = this%gradient(i) + this%Q(i,j) * this%state(j)
276
- end do; end do
277
- ! H = ½ ||Q z||^2
278
- H = HALF * dot_product(this%gradient, this%gradient)
279
- end function phdae_H
280
-
281
- !> Power balance: dH/dt = P_port - P_diss
282
- !> P_port = (B*u)^T * gradient (power from external port)
283
- !> P_diss = gradient^T * R * gradient (dissipated power, >= 0)
284
- subroutine phdae_power(this)
285
- class(bob_phdae_t), intent(inout) :: this
286
- real(wp) :: Rg(this%n), Bu(this%n)
287
- integer(i4) :: i, j
288
- ! R * gradient
289
- call this%R%apply(this%gradient, Rg)
290
- this%power_diss = dot_product(this%gradient, Rg)
291
- ! B * u
292
- Bu = ZERO
293
- do i = 1, this%n; do j = 1, size(this%input)
294
- Bu(i) = Bu(i) + this%B(i,j) * this%input(j)
295
- end do; end do
296
- this%power_port = dot_product(Bu, this%gradient)
297
- end subroutine phdae_power
298
-
299
- !> Single implicit midpoint step (simplified Radau IIA)
300
- !> dz/dt = (J - R) * gradient + B * u
301
- subroutine phdae_step(this, dt, receipt)
302
- class(bob_phdae_t), intent(inout) :: this
303
- real(wp), intent(in) :: dt
304
- type(bob_step_receipt), intent(out) :: receipt
305
- real(wp) :: Jg(this%n), Rg(this%n), Bu(this%n), rhs(this%n)
306
- real(wp) :: h_before, h_after, balance_err
307
- integer(i4) :: i, j
308
- integer(i8) :: seal_payload(8)
309
-
310
- receipt%time_in = this%time
311
- h_before = this%hamiltonian_val()
312
- receipt%h_in = h_before
313
-
314
- ! gradient = Q * z
315
- this%gradient = ZERO
316
- do i = 1, this%n; do j = 1, this%n
317
- this%gradient(i) = this%gradient(i) + this%Q(i,j) * this%state(j)
318
- end do; end do
319
-
320
- ! RHS = (J - R) * gradient + B * u
321
- call this%J%apply(this%gradient, Jg)
322
- call this%R%apply(this%gradient, Rg)
323
- Bu = ZERO
324
- do i = 1, this%n; do j = 1, size(this%input)
325
- Bu(i) = Bu(i) + this%B(i,j) * this%input(j)
326
- end do; end do
327
- rhs = Jg - Rg + Bu
328
-
329
- ! Explicit Euler step (first-order, replace with Radau IIA for stiff systems)
330
- this%state_dot = rhs
331
- this%state = this%state + dt * rhs
332
- this%time = this%time + dt
333
-
334
- ! Update power balance
335
- call this%phdae_power()
336
- h_after = this%hamiltonian_val()
337
- this%hamiltonian = h_after
338
-
339
- ! Power balance error: |dH/dt - P_port + P_diss|
340
- balance_err = abs((h_after - h_before)/dt - this%power_port + this%power_diss)
341
-
342
- receipt%time_out = this%time
343
- receipt%h_out = h_after
344
- receipt%dh = h_after - h_before
345
- receipt%p_port = this%power_port
346
- receipt%p_diss = this%power_diss
347
- receipt%balance_err = balance_err
348
- receipt%balance_ok = balance_err < 1e-6_wp
349
-
350
- ! Seal to WORM chain
351
- call this%audit%seal('PHDAE_STEP', 't='//achar(0), int(this%time*1000,i64))
352
- end subroutine phdae_step
353
-
354
- subroutine phdae_destroy(this)
355
- class(bob_phdae_t), intent(inout) :: this
356
- if (allocated(this%state)) deallocate(this%state)
357
- if (allocated(this%state_dot)) deallocate(this%state_dot)
358
- if (allocated(this%gradient)) deallocate(this%gradient)
359
- if (allocated(this%input)) deallocate(this%input)
360
- if (allocated(this%Q)) deallocate(this%Q)
361
- if (allocated(this%B)) deallocate(this%B)
362
- call this%J%destroy()
363
- call this%R%destroy()
364
- call this%audit%destroy()
365
- this%initialized = .false.
366
- end subroutine phdae_destroy
367
-
368
- !══════════════════════════════════════════════════════════════════
369
- ! C ABI
370
- !══════════════════════════════════════════════════════════════════
371
-
372
- function bob_phdae_new(n, num_inputs) result(ptr) bind(C, name="bob_phdae_new")
373
- integer(c_int32_t), value :: n, num_inputs
374
- type(c_ptr) :: ptr
375
- type(bob_phdae_t), pointer :: sys
376
- allocate(sys)
377
- call sys%init(int(n,i4), int(num_inputs,i4))
378
- ptr = c_loc(sys)
379
- end function bob_phdae_new
380
-
381
- function bob_phdae_step(sys_ptr, dt) result(err) bind(C, name="bob_phdae_step")
382
- type(c_ptr), value :: sys_ptr
383
- real(c_double), value :: dt
384
- real(c_double) :: err
385
- type(bob_phdae_t), pointer :: sys
386
- type(bob_step_receipt) :: receipt
387
- if (.not. c_associated(sys_ptr)) then; err = -1.0_wp; return; end if
388
- call c_f_pointer(sys_ptr, sys)
389
- call sys%step(real(dt,wp), receipt)
390
- err = real(receipt%balance_err, c_double)
391
- end function bob_phdae_step
392
-
393
- subroutine bob_phdae_free(sys_ptr) bind(C, name="bob_phdae_free")
394
- type(c_ptr), value :: sys_ptr
395
- type(bob_phdae_t), pointer :: sys
396
- if (.not. c_associated(sys_ptr)) return
397
- call c_f_pointer(sys_ptr, sys)
398
- call sys%destroy()
399
- deallocate(sys)
400
- end subroutine bob_phdae_free
401
-
402
- end module bob_phdae
403
-
404
- ! Made with Bob
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build_final2/CMakeFiles/bob_quantum.dir/src/bob_phdae.f90-pp.f90.d DELETED
@@ -1,2 +0,0 @@
1
- CMakeFiles/bob_quantum.dir/src/bob_phdae.f90-pp.f90: \
2
- C:/Users/jessi/Desktop/bobs\ control\ repo/sov-kernel-monster/src/bob_phdae.f90