@aleph-ai/tinyaleph 1.4.2 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/backends/bioinformatics/binding.js +44 -52
  2. package/backends/bioinformatics/dna-computing.js +14 -23
  3. package/backends/bioinformatics/encoding.js +22 -30
  4. package/backends/bioinformatics/folding.js +24 -32
  5. package/backends/bioinformatics/genetic-code.js +17 -21
  6. package/backends/bioinformatics/index.js +12 -12
  7. package/backends/bioinformatics/transcription.js +5 -3
  8. package/backends/bioinformatics/translation.js +6 -4
  9. package/backends/cryptographic/index.js +10 -9
  10. package/backends/index.js +7 -6
  11. package/backends/interface.js +4 -1
  12. package/backends/scientific/index.js +7 -4
  13. package/backends/semantic/index.js +7 -4
  14. package/backends/semantic/surface.js +2 -1
  15. package/backends/semantic/two-layer.js +5 -3
  16. package/core/beacon.js +10 -9
  17. package/core/compound.js +4 -4
  18. package/core/crt-homology.js +5 -5
  19. package/core/enochian-vocabulary.js +5 -17
  20. package/core/enochian.js +3 -2
  21. package/core/entanglement.js +7 -7
  22. package/core/errors.js +2 -10
  23. package/core/events.js +7 -6
  24. package/core/fano.js +7 -6
  25. package/core/hilbert.js +40 -34
  26. package/core/hypercomplex.js +4 -2
  27. package/core/index.js +42 -80
  28. package/core/inference.js +6 -6
  29. package/core/lambda.js +5 -18
  30. package/core/llm.js +1 -1
  31. package/core/logger.js +3 -4
  32. package/core/prime.js +26 -1
  33. package/core/quaternion-semantics.js +3 -3
  34. package/core/reduction.js +5 -21
  35. package/core/resonance.js +2 -1
  36. package/core/rformer-crt.js +15 -29
  37. package/core/rformer-layers.js +12 -14
  38. package/core/rformer-tf.js +34 -43
  39. package/core/rformer.js +17 -32
  40. package/core/sieve.js +8 -3
  41. package/core/symbols/archetypes.js +3 -3
  42. package/core/symbols/base.js +4 -4
  43. package/core/symbols/elements.js +2 -2
  44. package/core/symbols/hieroglyphs.js +3 -3
  45. package/core/symbols/iching.js +3 -3
  46. package/core/symbols/index.js +32 -18
  47. package/core/symbols/tarot.js +2 -2
  48. package/core/symbols.js +1 -0
  49. package/core/topology.js +3 -14
  50. package/core/types.js +3 -14
  51. package/engine/aleph.js +8 -6
  52. package/engine/index.js +4 -2
  53. package/index.js +3 -2
  54. package/modular.js +18 -41
  55. package/package.json +17 -5
  56. package/physics/collapse.js +10 -11
  57. package/physics/entropy.js +8 -8
  58. package/physics/index.js +70 -102
  59. package/physics/kuramoto-coupled-ladder.js +10 -14
  60. package/physics/kuramoto.js +5 -2
  61. package/physics/lyapunov.js +7 -7
  62. package/physics/oscillator.js +2 -1
  63. package/physics/primeon_z_ladder_multi.js +7 -9
  64. package/physics/primeon_z_ladder_u.js +8 -9
  65. package/physics/stochastic-kuramoto.js +7 -7
  66. package/physics/sync-models.js +11 -14
  67. package/telemetry/index.js +24 -0
  68. package/telemetry/metrics.js +3 -8
package/core/topology.js CHANGED
@@ -15,8 +15,6 @@
15
15
  * - Fine structure constant: α⁻¹ = 108 + 29 = 137
16
16
  */
17
17
 
18
- const { TWIST_108, factorize, isPrime } = require('./prime');
19
-
20
18
  // ============================================================================
21
19
  // KNOT INVARIANTS
22
20
  // ============================================================================
@@ -24,6 +22,8 @@ const { TWIST_108, factorize, isPrime } = require('./prime');
24
22
  /**
25
23
  * Knot class representing a mathematical knot with topological invariants
26
24
  */
