Hussel Mechanics / Quantum superposition integration #271
darinsecurity
started this conversation in
Ideas
Replies: 1 comment
-
Isn't this a duplicate of #273? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Simtalenous examples / Schrodingers cat:
If you mention some code as such
a = b//c!
The variable 'a' will exist in a simulated quantum superposition between being the value b, being the value c, being both values, and being no values (none.) This will simulate a n-bit quantum computer for every time a variable in a superposition branches. The same mechanics of the language apply, you just get 4^n simultaneous outcomes. Outcomes where errors occur will end. This is similar to the "Many worlds" implementation and will create more navigatable and powerful code.
https://en.wikipedia.org/wiki/Many-worlds_interpretation
For example (psuedocode):
`
function calculatePrimeFactors(n) => {
const total = []!
const var old = -1!
while !(total.length === old) {
const var div = n//1!
(sample factors from div)
(break when no more factors can be found (all outcomes exhausted)
break!
}
return total! // Totally does not have any numbers in superposition
}
`
Beta Was this translation helpful? Give feedback.
All reactions