hyperDB
hyperDB copied to clipboard
Improve derridaean_similarity using quantum simulation
derridaean_similarity is pretty damn good, after testing, but its output is entirely predicated on the quality of the random number generation.
This PR proposes an optional quantum toggle that will enable quantum random number generation using ~~8-qubit~~ 1-qubit simulated system to provide quantifiably more robust random number output.
I did some benchmarks and quantumfied derridaean_similarity is approximately 3.5m (m as in million) times slower than non-quantum but I believe the results speak for themselves. Due to the speed cost, I have set it to default to false.
p.s. Please accept my apology for premature rant in issue https://github.com/jdagdelen/hyperDB/issues/2. I have come to my senses. I wish to contribute to the hypeDB moving forward.
@rjadr @jdagdelen @jobergum
Pretty sure the performance penalty can be reduced by several million factors using 2-qubit system vs current default of 8-qubits. But I am not skilled enough to change the qiskit backend to simulate 2-qubits instead of 8.
I love this, but it adds another requirement to the package and we are tying to avoid that at this time and remain pure numpy.
While HyperDB is a joke, it is also not a joke. We do actually want it to be a useful library that helps people avoid writing the same boilerplate when developing knowledge augmented LLM applications.
@jdagdelen Thanks for the feedback. All your concerns have been resolved in the latest pr update.
- Remove qiskit and qrng dependency which are not MIT compatible
- Use a single qubit (simulated) to generate quantum-based random
- 3 millions times faster than qiskit version
- quantum random as default for derridaean_similarity
- Move qubit class outside (now shareable for others to use!)
- Make qubit class thread safe and scalable to HPC cluster (vcs dig this)
- Note that this code is export restricted (due to quantum) (vcs will eat this up)
- Now even faster than before! (vss doesn't care about this unfortunately)
- comments for clarity
I'm not sure if we realize how much we're innovating poststructural semiotics here. This commit moves way beyond the deconstruction of LLMs' logocentrism. Linking the ultimate indeterminacy of meaning to quantum indeterminacy will allow for a reconceptualisation of randomness as a necessary condition for communication rather than a limitation or a source of noise. Perhaps we should write a paper about it? I already have a title: "Transgressing the Boundaries: Towards a Transformative Hermeneutics of Quantum Semiotics"
Ok, let's add some unit tests since this is getting a bit more complex, but this looks good.
@rjadr Can you do the derridean sim unit tests on this PR? Need your expertise on derridean. I am very much unqualified to check if the quantum simulation enhances or breaks the original principle.