Sources¶
Input current sources that drive neurons via SC-encoded bitstreams.
Bitstream Current Source¶
Converts multiple scalar inputs through weighted SC synapses into a realised
per-cycle current trace. step() consumes that trace one cycle at a time, and
full_current_estimate() returns the mean of the same realised trace.
sc_neurocore.sources.bitstream_current_source.BitstreamCurrentSource
dataclass
¶
Multi-channel bitstream current source.
- Takes scalar inputs x_i in [x_min, x_max]
- Encodes each into a bitstream via BitstreamEncoder
- Passes them through BitstreamSynapses
- Decodes the realised post-synaptic bitstreams into a per-cycle current trace for neuron simulation.
Static inputs and weights are encoded once at construction time. The stochastic realisation is then fixed until a new source is constructed with different parameters or seeds.
Source code in src/sc_neurocore/sources/bitstream_current_source.py
| Python | |
|---|---|
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |
current_trace()
¶
Return the realised per-cycle decoded current trace.
The returned trace is computed from the fixed post-synaptic
bitstreams generated during construction. It is therefore the
exact sequence consumed by repeated step() calls, not a
separate probability-space approximation.
Source code in src/sc_neurocore/sources/bitstream_current_source.py
| Python | |
|---|---|
145 146 147 148 149 150 151 152 153 154 | |
step()
¶
Return the current I_t at the current time index and advance.
step() returns the t-th element of current_trace() and
clamps at the final element after the bitstream is exhausted.
Source code in src/sc_neurocore/sources/bitstream_current_source.py
| Python | |
|---|---|
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
full_current_estimate()
¶
Return the mean current over the realised bitstream duration.
Source code in src/sc_neurocore/sources/bitstream_current_source.py
| Python | |
|---|---|
172 173 174 175 176 | |
Quantum Entropy Source¶
Optional integration with quantum random number generators (Qiskit, PennyLane) for true randomness in SC encoding.
sc_neurocore.sources.quantum_entropy
¶
QuantumEntropySource
dataclass
¶
Generates entropy based on simulated Quantum Measurement Collapse. Used to inject 'True' (Simulated) Quantum Indeterminacy into Neural Models.
Physics: - Maintains a Qubit State |psi> - Applies Hadamard (Superposition) and Phase Rotations - Measures (Collapse) to generate noise
Source code in src/sc_neurocore/sources/quantum_entropy.py
| Python | |
|---|---|
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
sample_normal(mean=0.0, std=1.0)
¶
Two independent measurements → Box-Muller → Gaussian sample.
Discrete outcomes dithered with uniform jitter for continuous input.
Source code in src/sc_neurocore/sources/quantum_entropy.py
| Python | |
|---|---|
64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |