Skip to content

Commit eeb445d

Browse files
author
FAST26 Developer
committed
chore: track all files from merged branches (codex, framewerx, readme-showcase)
1 parent 0a9126b commit eeb445d

44 files changed

Lines changed: 2211 additions & 4750 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ VXUG-Papers/
44
libqihse.so
55
*.o
66
*.gch
7+
*.png
8+
*.pyc
9+
__pycache__/
710
test_*
811
!test_*.c
912
tests/qihse_*_test
1013
!tests/qihse_*_test.c
14+
qihse_benchmark
15+
qihse_benchmark_*

LICENSE

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,67 @@
1+
================================================================================
2+
NOTICE: COMMERCIAL COMPLIANCE POLICY
3+
================================================================================
4+
5+
QIHSE is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
6+
This license is INTENTIONALLY STRONG COPYLEFT. Read it carefully.
7+
8+
TECHNICAL SHOWCASE STATUS
9+
-------------------------
10+
This repository is published as a technical demonstration of quantum-inspired
11+
vector search architecture. You are welcome to study, evaluate, and experiment
12+
with the code for research, educational, and non-commercial purposes.
13+
14+
COMMERCIAL USE RESTRICTIONS
15+
---------------------------
16+
ANY commercial deployment, hosting-as-a-service, or internal production use of
17+
this software — in whole or in part — REQUIRES strict compliance with AGPL-3.0.
18+
Specifically, you MUST:
19+
20+
1. Provide the COMPLETE corresponding source code to ALL users who interact
21+
with the software over a network (Section 13 of the AGPL).
22+
2. License your ENTIRE combined work under AGPL-3.0 (Sections 4, 5).
23+
3. Preserve ALL copyright notices, warranty disclaimers, and license terms
24+
(Section 7).
25+
4. Make the source available under the same terms — no additional restrictions,
26+
no proprietary wrappers, no SaaS shell games.
27+
28+
NON-COMPLIANCE CONSEQUENCES
29+
---------------------------
30+
Failure to comply with the above obligations constitutes COPYRIGHT INFRINGEMENT.
31+
The copyright holder reserves the right to pursue ALL available legal remedies,
32+
including but not limited to injunctive relief, statutory damages, and attorneys'
33+
fees. There will be NO WARNINGS. There will be NO SETTLEMENTS without full
34+
source publication. If you use this code commercially and fail to meet AGPL
35+
obligations, you WILL face enforcement action.
36+
37+
THIS IS NOT A PERMISSIVE LICENSE. THIS IS NOT MIT. THIS IS NOT APACHE.
38+
This is AGPL-3.0. Act accordingly.
39+
40+
COMMERCIAL LICENSING ALTERNATIVE
41+
----------------------------------
42+
If you wish to use QIHSE in a closed-source or commercial SaaS product WITHOUT
43+
releasing your entire codebase under AGPL-3.0, a commercial license is available.
44+
45+
Standard commercial terms start at **25% of gross revenue** derived from the
46+
product or service incorporating this software, with annual true-ups and audit
47+
rights reserved. These terms are intentionally set high to encourage AGPL
48+
compliance. I am open to negotiation for genuine startups, non-profits, academic
49+
spin-outs, and serious commercial ventures — but you must reach out first.
50+
51+
INTENTIONALLY UNREASONABLE COMPLIANCE PATH
52+
-------------------------------------------
53+
If you choose to comply with AGPL-3.0 rather than negotiate a commercial
54+
license, be aware that the copyright holder reserves the right to require that
55+
THEY be the primary recipient of the COMPLETE corresponding source code,
56+
INCLUDING all revisions, derivative works, and future modifications, delivered
57+
in full and without redaction. This path is deliberately designed to be more
58+
burdensome than a simple conversation. If you have a real use case, email me.
59+
60+
Contact: intel@swordintelligence.airforce
61+
(Domain was a gift — not affiliated with any military organisation.)
62+
63+
================================================================================
64+
165
GNU AFFERO GENERAL PUBLIC LICENSE
266
Version 3, 19 November 2007
367

SESSION_COMMITS.txt

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
0a9126b 2026-06-02 Merge remote-tracking branch 'origin/codex/qihse-file-persistence'
2+
b7d6555 2026-06-02 Cascade snapshot 2026-06-02T09:47:01.631299873Z
3+
c88376a 2026-06-02 feat: hierarchical storage management with automatic hot/cold tiering
4+
714e885 2026-05-18 Update README.md
5+
5add142 2026-05-18 chore: include remaining docs, build, and runtime updates
6+
1018390 2026-05-18 docs: finalize native vector DB API contracts and usage docs
7+
122a2d4 2026-05-18 Add opt-in qmag bypass mode for approximate-only search
8+
392648b 2026-05-18 Add randomized trinary sweep helper and docs
9+
76e6fa1 2026-05-18 docs: highlight statistically validated trinary win conditions
10+
9ef5edc 2026-05-18 meta: fix project name typo Hilbert
11+
de02991 2026-05-18 docs: expand README project name to Quantum Inspire dHilbert
12+
52bdf95 2026-05-18 meta: set version string to full Quantum Inspire name
13+
0cf86af 2026-05-18 docs: add native build helper and fix mermaid diagrams
14+
78524f0 2026-05-18 build: add workspace bootstrap/cleanup targets for ignored artifacts
15+
33d8530 2026-05-18 docs: fix Mermaid line breaks for GitHub render
16+
c00084d 2026-05-18 docs: add mermaid persistence lifecycle diagram
17+
e6b7e2b 2026-05-18 docs: add mermaid architecture snapshot to README
18+
57c6b6c 2026-05-18 docs: balance README wow-factor with developer clarity
19+
66e368e 2026-05-18 docs: condense README to concise, non-dense format
20+
9252996 2026-05-18 docs: expand README with stronger code showcase
21+
7a6e13b 2026-05-18 docs: rewrite README and switch to AGPL license
22+
d9a3fb9 2026-05-18 chore: move root-level test executables into tests directory
23+
db004a2 2026-05-18 docs: advertise trinary persistence and finalize memory planner plumbing
24+
09247c6 2026-05-18 docs: add finalization plan for upstream and persistence
25+
afbe8ae 2026-05-18 Merge pull request #1 from SWORDIntel/framewerx-sync
26+
2cdfa91 2026-05-18 Finalize qihse persistence workload and upstream handoff loop
27+
61be8c0 2026-05-18 docs: refresh persistence checkpoint status after continuation
28+
3ebcf54 2026-05-18 Add next-slice execution plan for remaining persistence milestones
29+
d34c556 2026-05-18 Add explicit milestone checklist and slice completion status
30+
dae2915 2026-05-18 Align QIHSE workflow controls with upstream ownership
31+
6593ac8 2026-05-18 QIHSE persistence: expand manifest/index corruption coverage
32+
08847cc 2026-05-18 Make reference benchmarks resilient when SIFT1M is missing
33+
0d4e068 2026-05-17 Reject corrupt QIHSE index snapshots
34+
a42cbc4 2026-05-17 Cover checkpoint snapshot tmp recovery
35+
cf3a1b2 2026-05-17 Add QIHSE upstream workflow check
36+
a94ed55 2026-05-17 Add QIHSE reference workflow validation target
37+
5e0e8e5 2026-05-17 Add QIHSE benchmark result summary gate
38+
951ecc5 2026-05-17 Add QIHSE reference runner smoke test
39+
c04f976 2026-05-17 Generalize QIHSE reference workload runner
40+
f9bd12f 2026-05-17 Record QIHSE VXUG benchmark results
41+
931cb09 2026-05-17 Add QIHSE VXUG benchmark runner
42+
5a6061f 2026-05-17 Add QIHSE VXUG PDF sample workload
43+
862e89a 2026-05-17 Add QIHSE reference workload file inspection
44+
1d96c63 2026-05-17 Add QIHSE reference workload manifest
45+
ffbaa2a 2026-05-17 Tighten QIHSE trinary calibration plan
46+
f76fe51 2026-05-17 Extend QIHSE recovery boundary coverage
47+
ab19d54 2026-05-17 Add QIHSE recovery persistence fixtures
48+
1667294 2026-05-17 Remove stale QIHSE mirror roots
49+
72c9a7b 2026-05-17 Canonicalize QIHSE runtime root
50+
e8ac861 2026-05-17 Extend QIHSE persistence checkpoint coverage
51+
1deb49f 2026-05-17 Harden QIHSE persistence candidate defaults
52+
73a961c 2026-05-17 Benchmark persisted QIHSE qmag search
53+
11b4900 2026-05-17 Persist QIHSE magnitude trinary sidecar
54+
ffdcbda 2026-05-17 Prototype QIHSE magnitude trinary scoring
55+
8cfaf5e 2026-05-17 Add weighted QIHSE trinary candidate scoring
56+
8389f67 2026-05-17 Add QIHSE trinary candidate sweep benchmark
57+
a81deb1 2026-05-17 Add opt-in QIHSE trinary search path
58+
cf464f4 2026-05-17 Merge QIHSE branch into FRAMEWERX master
59+
b446538 2026-05-17 Expand QIHSE trinary search benchmark datasets
60+
5bf3d28 2026-05-17 Expand QIHSE trinary search benchmark datasets
61+
b87150a 2026-05-17 Add QIHSE compaction recovery coverage
62+
ddec756 2026-05-17 Add QIHSE compaction recovery coverage
63+
b8a37a3 2026-05-17 Implement physical QIHSE compaction
64+
1b4f3f3 2026-05-17 Implement physical QIHSE compaction
65+
7df0e3e 2026-05-17 Add mutation WAL replay and trinary search benchmark
66+
a86a756 2026-05-17 Add mutation WAL replay and trinary search benchmark
67+
bf933cc 2026-05-17 Implement QIHSE mutation APIs and DB trinary benchmark
68+
03f1f60 2026-05-17 Implement QIHSE mutation APIs and DB trinary benchmark
69+
0fe36b0 2026-05-17 Update QIHSE persistence plan checkpoint
70+
572ebf1 2026-05-17 Stage mutation APIs and extend mmap benchmarks
71+
8b6defb 2026-05-17 Stage mutation APIs and extend mmap benchmarks
72+
45e9f1e 2026-05-17 Update QIHSE persistence checkpoint
73+
67be8a7 2026-05-17 Extend mmap and trinary candidate work
74+
e194479 2026-05-17 Extend mmap and trinary candidate work
75+
9483006 2026-05-17 Continue QIHSE persistence roadmap
76+
c5c8cec 2026-05-17 Continue QIHSE persistence roadmap
77+
d12e59a 2026-05-17 Harden QIHSE WAL recovery
78+
906e84b 2026-05-17 Harden QIHSE WAL recovery
79+
fb6b7b1 2026-05-17 Add native QIHSE file persistence
80+
560d65a 2026-05-17 Add native QIHSE file persistence
81+
ffa291b 2026-05-11 Fix: Flesh out stubs, resolve unused parameter warnings, and fix calloc arguments in C core
82+
0a24811 2026-05-11 Fix: Flesh out stubs, resolve unused parameter warnings, and fix calloc arguments in C core
83+
fd5e422 2026-04-28 Make SIMD backends opt-in for native builds
84+
206e758 2026-04-28 Make SIMD backends opt-in for native builds
85+
5ec0563 2026-04-07 feat: implement actual priority pinning logic for Linux UMA
86+
87ae9d9 2026-04-07 feat: implement actual priority pinning logic for Linux UMA
87+
dda32d7 2026-03-24 Include QIHSE PGP public key for secure verification
88+
c494b56 2026-03-24 Synchronize Makefile with CUDA backend and update binaries
89+
977554b 2026-03-24 Synchronize Makefile with CUDA backend and update binaries
90+
1991835 2026-03-24 Update documentation with 52x speedup results and finalize CI/CD infrastructure
91+
b85fb90 2026-03-24 Implement native accelerated hooks, industry benchmarks, and Python bindings
92+
10a8be1 2026-03-24 Implement native accelerated hooks, industry benchmarks, and Python bindings
93+
8ce6a35 2026-03-24 Finalize QIHSE ecosystem: Consolidate documentation, implement AVX2 chunking, and tune accuracy/speed balance
94+
5455326 2026-03-24 Finalize QIHSE ecosystem: Consolidate documentation, implement AVX2 chunking, and tune accuracy/speed balance
95+
501e221 2026-03-23 Fix memory safety issues and integrate heterogeneous compute pipeline (NPU/GPU)
96+
c288351 2026-03-23 Fix memory safety issues and integrate heterogeneous compute pipeline (NPU/GPU)
97+
e24c709 2026-03-21 Native exports consolidation for Python ctypes compatibility
98+
1dcf12c 2026-03-21 Native exports consolidation for Python ctypes compatibility
99+
01e2fc1 2026-03-21 Final native reconciliation: Dynamic ISA dispatch, explicit exports for ctypes, and build cleanup
100+
34811d7 2026-03-21 Final native reconciliation: Dynamic ISA dispatch, explicit exports for ctypes, and build cleanup
101+
ac51596 2026-03-21 Modularize QIHSE core, add AVX-VNNI support, and fix ISA-specific crashes
102+
9d1b2f4 2026-03-21 Modularize QIHSE core, add AVX-VNNI support, and fix ISA-specific crashes
103+
772af2c 2026-03-21 Update UMA and vector DB behavior
104+
d7cd50e 2026-03-21 Update UMA and vector DB behavior
105+
e4142d4 2026-01-20 Update README.md
106+
2bdc542 2026-01-12 Reorganize: Move QIHSE under libs/search_algorithms as parent directory
107+
baf8120 2026-01-12 Reorganize: Move QIHSE under libs/search_algorithms as parent directory
108+
3ab75a8 2025-12-24 Remove AVX512 contact/licensing sentence from both documentation files
109+
832859b 2025-12-24 Make AVX512 mention more subtle and normal - remove dramatic all-caps formatting
110+
f23a00a 2025-12-24 Add AVX512 implementation status - have implementation but cannot morally upload without proof
111+
5e800c7 2025-12-24 Add New York exemption and enhance NotPetya theming with industrial warnings
112+
1645006 2025-12-24 Remove AVX512 derivatives notice - AVX512 counted but cannot provide without proof
113+
1719f53 2025-12-24 Add NotPetya-themed HTML documentation with performance graphs
114+
667fa8a 2025-12-24 Add AVX512 derivatives notice and fix contact email
115+
3f762f8 2025-12-24 Fix repository URL: update to correct SWORDIntel organization
116+
fd85efd 2025-12-24 Fix sed command damage: correct NOT_Competitor → NOT_STISLA naming
117+
23b4f23 2025-12-24 Initial release: NOT_STISLA ultra-high-performance search algorithm