25
+ import { TWIST_108, factorize, isPrime } from './prime.js';
26
+
27
27
  class Knot {
28
28
  /**
29
29
  * Create a knot with specified invariants
@@ -627,29 +627,18 @@ class FreeEnergyDynamics {
627
627
  // EXPORTS
628
628
  // ============================================================================
629
629
 
630
- module.exports = {
631
- // Knot classes
630
+ export {
632
631
  Knot,
633
-
634
- // Standard knots
635
632
  UNKNOT,
636
633
  TREFOIL,
637
634
  FIGURE_EIGHT,
638
635
  CINQUEFOIL,
639
636
  THREE_TWIST,
640
637
  STANDARD_KNOTS,
641
-
642
- // Physical constants
643
638
  PhysicalConstants,
644
-
645
- // Observer hierarchy
646
639
  OBSERVER_HIERARCHY,
647
640
  getObserverLevel,
648
641
  observerCapacity,
649
-
650
- // Gauge symmetry
651
642
  GaugeSymmetry,
652
-
653
- // Free energy dynamics
654
643
  FreeEnergyDynamics
655
644
  };
package/core/types.js CHANGED
@@ -13,8 +13,6 @@
13
13
  * - Full typing judgments Γ ⊢ e : T
14
14
  */
15
15
 
16
- const { isPrime, firstNPrimes } = require('./prime');
17
-
18
16
  // ============================================================================
19
17
  // TYPE DEFINITIONS
20
18
  // ============================================================================
@@ -22,6 +20,8 @@ const { isPrime, firstNPrimes } = require('./prime');
22
20
  /**
23
21
  * Type constants for the type system
24
22
  */
23
+ import { isPrime, firstNPrimes } from './prime.js';
24
+
25
25
  const Types = {
26
26
  NOUN: 'N',
27
27
  ADJECTIVE: 'A',
@@ -878,31 +878,20 @@ function IMPL(s1, s2) {
878
878
  // EXPORTS
879
879
  // ============================================================================
880
880
 
881
- module.exports = {
882
- // Type constants
881
+ export {
883
882
  Types,
884
-
885
- // Base class
886
883
  Term,
887
-
888
- // Term classes
889
884
  NounTerm,
890
885
  AdjTerm,
891
886
  ChainTerm,
892
887
  FusionTerm,
893
-
894
- // Sentence classes
895
888
  SentenceTerm,
896
889
  NounSentence,
897
890
  SeqSentence,
898
891
  ImplSentence,
899
-
900
- // Typing system
901
892
  TypingContext,
902
893
  TypingJudgment,
903
894
  TypeChecker,
904
-
905
- // Builders
906
895
  N,
907
896
  A,
908
897
  FUSE,
package/engine/aleph.js CHANGED
@@ -6,11 +6,11 @@
6
6
  * We excite the field, evolve it, and sample at coherent emission moments.
7
7
  */
8
8
 
9
- const { Hypercomplex } = require('../core/hypercomplex');
10
- const { KuramotoModel } = require('../physics/kuramoto');
11
- const { stateEntropy, coherence } = require('../physics/entropy');
12
- const { estimateLyapunov, adaptiveCoupling, classifyStability } = require('../physics/lyapunov');
13
- const { collapseProbability, shouldCollapse, bornMeasurement } = require('../physics/collapse');
9
+ import { Hypercomplex } from '../core/hypercomplex.js';
10
+ import { KuramotoModel } from '../physics/kuramoto.js';
11
+ import { stateEntropy, coherence } from '../physics/entropy.js';
12
+ import { estimateLyapunov, adaptiveCoupling, classifyStability } from '../physics/lyapunov.js';
13
+ import { collapseProbability, shouldCollapse, bornMeasurement } from '../physics/collapse.js';
14
14
 
15
15
  class AlephEngine {
16
16
  constructor(backend, options = {}) {
@@ -415,4 +415,6 @@ class AlephEngine {
415
415
  }
416
416
  }
417
417
 
418
- module.exports = { AlephEngine };
418
+ export {
419
+ AlephEngine
420
+ };
package/engine/index.js CHANGED
@@ -2,6 +2,8 @@
2
2
  * Engine - exports unified AlephEngine
3
3
  */
4
4
 
5
- const { AlephEngine } = require('./aleph');
5
+ import { AlephEngine } from './aleph.js';
6
6
 
7
- module.exports = { AlephEngine };
7
+ export {
8
+ AlephEngine
9
+ };
package/index.js CHANGED
@@ -11,7 +11,7 @@
11
11
  * - Multiple backends (semantic, cryptographic, scientific)
12
12
  *
13
13
  * @example
14
- * const { createEngine } = require('@aleph-ai/tinyaleph');
14
+ * import { createEngine } from '@aleph-ai/tinyaleph';
15
15
  *
16
16
  * const engine = createEngine('semantic', config);
17
17
  * const result = engine.run('What is wisdom?');
@@ -20,4 +20,5 @@
20
20
  * @module @aleph-ai/tinyaleph
21
21
  */
22
22
 
23
- module.exports = require('./modular');
23
+ export * from './modular.js';
24
+ export { default } from './modular.js';
package/modular.js CHANGED
@@ -24,28 +24,26 @@
24
24
  */
25
25
 
26
26
  // Core mathematical foundation
27
- const core = require('./core');
27
+ import core from './core/index.js';
28
28
 
29
29
  // Enochian Packet Layer (Section 7.4 of whitepaper)
30
- const enochian = require('./core/enochian');
31
- const enochianVocabulary = require('./core/enochian-vocabulary');
30
+ import enochian from './core/enochian.js';
31
+ import enochianVocabulary from './core/enochian-vocabulary.js';
32
32
 
33
33
  // Browser-compatible utilities (extracted from apps/sentient)
34
- const errors = require('./core/errors');
35
- const logger = require('./core/logger');
36
- const metrics = require('./telemetry/metrics');
37
- const transport = require('./transport');
38
- const profiling = require('./profiling/primitives');
34
+ import errors from './core/errors.js';
35
+ import logger from './core/logger.js';
36
+ import metrics from './telemetry/metrics.js';
39
37
 
40
38
  // Observer architecture (Sentient Observer core modules)
41
- const smf = require('./observer/smf');
42
- const prsc = require('./observer/prsc');
43
- const temporal = require('./observer/temporal');
44
- const entanglement = require('./observer/entanglement');
45
- const agency = require('./observer/agency');
46
- const boundary = require('./observer/boundary');
47
- const safety = require('./observer/safety');
48
- const hqe = require('./observer/hqe');
39
+ import smf from './observer/smf.js';
40
+ import prsc from './observer/prsc.js';
41
+ import temporal from './observer/temporal.js';
42
+ import entanglement from './observer/entanglement.js';
43
+ import agency from './observer/agency.js';
44
+ import boundary from './observer/boundary.js';
45
+ import safety from './observer/safety.js';
46
+ import hqe from './observer/hqe.js';
49
47
  const {
50
48
  Hypercomplex,
51
49
  FANO_LINES,
@@ -101,7 +99,7 @@ const {
101
99
  } = core;
102
100
 
103
101
  // Physics engine
104
- const physics = require('./physics');
102
+ import physics from './physics/index.js';
105
103
  const {
106
104
  Oscillator,
107
105
  OscillatorBank,
@@ -160,7 +158,7 @@ const {
160
158
  } = physics;
161
159
 
162
160
  // Domain backends
163
- const backends = require('./backends');
161
+ import backends from './backends/index.js';
164
162
  const {
165
163
  Backend,
166
164
  SemanticBackend,
@@ -180,7 +178,7 @@ const {
180
178
  } = backends;
181
179
 
182
180
  // Unified engine
183
- const engine = require('./engine');
181
+ import engine from './engine/index.js';
184
182
  const { AlephEngine } = engine;
185
183
 
186
184
  /**
@@ -231,7 +229,7 @@ function deriveKey(password, salt, length = 32, iterations = 10000) {
231
229
  return backend.deriveKey(password, salt, length, iterations);
232
230
  }
233
231
 
234
- module.exports = {
232
+ export default {
235
233
  // Main engine
236
234
  AlephEngine,
237
235
  createEngine,
@@ -413,27 +411,6 @@ module.exports = {
413
411
  MetricRegistry: metrics.MetricRegistry,
414
412
  MetricType: metrics.MetricType,
415
413
 
416
- // Transport
417
- transport,
418
- Transport: transport.Transport,
419
- WebSocketTransport: transport.WebSocketTransport,
420
- SSETransport: transport.SSETransport,
421
- MemoryTransport: transport.MemoryTransport,
422
- PollingTransport: transport.PollingTransport,
423
- TransportManager: transport.TransportManager,
424
- TransportState: transport.TransportState,
425
-
426
- // Profiling primitives
427
- profiling,
428
- RingBuffer: profiling.RingBuffer,
429
- Timer: profiling.Timer,
430
- Sampler: profiling.Sampler,
431
- RateCalculator: profiling.RateCalculator,
432
- MovingAverage: profiling.MovingAverage,
433
- Profiler: profiling.Profiler,
434
- hrtime: profiling.hrtime,
435
- hrtimeNs: profiling.hrtimeNs,
436
-
437
414
  // Observer Architecture (Sentient Observer core)
438
415
  // SMF - Sedenion Memory Field
439
416
  smf,
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "@aleph-ai/tinyaleph",
3
- "version": "1.4.2",
3
+ "version": "1.5.1",
4
4
  "description": "Prime-resonant semantic computing framework - hypercomplex algebra, oscillator dynamics, and entropy-minimizing reasoning",
5
+ "type": "module",
5
6
  "main": "index.js",
7
+ "module": "index.js",
6
8
  "types": "types/index.d.ts",
7
9
  "exports": {
8
10
  ".": {
@@ -27,8 +29,8 @@
27
29
  "import": "./engine/index.js"
28
30
  },
29
31
  "./telemetry": {
30
- "require": "./telemetry/metrics.js",
31
- "import": "./telemetry/metrics.js"
32
+ "require": "./telemetry/index.js",
33
+ "import": "./telemetry/index.js"
32
34
  }
33
35
  },
34
36
  "scripts": {
@@ -78,7 +80,7 @@
78
80
  },
79
81
  "homepage": "https://github.com/aleph-ai/tinyaleph#readme",
80
82
  "engines": {
81
- "node": ">=14.0.0"
83
+ "node": ">=16.0.0"
82
84
  },
83
85
  "files": [
84
86
  "index.js",
@@ -99,7 +101,17 @@
99
101
  },
100
102
  "dependencies": {
101
103
  "@noble/curves": "^1.9.7",
102
- "@sschepis/resolang": "^0.4.1",
104
+ "@sschepis/resolang": "^0.4.1"
105
+ },
106
+ "optionalDependencies": {
103
107
  "@tensorflow/tfjs-node": "^4.22.0"
108
+ },
109
+ "peerDependencies": {
110
+ "@tensorflow/tfjs": "^4.0.0"
111
+ },
112
+ "peerDependenciesMeta": {
113
+ "@tensorflow/tfjs": {
114
+ "optional": true
115
+ }
104
116
  }
105
117
  }
@@ -2,6 +2,8 @@
2
2
  * Quantum-inspired state collapse mechanics
3
3
  */
4
4
 
5
+ import { Hypercomplex } from '../core/hypercomplex.js';
6
+
5
7
  function collapseProbability(entropyIntegral, lyapunovFactor = 1) {
6
8
  const factor = lyapunovFactor < 0 ? 1.5 : 0.5;
7
9
  return (1 - Math.exp(-entropyIntegral)) * factor;
@@ -28,7 +30,6 @@ function measureState(hypercomplex, basis = null) {
28
30
  * Collapse state to a specific basis vector
29
31
  */
30
32
  function collapseToIndex(hypercomplex, index) {
31
- const { Hypercomplex } = require('../core/hypercomplex');
32
33
  const collapsed = Hypercomplex.zero(hypercomplex.dim);
33
34
  collapsed.c[index] = hypercomplex.c[index] >= 0 ? 1 : -1;
34
35
  return collapsed;
@@ -58,7 +59,6 @@ function bornMeasurement(hypercomplex) {
58
59
  * Partial collapse: mix between current state and collapsed state
59
60
  */
60
61
  function partialCollapse(hypercomplex, targetIndex, strength = 0.5) {
61
- const { Hypercomplex } = require('../core/hypercomplex');
62
62
  const collapsed = Hypercomplex.zero(hypercomplex.dim);
63
63
  const sign = hypercomplex.c[targetIndex] >= 0 ? 1 : -1;
64
64
  collapsed.c[targetIndex] = sign;
@@ -75,7 +75,6 @@ function partialCollapse(hypercomplex, targetIndex, strength = 0.5) {
75
75
  * Decoherence: gradual loss of quantum coherence
76
76
  */
77
77
  function applyDecoherence(hypercomplex, rate = 0.1) {
78
- const { Hypercomplex } = require('../core/hypercomplex');
79
78
  const result = Hypercomplex.zero(hypercomplex.dim);
80
79
  for (let i = 0; i < hypercomplex.dim; i++) {
81
80
  // Add small random noise proportional to rate
@@ -84,12 +83,12 @@ function applyDecoherence(hypercomplex, rate = 0.1) {
84
83
  return result.normalize();
85
84
  }
86
85
 
87
- module.exports = {
88
- collapseProbability,
89
- shouldCollapse,
90
- measureState,
91
- collapseToIndex,
92
- bornMeasurement,
93
- partialCollapse,
94
- applyDecoherence
86
+ export {
87
+ collapseProbability,
88
+ shouldCollapse,
89
+ measureState,
90
+ collapseToIndex,
91
+ bornMeasurement,
92
+ partialCollapse,
93
+ applyDecoherence
95
94
  };
@@ -77,12 +77,12 @@ function oscillatorEntropy(bank) {
77
77
  return shannonEntropy(probs);
78
78
  }
79
79
 
80
- module.exports = {
81
- shannonEntropy,
82
- stateEntropy,
83
- coherence,
84
- mutualInformation,
85
- relativeEntropy,
86
- jointEntropy,
87
- oscillatorEntropy
80
+ export {
81
+ shannonEntropy,
82
+ stateEntropy,
83
+ coherence,
84
+ mutualInformation,
85
+ relativeEntropy,
86
+ jointEntropy,
87
+ oscillatorEntropy
88
88
  };
package/physics/index.js CHANGED
@@ -2,146 +2,114 @@
2
2
  * Physics engine - exports all physics modules
3
3
  */
4
4
 
5
- const { Oscillator, OscillatorBank } = require('./oscillator');
6
- const { KuramotoModel } = require('./kuramoto');
7
- const {
8
- shannonEntropy,
5
+ import { Oscillator, OscillatorBank } from './oscillator.js';
6
+ import { KuramotoModel } from './kuramoto.js';
7
+
8
+ import { shannonEntropy,
9
9
  stateEntropy,
10
10
  coherence,
11
11
  mutualInformation,
12
12
  relativeEntropy,
13
13
  jointEntropy,
14
- oscillatorEntropy
15
- } = require('./entropy');
16
- const {
17
- estimateLyapunov,
14
+ oscillatorEntropy } from './entropy.js';
15
+ import { estimateLyapunov,
18
16
  classifyStability,
19
17
  adaptiveCoupling,
20
18
  localLyapunov,
21
19
  delayEmbedding,
22
- stabilityMargin
23
- } = require('./lyapunov');
24
- const {
25
- collapseProbability,
20
+ stabilityMargin } from './lyapunov.js';
21
+ import { collapseProbability,
26
22
  shouldCollapse,
27
23
  measureState,
28
24
  collapseToIndex,
29
25
  bornMeasurement,
30
26
  partialCollapse,
31
- applyDecoherence
32
- } = require('./collapse');
27
+ applyDecoherence } from './collapse.js';
33
28
 
34
29
  // Extended synchronization models
35
- const {
36
- NetworkKuramoto,
30
+ import { NetworkKuramoto,
37
31
  AdaptiveKuramoto,
38
32
  SakaguchiKuramoto,
39
33
  SmallWorldKuramoto,
40
34
  MultiSystemCoupling,
41
35
  createHierarchicalCoupling,
42
- createPeerCoupling
43
- } = require('./sync-models');
36
+ createPeerCoupling } from './sync-models.js';
44
37
 
45
38
  // Stochastic Kuramoto models
46
- const {
47
- StochasticKuramoto,
39
+ import { StochasticKuramoto,
48
40
  ColoredNoiseKuramoto,
49
41
  ThermalKuramoto,
50
- gaussianRandom
51
- } = require('./stochastic-kuramoto');
42
+ gaussianRandom } from './stochastic-kuramoto.js';
52
43
 
53
44
  // Primeon Z-Ladder with canonical U evolution
54
- const {
55
- PrimeonZLadderU,
45
+ import { PrimeonZLadderU,
56
46
  createPrimeonLadder,
57
47
  shannonEntropyNats,
58
48
  probsOf,
59
- normalize: normalizeComplex,
60
- C: Complex
61
- } = require('./primeon_z_ladder_u');
49
+ normalize as normalizeComplex,
50
+ C as Complex } from './primeon_z_ladder_u.js';
62
51
 
63
52
  // Multi-channel Primeon Z-Ladder
64
- const {
65
- ZChannel,
53
+ import { ZChannel,
66
54
  PrimeonZLadderMulti,
67
55
  createMultiChannelLadder,
68
- createAdiabaticSchedule
69
- } = require('./primeon_z_ladder_multi');
56
+ createAdiabaticSchedule } from './primeon_z_ladder_multi.js';
70
57
 
71
58
  // Kuramoto-coupled ladder (hybrid quantum + oscillator dynamics)
72
- const {
73
- KuramotoCoupledLadder,
59
+ import { KuramotoCoupledLadder,
74
60
  createKuramotoLadder,
75
61
  runCollapsePressureExperiment,
76
62
  kuramotoOrderParameter,
77
- getPhase
78
- } = require('./kuramoto-coupled-ladder');
63
+ getPhase } from './kuramoto-coupled-ladder.js';
79
64
 
80
- module.exports = {
81
- // Oscillators
82
- Oscillator,
83
- OscillatorBank,
84
- KuramotoModel,
85
-
86
- // Extended synchronization models
87
- NetworkKuramoto,
88
- AdaptiveKuramoto,
89
- SakaguchiKuramoto,
90
- SmallWorldKuramoto,
91
- MultiSystemCoupling,
92
- createHierarchicalCoupling,
93
- createPeerCoupling,
94
-
95
- // Stochastic Kuramoto models
96
- StochasticKuramoto,
97
- ColoredNoiseKuramoto,
98
- ThermalKuramoto,
99
- gaussianRandom,
100
-
101
- // Primeon Z-Ladder (canonical U evolution)
102
- PrimeonZLadderU,
103
- createPrimeonLadder,
104
- shannonEntropyNats,
105
- probsOf,
106
- normalizeComplex,
107
- Complex,
108
-
109
- // Multi-channel Primeon Z-Ladder
110
- ZChannel,
111
- PrimeonZLadderMulti,
112
- createMultiChannelLadder,
113
- createAdiabaticSchedule,
114
-
115
- // Kuramoto-coupled ladder (hybrid model)
116
- KuramotoCoupledLadder,
117
- createKuramotoLadder,
118
- runCollapsePressureExperiment,
119
- kuramotoOrderParameter,
120
- getPhase,
121
-
122
- // Entropy & Information
123
- shannonEntropy,
124
- stateEntropy,
125
- coherence,
126
- mutualInformation,
127
- relativeEntropy,
128
- jointEntropy,
129
- oscillatorEntropy,
130
-
131
- // Lyapunov stability
132
- estimateLyapunov,
133
- classifyStability,
134
- adaptiveCoupling,
135
- localLyapunov,
136
- delayEmbedding,
137
- stabilityMargin,
138
-
139
- // State collapse
140
- collapseProbability,
141
- shouldCollapse,
142
- measureState,
143
- collapseToIndex,
144
- bornMeasurement,
145
- partialCollapse,
146
- applyDecoherence
65
+ export {
66
+ Oscillator,
67
+ OscillatorBank,
68
+ KuramotoModel,
69
+ NetworkKuramoto,
70
+ AdaptiveKuramoto,
71
+ SakaguchiKuramoto,
72
+ SmallWorldKuramoto,
73
+ MultiSystemCoupling,
74
+ createHierarchicalCoupling,
75
+ createPeerCoupling,
76
+ StochasticKuramoto,
77
+ ColoredNoiseKuramoto,
78
+ ThermalKuramoto,
79
+ gaussianRandom,
80
+ PrimeonZLadderU,
81
+ createPrimeonLadder,
82
+ shannonEntropyNats,
83
+ probsOf,
84
+ normalizeComplex,
85
+ Complex,
86
+ ZChannel,
87
+ PrimeonZLadderMulti,
88
+ createMultiChannelLadder,
89
+ createAdiabaticSchedule,
90
+ KuramotoCoupledLadder,
91
+ createKuramotoLadder,
92
+ runCollapsePressureExperiment,
93
+ kuramotoOrderParameter,
94
+ getPhase,
95
+ shannonEntropy,
96
+ stateEntropy,
97
+ coherence,
98
+ mutualInformation,
99
+ relativeEntropy,
100
+ jointEntropy,
101
+ oscillatorEntropy,
102
+ estimateLyapunov,
103
+ classifyStability,
104
+ adaptiveCoupling,
105
+ localLyapunov,
106
+ delayEmbedding,
107
+ stabilityMargin,
108
+ collapseProbability,
109
+ shouldCollapse,
110
+ measureState,
111
+ collapseToIndex,
112
+ bornMeasurement,
113
+ partialCollapse,
114
+ applyDecoherence
147
115
  };
@@ -21,19 +21,15 @@
21
21
 
22
22
  'use strict';
23
23
 
24
- const {
25
- PrimeonZLadderMulti,
24
+ import { PrimeonZLadderMulti,
26
25
  ZChannel,
27
26
  createMultiChannelLadder,
28
- createAdiabaticSchedule
29
- } = require('./primeon_z_ladder_multi');
27
+ createAdiabaticSchedule } from './primeon_z_ladder_multi.js';
30
28
 
31
- const {
32
- C,
29
+ import { C,
33
30
  shannonEntropyNats,
34
31
  probsOf,
35
- normalize
36
- } = require('./primeon_z_ladder_u');
32
+ normalize } from './primeon_z_ladder_u.js';
37
33
 
38
34
  /**
39
35
  * Extract phase from complex number
@@ -594,10 +590,10 @@ function runCollapsePressureExperiment(opts = {}) {
594
590
  return results;
595
591
  }
596
592
 
597
- module.exports = {
598
- KuramotoCoupledLadder,
599
- createKuramotoLadder,
600
- runCollapsePressureExperiment,
601
- kuramotoOrderParameter,
602
- getPhase
593
+ export {
594
+ KuramotoCoupledLadder,
595
+ createKuramotoLadder,
596
+ runCollapsePressureExperiment,
597
+ kuramotoOrderParameter,
598
+ getPhase
603
599
  };
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Kuramoto synchronization dynamics
3
3
  */
4
- const { OscillatorBank } = require('./oscillator');
4
+
5
+ import { OscillatorBank } from './oscillator.js';
5
6
 
6
7
  class KuramotoModel extends OscillatorBank {
7
8
  constructor(frequencies, couplingStrength = 0.3) {
@@ -88,4 +89,6 @@ class KuramotoModel extends OscillatorBank {
88
89
  }
89
90
  }
90
91
 
91
- module.exports = { KuramotoModel };
92
+ export {
93
+ KuramotoModel
94
+ };