/ src / data / knowledgeNodes.ts
knowledgeNodes.ts
  1  
  2  export interface KnowledgeNodeBlock {
  3    id: string;
  4    title: string;
  5    content: string;
  6    verificationPercentage: number;
  7    links: { title: string; slug: string }[];
  8  }
  9  
 10  export interface KnowledgeNode {
 11    id: string;
 12    title: string;
 13    slug: string;
 14    description: string;
 15    verificationPercentage: number;
 16    blocks: KnowledgeNodeBlock[];
 17    relatedNodes: string[]; // Array of node IDs
 18  }
 19  
 20  const knowledgeNodes: KnowledgeNode[] = [
 21    {
 22      id: "node-1",
 23      title: "Quantum Computing Fundamentals",
 24      slug: "quantum-computing-fundamentals",
 25      description: "An introduction to the basic principles of quantum computing and quantum mechanics.",
 26      verificationPercentage: 87,
 27      blocks: [
 28        {
 29          id: "block-1-1",
 30          title: "What is Quantum Computing?",
 31          content: "Quantum computing is a type of computation that harnesses quantum mechanical phenomena like superposition and entanglement to perform operations on data. Unlike classical computing that uses bits (0s and 1s), quantum computing uses quantum bits or qubits that can exist in multiple states simultaneously.",
 32          verificationPercentage: 95,
 33          links: [
 34            { title: "Superposition", slug: "quantum-superposition" },
 35            { title: "Quantum Entanglement", slug: "quantum-entanglement" },
 36            { title: "Qubits", slug: "quantum-bits" }
 37          ]
 38        },
 39        {
 40          id: "block-1-2",
 41          title: "Quantum vs. Classical Computing",
 42          content: "Classical computers use bits as the smallest unit of data, where each bit can be either 0 or 1. Quantum computers use qubits, which can be in a superposition of both 0 and 1 states simultaneously. This allows quantum computers to process a vastly higher number of possibilities simultaneously for certain types of problems.",
 43          verificationPercentage: 88,
 44          links: [
 45            { title: "Classical Computing", slug: "classical-computing" },
 46            { title: "Quantum Advantage", slug: "quantum-advantage" }
 47          ]
 48        },
 49        {
 50          id: "block-1-3",
 51          title: "Quantum Gates and Circuits",
 52          content: "Quantum circuits consist of a sequence of quantum gates, which are operations that manipulate qubits. Common quantum gates include the Hadamard gate (which creates superposition), the CNOT gate (which creates entanglement), and the Pauli gates (which perform rotations). Quantum algorithms are implemented using these gates.",
 53          verificationPercentage: 78,
 54          links: [
 55            { title: "Quantum Gates", slug: "quantum-gates" },
 56            { title: "Quantum Algorithms", slug: "quantum-algorithms" },
 57            { title: "Hadamard Transform", slug: "hadamard-transform" }
 58          ]
 59        }
 60      ],
 61      relatedNodes: ["node-2", "node-3", "node-5"]
 62    },
 63    {
 64      id: "node-2",
 65      title: "Quantum Superposition",
 66      slug: "quantum-superposition",
 67      description: "The quantum mechanical phenomenon where particles exist in multiple states simultaneously.",
 68      verificationPercentage: 92,
 69      blocks: [
 70        {
 71          id: "block-2-1",
 72          title: "Definition of Superposition",
 73          content: "In quantum mechanics, superposition refers to the ability of a quantum system to exist in multiple states simultaneously until it is measured or observed. This is one of the fundamental principles that distinguishes quantum mechanics from classical physics.",
 74          verificationPercentage: 98,
 75          links: [
 76            { title: "Wave Function", slug: "wave-function" },
 77            { title: "Quantum Measurement", slug: "quantum-measurement" }
 78          ]
 79        },
 80        {
 81          id: "block-2-2",
 82          title: "Mathematical Representation",
 83          content: "Superposition is mathematically represented as a linear combination of possible states. For a qubit, it can be written as |ψ⟩ = α|0⟩ + β|1⟩, where α and β are complex probability amplitudes, and |α|² + |β|² = 1 to ensure total probability equals 1.",
 84          verificationPercentage: 85,
 85          links: [
 86            { title: "Dirac Notation", slug: "dirac-notation" },
 87            { title: "Hilbert Space", slug: "hilbert-space" }
 88          ]
 89        },
 90        {
 91          id: "block-2-3",
 92          title: "Implications and Applications",
 93          content: "Superposition enables quantum computers to process multiple possibilities simultaneously, leading to computational advantages for certain problems like factoring large numbers (Shor's algorithm) and searching unsorted databases (Grover's algorithm).",
 94          verificationPercentage: 93,
 95          links: [
 96            { title: "Shor's Algorithm", slug: "shors-algorithm" },
 97            { title: "Grover's Algorithm", slug: "grovers-algorithm" },
 98            { title: "Quantum Parallelism", slug: "quantum-parallelism" }
 99          ]
100        }
101      ],
102      relatedNodes: ["node-1", "node-3", "node-7"]
103    },
104    {
105      id: "node-3",
106      title: "Quantum Entanglement",
107      slug: "quantum-entanglement",
108      description: "A quantum phenomenon where particles become correlated and the quantum state of each particle cannot be described independently.",
109      verificationPercentage: 89,
110      blocks: [
111        {
112          id: "block-3-1",
113          title: "The Phenomenon of Entanglement",
114          content: "Quantum entanglement occurs when pairs or groups of particles interact in such a way that the quantum state of each particle cannot be described independently of the state of the others. This is true even when the particles are separated by large distances - a phenomenon Einstein famously called 'spooky action at a distance.'",
115          verificationPercentage: 94,
116          links: [
117            { title: "Bell's Theorem", slug: "bells-theorem" },
118            { title: "EPR Paradox", slug: "epr-paradox" }
119          ]
120        },
121        {
122          id: "block-3-2",
123          title: "Creating Entangled States",
124          content: "Entangled states can be created through various quantum interactions. In quantum computing, entanglement is typically created using gates like the CNOT (controlled-NOT) gate, which flips the state of a target qubit conditional on the state of a control qubit.",
125          verificationPercentage: 82,
126          links: [
127            { title: "CNOT Gate", slug: "cnot-gate" },
128            { title: "Bell States", slug: "bell-states" }
129          ]
130        },
131        {
132          id: "block-3-3",
133          title: "Applications of Entanglement",
134          content: "Entanglement is a crucial resource for many quantum technologies, including quantum computing, quantum cryptography, and quantum teleportation. It enables secure communication through quantum key distribution protocols like BB84 and E91.",
135          verificationPercentage: 91,
136          links: [
137            { title: "Quantum Cryptography", slug: "quantum-cryptography" },
138            { title: "Quantum Teleportation", slug: "quantum-teleportation" },
139            { title: "Quantum Key Distribution", slug: "quantum-key-distribution" }
140          ]
141        }
142      ],
143      relatedNodes: ["node-1", "node-2", "node-4"]
144    },
145    {
146      id: "node-4",
147      title: "Quantum Cryptography",
148      slug: "quantum-cryptography",
149      description: "The use of quantum mechanical properties to perform cryptographic tasks with unconditional security.",
150      verificationPercentage: 76,
151      blocks: [
152        {
153          id: "block-4-1",
154          title: "Principles of Quantum Cryptography",
155          content: "Quantum cryptography uses the principles of quantum mechanics to secure communication. Unlike classical cryptographic systems whose security relies on computational complexity, quantum cryptography offers security based on the fundamental laws of physics, specifically the no-cloning theorem and the uncertainty principle.",
156          verificationPercentage: 88,
157          links: [
158            { title: "No-Cloning Theorem", slug: "no-cloning-theorem" },
159            { title: "Uncertainty Principle", slug: "uncertainty-principle" }
160          ]
161        },
162        {
163          id: "block-4-2",
164          title: "Quantum Key Distribution",
165          content: "The most developed application of quantum cryptography is Quantum Key Distribution (QKD), which allows two parties to produce a shared random secret key known only to them. Any eavesdropping attempt introduces detectable errors in the system, alerting the communicating parties.",
166          verificationPercentage: 79,
167          links: [
168            { title: "BB84 Protocol", slug: "bb84-protocol" },
169            { title: "E91 Protocol", slug: "e91-protocol" },
170            { title: "Quantum Key Distribution", slug: "quantum-key-distribution" }
171          ]
172        },
173        {
174          id: "block-4-3",
175          title: "Challenges and Limitations",
176          content: "While quantum cryptography offers theoretical unconditional security, practical implementations face challenges like quantum decoherence, limited transmission distances, and side-channel attacks that exploit physical implementation vulnerabilities rather than the protocol itself.",
177          verificationPercentage: 61,
178          links: [
179            { title: "Quantum Decoherence", slug: "quantum-decoherence" },
180            { title: "Side-Channel Attacks", slug: "side-channel-attacks" }
181          ]
182        }
183      ],
184      relatedNodes: ["node-3", "node-8"]
185    },
186    {
187      id: "node-5",
188      title: "Quantum Algorithms",
189      slug: "quantum-algorithms",
190      description: "Algorithms designed to run on quantum computers that provide advantages over classical algorithms.",
191      verificationPercentage: 83,
192      blocks: [
193        {
194          id: "block-5-1",
195          title: "Introduction to Quantum Algorithms",
196          content: "Quantum algorithms are designed to run on quantum computers and can solve certain problems more efficiently than the best-known classical algorithms. These algorithms leverage quantum phenomena like superposition, entanglement, and quantum interference to achieve computational speedups.",
197          verificationPercentage: 90,
198          links: [
199            { title: "Quantum Speedup", slug: "quantum-speedup" },
200            { title: "Quantum Interference", slug: "quantum-interference" }
201          ]
202        },
203        {
204          id: "block-5-2",
205          title: "Key Quantum Algorithms",
206          content: "Notable quantum algorithms include Shor's algorithm for factoring large integers (with implications for cryptography), Grover's algorithm for searching unstructured databases, and quantum simulation algorithms that model quantum systems more efficiently than classical computers.",
207          verificationPercentage: 86,
208          links: [
209            { title: "Shor's Algorithm", slug: "shors-algorithm" },
210            { title: "Grover's Algorithm", slug: "grovers-algorithm" },
211            { title: "Quantum Simulation", slug: "quantum-simulation" }
212          ]
213        },
214        {
215          id: "block-5-3",
216          title: "Recent Developments",
217          content: "Recent advancements include the Variational Quantum Eigensolver (VQE) and Quantum Approximate Optimization Algorithm (QAOA), which are hybrid quantum-classical algorithms designed for near-term quantum computers with limited qubit counts and high error rates.",
218          verificationPercentage: 72,
219          links: [
220            { title: "NISQ Era Computing", slug: "nisq-era-computing" },
221            { title: "Variational Quantum Algorithms", slug: "variational-quantum-algorithms" },
222            { title: "Quantum Machine Learning", slug: "quantum-machine-learning" }
223          ]
224        }
225      ],
226      relatedNodes: ["node-1", "node-6", "node-7"]
227    },
228    {
229      id: "node-6",
230      title: "Artificial Neural Networks",
231      slug: "artificial-neural-networks",
232      description: "Computational models inspired by the human brain's neural structure for machine learning applications.",
233      verificationPercentage: 94,
234      blocks: [
235        {
236          id: "block-6-1",
237          title: "Neural Network Basics",
238          content: "Artificial Neural Networks (ANNs) are computing systems inspired by biological neural networks in human brains. They consist of connected nodes (neurons) organized in layers, including input layers, hidden layers, and output layers. Each connection can transmit a signal from one neuron to another.",
239          verificationPercentage: 97,
240          links: [
241            { title: "Neurons", slug: "artificial-neurons" },
242            { title: "Activation Functions", slug: "activation-functions" },
243            { title: "Network Architectures", slug: "neural-network-architectures" }
244          ]
245        },
246        {
247          id: "block-6-2",
248          title: "Training Neural Networks",
249          content: "Neural networks learn by adjusting the weights of connections between neurons. This training typically uses backpropagation with gradient descent, where the network computes the gradient of a loss function with respect to its parameters and updates them to minimize the loss.",
250          verificationPercentage: 92,
251          links: [
252            { title: "Backpropagation", slug: "backpropagation" },
253            { title: "Gradient Descent", slug: "gradient-descent" },
254            { title: "Loss Functions", slug: "loss-functions" }
255          ]
256        },
257        {
258          id: "block-6-3",
259          title: "Types and Applications",
260          content: "Common types include Feedforward Neural Networks, Convolutional Neural Networks (CNNs) for image processing, Recurrent Neural Networks (RNNs) for sequential data, and Transformers for natural language processing. Applications span computer vision, speech recognition, natural language processing, and more.",
261          verificationPercentage: 94,
262          links: [
263            { title: "Convolutional Networks", slug: "convolutional-neural-networks" },
264            { title: "Recurrent Networks", slug: "recurrent-neural-networks" },
265            { title: "Transformer Models", slug: "transformer-models" }
266          ]
267        }
268      ],
269      relatedNodes: ["node-7", "node-8"]
270    },
271    {
272      id: "node-7",
273      title: "Quantum Machine Learning",
274      slug: "quantum-machine-learning",
275      description: "The intersection of quantum computing and machine learning, exploring how quantum algorithms can enhance machine learning tasks.",
276      verificationPercentage: 65,
277      blocks: [
278        {
279          id: "block-7-1",
280          title: "Introduction to Quantum Machine Learning",
281          content: "Quantum Machine Learning (QML) explores how quantum computing can be used to enhance machine learning algorithms. It leverages quantum properties to potentially achieve speedups for specific machine learning tasks or to process data with quantum characteristics that classical computers struggle with.",
282          verificationPercentage: 78,
283          links: [
284            { title: "Quantum Computing", slug: "quantum-computing-fundamentals" },
285            { title: "Machine Learning", slug: "artificial-neural-networks" }
286          ]
287        },
288        {
289          id: "block-7-2",
290          title: "Quantum Neural Networks",
291          content: "Quantum Neural Networks (QNNs) are quantum circuits designed with a neural network structure. They use parameterized quantum gates whose parameters are optimized during training, similar to weights in classical neural networks. QNNs can potentially model complex quantum data more efficiently than classical neural networks.",
292          verificationPercentage: 59,
293          links: [
294            { title: "Parametrized Quantum Circuits", slug: "parametrized-quantum-circuits" },
295            { title: "Quantum Backpropagation", slug: "quantum-backpropagation" }
296          ]
297        },
298        {
299          id: "block-7-3",
300          title: "Current Challenges and Research",
301          content: "QML faces challenges including limited qubit counts, quantum decoherence, and the need for quantum-classical interfaces. Active research areas include designing quantum kernels for support vector machines, quantum reinforcement learning, and developing quantum versions of classical machine learning algorithms.",
302          verificationPercentage: 58,
303          links: [
304            { title: "Quantum Kernels", slug: "quantum-kernels" },
305            { title: "Quantum Reinforcement Learning", slug: "quantum-reinforcement-learning" },
306            { title: "Quantum Advantage in ML", slug: "quantum-advantage-in-ml" }
307          ]
308        }
309      ],
310      relatedNodes: ["node-5", "node-6"]
311    },
312    {
313      id: "node-8",
314      title: "Cybersecurity Fundamentals",
315      slug: "cybersecurity-fundamentals",
316      description: "Core principles, practices, and technologies for protecting systems, networks, and data from digital attacks.",
317      verificationPercentage: 91,
318      blocks: [
319        {
320          id: "block-8-1",
321          title: "Core Cybersecurity Concepts",
322          content: "Cybersecurity revolves around protecting the confidentiality, integrity, and availability of information systems and data. It involves understanding threat models, risk assessment, and implementing controls to prevent, detect, and respond to security breaches and cyberattacks.",
323          verificationPercentage: 96,
324          links: [
325            { title: "CIA Triad", slug: "cia-triad" },
326            { title: "Threat Modeling", slug: "threat-modeling" },
327            { title: "Risk Assessment", slug: "risk-assessment" }
328          ]
329        },
330        {
331          id: "block-8-2",
332          title: "Security Controls and Best Practices",
333          content: "Effective security implementations use layered defenses ('defense in depth') including technical controls (firewalls, encryption, authentication systems), administrative controls (policies, procedures, training), and physical controls (facility security, device protection).",
334          verificationPercentage: 94,
335          links: [
336            { title: "Defense in Depth", slug: "defense-in-depth" },
337            { title: "Access Control", slug: "access-control" },
338            { title: "Security Policies", slug: "security-policies" }
339          ]
340        },
341        {
342          id: "block-8-3",
343          title: "Emerging Threats and Defenses",
344          content: "The cybersecurity landscape constantly evolves with new threats like advanced persistent threats (APTs), ransomware, and supply chain attacks. Modern defenses increasingly use artificial intelligence, automation, and threat intelligence to identify and respond to sophisticated attacks.",
345          verificationPercentage: 82,
346          links: [
347            { title: "Advanced Persistent Threats", slug: "advanced-persistent-threats" },
348            { title: "Ransomware", slug: "ransomware" },
349            { title: "Security Automation", slug: "security-automation" },
350            { title: "Quantum Cryptography", slug: "quantum-cryptography" }
351          ]
352        }
353      ],
354      relatedNodes: ["node-4", "node-6"]
355    }
356  ];
357  
358  export const getKnowledgeNodes = () => knowledgeNodes;
359  
360  export const getKnowledgeNodeBySlug = (slug: string) => {
361    return knowledgeNodes.find(node => node.slug === slug);
362  };
363  
364  export const getRelatedKnowledgeNodes = (nodeIds: string[]) => {
365    return knowledgeNodes.filter(node => nodeIds.includes(node.id));
366  };
367  
368  export const getFeaturedKnowledgeNodes = (count: number = 3) => {
369    // In a real application, this might use more sophisticated criteria
370    return knowledgeNodes
371      .sort((a, b) => b.verificationPercentage - a.verificationPercentage)
372      .slice(0, count);
373  };