algorithms/qihse_anchor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#ifndef QIHSE_ANCHOR_H
1616
#define QIHSE_ANCHOR_H
1717

18-
#include "../qihse.h"
18+
#include "qihse.h"
1919
#include "qihse_anchor_search.h"
2020

2121
#ifdef __cplusplus

backends/cpu/qihse_cpu_distance.c

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/*
2+
* QIHSE - CPU Distance Function Dispatch
3+
*
4+
* Runtime selection of the best distance function implementation
5+
* based on CPU feature detection.
6+
*/
7+
8+
#include "qihse_cpu_distance.h"
9+
#include "qihse_cpu_detect.h"
10+
#include <pthread.h>
11+
#include <math.h>
12+
13+
/* -------------------------------------------------------------------------- */
14+
/* Scalar fallback implementations */
15+
/* -------------------------------------------------------------------------- */
16+
static float qihse_distance_dot_scalar(const float* a, const float* b, size_t dims) {
17+
float sum = 0.0f;
18+
for (size_t i = 0; i < dims; i++) {
19+
sum += a[i] * b[i];
20+
}
21+
return sum;
22+
}
23+
24+
static float qihse_distance_cosine_scalar(const float* a, const float* b, size_t dims) {
25+
float dot = 0.0f, na = 0.0f, nb = 0.0f;
26+
for (size_t i = 0; i < dims; i++) {
27+
dot += a[i] * b[i];
28+
na += a[i] * a[i];
29+
nb += b[i] * b[i];
30+
}
31+
if (na <= 0.0f || nb <= 0.0f) return 0.0f;
32+
return dot / (sqrtf(na) * sqrtf(nb));
33+
}
34+
35+
static float qihse_distance_euclidean_scalar(const float* a, const float* b, size_t dims) {
36+
float sum = 0.0f;
37+
for (size_t i = 0; i < dims; i++) {
38+
float d = a[i] - b[i];
39+
sum += d * d;
40+
}
41+
return sqrtf(sum);
42+
}
43+
44+
/* -------------------------------------------------------------------------- */
45+
/* Dispatch table */
46+
/* -------------------------------------------------------------------------- */
47+
static qihse_distance_fn_t g_cosine_fn = NULL;
48+
static qihse_distance_fn_t g_dot_fn = NULL;
49+
static qihse_distance_fn_t g_euclidean_fn = NULL;
50+
static pthread_once_t g_init_once = PTHREAD_ONCE_INIT;
51+
52+
static void qihse_distance_init_once(void) {
53+
qihse_cpu_info_t info = qihse_cpu_detect();
54+
55+
if (qihse_cpu_has_feature(&info, QIHSE_CPU_FEATURE_AVX2) &&
56+
qihse_cpu_has_feature(&info, QIHSE_CPU_FEATURE_AVX)) {
57+
g_cosine_fn = qihse_distance_cosine_avx2;
58+
g_dot_fn = qihse_distance_dot_avx2;
59+
g_euclidean_fn = qihse_distance_euclidean_avx2;
60+
} else {
61+
g_cosine_fn = qihse_distance_cosine_scalar;
62+
g_dot_fn = qihse_distance_dot_scalar;
63+
g_euclidean_fn = qihse_distance_euclidean_scalar;
64+
}
65+
}
66+
67+
/* -------------------------------------------------------------------------- */
68+
/* Public API */
69+
/* -------------------------------------------------------------------------- */
70+
float qihse_distance_cosine(const float* a, const float* b, size_t dims) {
71+
pthread_once(&g_init_once, qihse_distance_init_once);
72+
return g_cosine_fn(a, b, dims);
73+
}
74+
75+
float qihse_distance_dot(const float* a, const float* b, size_t dims) {
76+
pthread_once(&g_init_once, qihse_distance_init_once);
77+
return g_dot_fn(a, b, dims);
78+
}
79+
80+
float qihse_distance_euclidean(const float* a, const float* b, size_t dims) {
81+
pthread_once(&g_init_once, qihse_distance_init_once);
82+
return g_euclidean_fn(a, b, dims);
83+
}

