Skip to content

Commit 435a665

Browse files
committed
completed components of neuron
1 parent 555c498 commit 435a665

File tree

3 files changed

+67
-37
lines changed

3 files changed

+67
-37
lines changed

README.md

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,18 @@ When you go to the [live website](https://quantummlhandbook.vercel.app/) or loca
5959
- [ ] How to construct any circuit.
6060
- [ ] Quantum ML algorithms (algos like SVM, KNN etc).
6161
- [ ] Quantum Neural Networks.
62-
- [ ] Quantum Convolutional Neural Networks.
63-
- [ ] Quantum Generative Adversarial Networks.
64-
- [ ] Quantum Reinforcement Learning.
65-
- [ ] Quantum Transfer Learning.
66-
- [ ] Quantum Autoencoders.
62+
- [x] Components of QNN.
63+
- [ ] Quantum Convolutional Neural Networks.
64+
- [ ] Quantum Generative Adversarial Networks.
65+
- [ ] Quantum Reinforcement Learning.
66+
- [ ] Quantum Transfer Learning.
67+
- [ ] Quantum Autoencoders.
6768

6869
## Installation
6970

7071
before you start, make sure you have the following installed:
7172

72-
- Node v18.x or higher
73+
- Node LTS version
7374

7475
install node_modules:
7576

@@ -85,31 +86,6 @@ npm start
8586

8687
now you can access the documentation at `http://localhost:3000/` in your browser.
8788

88-
## Project Structure
89-
90-
The project structure is as follows:
91-
92-
```
93-
├───.github
94-
│ ├───ISSUE_TEMPLATE
95-
│ └───workflows
96-
├───docs
97-
│ ├───basics
98-
│ ├───gates-and-circuits
99-
100-
├───src
101-
│ ├───components
102-
│ ├───pages
103-
│ ├───css
104-
│ ├───data
105-
│ ├───sections
106-
│ ├───theme
107-
├───static
108-
└───mkdocs.yml
109-
```
110-
111-
this is standard file and folder structure of docusaurus v2. the static folder contains the images and after building the static folder will remain the same. the docs folder contains the markdown files for the documentation. the src folder contains the source code for the documentation.
112-
11389
## License
11490

11591
MIT License

docs/quantum-gates/controlled-u-gate.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/quantum-neural-network/components-of-qnn.md

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This is usually accomplished by two steps: the first is to select a universal ga
2828

2929
The Solovay-Kitaev theorem states that any unitary operation can be approximated to arbitrary precision by a sequence of gates from a universal gate set. This means that any non-linear operation can be implemented on a quantum computer by using a sequence of gates from a universal gate set. Using this theorem results that guarantees a single qubit unitary operations can be effciently approximated by a sequence of gates from a universal gate set. There's a catch though, the number of gates required to approximate a unitary operation grows exponentially with the precision of the approximation. Since then, many advances have been made but the circuits designed so far are all deterministic.
3030

31-
A new approach is discovered, i.e., using non-deterministic quantum circuits. In this kind of circuits, a unitary operation is applied to a quantum state only if a certain expected measurement outcome is observed. Otherwise a cheap unitary operation can be utilized to reverse it. This process can then be repeated until the desired unitary operation is performed and therefore these circuits are called Repeat-Until-Success (RUS) circuits. A clear advantage of RUS circuits is their extremely low resource cost.
31+
A new approach is discovered, i.e., using non-deterministic quantum circuits. In this kind of circuits, a unitary operation is applied to a quantum state only if a certain expected measurement outcome is observed. Otherwise a cheap unitary operation can be utilized to reverse it. This process can then be repeated until the desired unitary operation is performed and therefore these circuits are called "Repeat-Until-Success" (RUS) circuits. A clear advantage of RUS circuits is their extremely low resource cost.
3232

3333
Let's consider an example of a RUS circuit that implements a non-linear operation on a quantum state.
3434

@@ -81,5 +81,63 @@ q1: ─── H ─── X ─── H ─── M ───
8181

8282
### Creating a new type of quantum neuron
8383

84-
to be continued...(I'm still working on this part, I will update it soon. Stay tuned!)
84+
Creating new types of quantum neurons is another approach to address the challenge of implementing non-linear operations in quantum neural networks. Several proposals have emerged, each with its unique characteristics and trade-offs. Let's explore some notable approaches:
85+
86+
1. **Measurement-based Quantum Neurons**
87+
- These neurons use quantum measurements to introduce non-linearity
88+
- The measurement process naturally collapses the quantum state, providing a form of non-linear transformation
89+
- Example structure:
90+
```
91+
Input state → Unitary Operation → Measurement → Classical Processing → Output state
92+
```
93+
- Advantage: Natural non-linearity through measurement
94+
- Disadvantage: Loss of quantum coherence
95+
96+
2. **Hybrid Quantum-Classical Neurons**
97+
- Combines quantum and classical processing
98+
- Uses quantum operations for linear transformations
99+
- Applies classical non-linear functions to measurement results
100+
- Structure:
101+
```
102+
Quantum State → Quantum Circuit → Measurement → Classical Non-linear Function → New Quantum State
103+
```
104+
- Advantage: Leverages best of both worlds
105+
- Disadvantage: Requires frequent quantum-to-classical conversion
106+
107+
3. **Parametric Quantum Circuits (PQC) as Neurons**
108+
- Uses variational quantum circuits with trainable parameters
109+
- The circuit structure itself acts as a neuron
110+
- Example:
111+
```
112+
|ψ⟩ → Rx(θ1) → Ry(θ2) → Rz(θ3) → CNOT → |ψ'⟩
113+
```
114+
- Advantage: Highly flexible and trainable
115+
- Disadvantage: Limited by the circuit depth and noise
116+
117+
4. **Quantum Reservoir Computing**
118+
- Inspired by classical reservoir computing
119+
- Uses a large quantum system as a reservoir
120+
- Only output weights are trained
121+
- Structure:
122+
```
123+
Input → Quantum Reservoir → Fixed Quantum Operations → Measurement → Linear Readout
124+
```
125+
- Advantage: Simpler training process
126+
- Disadvantage: Requires larger quantum systems
127+
128+
The key challenges in designing new quantum neurons include:
129+
- Maintaining quantum coherence
130+
- Balancing expressivity with implementability
131+
- Ensuring efficient training methods
132+
- Dealing with noise and decoherence
133+
134+
Current research focuses on finding the optimal trade-off between these factors while maximizing the computational advantages of quantum systems.
135+
136+
**Future Directions:**
137+
- Development of error-resistant quantum neurons
138+
- Investigation of novel quantum-inspired neural architectures
139+
- Integration with quantum error correction
140+
- Exploration of topology-aware quantum neural designs
141+
142+
The field of quantum neuron design remains highly active, with new proposals emerging regularly as our understanding of quantum systems and their computational capabilities continues to evolve.
85143

0 commit comments

Comments
 (0)