backends/cpu/qihse_cpu_distance.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* QIHSE - CPU SIMD Distance Functions
3+
*
4+
* Runtime-dispatched SIMD-accelerated vector distance computations.
5+
* Auto-selects AVX2, AVX512, or scalar fallback based on CPU features.
6+
*/
7+
8+
#ifndef QIHSE_CPU_DISTANCE_H
9+
#define QIHSE_CPU_DISTANCE_H
10+
11+
#include <stddef.h>
12+
13+
#ifdef __cplusplus
14+
extern "C" {
15+
#endif
16+
17+
/* Distance function signatures */
18+
typedef float (*qihse_distance_fn_t)(const float* a, const float* b, size_t dims);
19+
20+
/* Runtime-dispatched distance functions.
21+
* These auto-select the best implementation (AVX512 > AVX2 > scalar)
22+
* on first call. */
23+
float qihse_distance_cosine(const float* a, const float* b, size_t dims);
24+
float qihse_distance_dot(const float* a, const float* b, size_t dims);
25+
float qihse_distance_euclidean(const float* a, const float* b, size_t dims);
26+
27+
/* Explicit SIMD implementations (for benchmarking/comparison) */
28+
float qihse_distance_cosine_avx2(const float* a, const float* b, size_t dims);
29+
float qihse_distance_dot_avx2(const float* a, const float* b, size_t dims);
30+
float qihse_distance_euclidean_avx2(const float* a, const float* b, size_t dims);
31+
32+
#ifdef __cplusplus
33+
}
34+
#endif
35+
36+
#endif /* QIHSE_CPU_DISTANCE_H */

0 commit comments

Comments
 (0)