You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Internet connection requirement in IBM Quantum node docs
* Quantum algos images for wiki
* Documentation formatting for quantum algos nodes
* README 'nodes' section
* Small update
* Fix typo
* Update README.md
- Remove unnecessary indentation and leading whitespace in TOC.
- Use title case for all headings for consistency.
- Remove trailing whitespace from headings for consistency.
- Remove <br> tags - generally we dont want to use HTML tags in markdown, but in this case the <br> tags weren't doing anything anyway once the markdown was parsed on GitHub.
- I think using a H4 header for the "Example" sections makes more sense given that each example is its own subsection, and H4 is also visibly the same as bold text. The "Example" sections should also be formatted consistently: some have the text come after "Example", whilst others have the text on the same line as "Example".
- Remove repeated text from "How to Use" section list and condensed it. The large use of whitespace and line breaks makes it difficult to read, and much larger than it needs to be.
- Also condensed "Rules" section, too much whitespace.
* Implemented requested changes
* Update README.md
Co-authored-by: Louis Lefevre <[email protected]>
Co-authored-by: Louis Lefevre <[email protected]>
Node-RED Quantum requires at minimum [Node.js 12.0.0](https://nodejs.org/en/), [Node-RED 1.0](https://nodered.org), and [Python 3](https://www.python.org/). It is also advised that you start Node-RED from a Bash shell, as it is required to prepare the Python virtual environment.
34
36
37
+
Even though not required, some knowledge on how to use the Node-RED platfom can be useful. We recommend this [Node-RED tutorial](https://www.youtube.com/watch?v=3AR432bguOY) on YouTube.
38
+
35
39
## Installation
36
40
1. Install Node-RED locally by following the installation instructions [here](https://nodered.org/docs/getting-started/local).
37
41
2. Once Node-RED has been installed, start the application by entering the command `node-red` in the terminal.
A qubit is the same to a quantum computer as what a bit is to a classical computer: the smallest unit of information.
47
52
@@ -53,7 +58,7 @@ Quantum states that are in between those 2 points are a weighted combination of
53
58
54
59
The Qiskit textbook provides more information on [classical vs quantum bits](https://qiskit.org/textbook/ch-states/representing-qubit-states.html#statevectors), as well as [bloch spheres](https://qiskit.org/textbook/ch-states/representing-qubit-states.html#bloch-sphere-2).
55
60
56
-
#### Example
61
+
#### Example:
57
62
Applying a π radians rotation about the x-axis on a qubit that is in the '0 state' will put it in the '1 state'.
@@ -66,7 +71,7 @@ The act of measuring a qubit collapses the qubit state; the state of the qubit a
66
71
67
72
More information on qubit measurement can be found in the [Qiskit Textbook](https://qiskit.org/textbook/ch-states/representing-qubit-states.html#rules-measurement)
68
73
69
-
#### Example
74
+
#### Example:
70
75
If we measure a qubit that has a state in the x-y plane 1000 times, then we will approximately get 500 '0' measurements and 500 '1' measurements.
71
76
72
77
### Entanglement
@@ -78,33 +83,66 @@ In practice, **entanglement** arises when the operation of a gate on a qubit is
78
83
79
84
More information on entanglement can be found in the [Qiskit Textbook](https://qiskit.org/textbook/ch-gates/multiple-qubits-entangled-states.html#entangled)
80
85
81
-
#### Example
86
+
#### Example:
82
87
A CNOT gate applies a NOT gate (0 → 1 & 1 → 0) to the 'target' qubit **if and only if** the 'control' qubit is in the '1' state.
83
88
84
89
Now, let's assume that the 'control' qubit is in a **superposition** state (25% '0' / 75% '1'), while the 'target' qubit is in the '0' state. Then, the **combined** state of the 2 qubits after applying the CNOT gate will be:
85
-
- '00' with 25% probability
86
-
- '11' with 75% probability
90
+
- '00' with 25% probability
91
+
- '11' with 75% probability, (NOT gate applied)
87
92
88
-
The 2 qubits are now **entangled**: if we measure one of them to be in the '1' state, then we know that other qubit will be in the '1' state as well.
93
+
The 2 qubits are now **entangled**: if we measure one of them to be in a specific state, then we know the other one will be in the same state.
89
94
90
95
## Quantum Nodes
91
-
Quantum circuits can be built through the use of the *'quantum'* nodes provided by this library.
Node-RED Quantum includes a *'quantum'* library of nodes that can be used to build quantum circuits.
97
+
98
+
### How to Use
99
+
The 'Quantum Circuit' node can generate a quantum circuit with qubits. The qubits will then flow through a certain set of nodes corresponding to quantum operations, or gates. Finally, all qubits must be connected to a single output node that will process the circuit and output the results.
100
+
101
+
The nodes are organised into 4 categories:
102
+
-[Input nodes](https://github.com/node-red-quantum/node-red-contrib-quantum/wiki/Input-Nodes) (gray) are used to set up a quantum circuit and output qubits. To start, use the 'Quantum Circuit' node to generate one qubit through each output.
103
+
104
+
-[Qubit nodes](https://github.com/node-red-quantum/node-red-contrib-quantum/wiki/Qubit-Nodes) (blue) are used to keep track and manage qubits, such as resetting them. The 'Qubit' node receives qubits as input but does not execute any operation on it. It can be used to identify qubits, by printing some text under the node, or to rearrange the position of qubits into the editor.
105
+
106
+
-[Quantum Gate nodes](https://github.com/node-red-quantum/node-red-contrib-quantum/wiki/Quantum-Gate-Nodes) correspond to quantum operations. When a qubit flow through a quantum gate node, the operation is executed on the qubit. There are 2 type of quantum gates:
107
+
-[Singe qubit gates](https://github.com/node-red-quantum/node-red-contrib-quantum/wiki/Quantum-Gate-Nodes/#single-qubit-quantum-gate) (purple) receive a qubit, execute an operation, and output the qubit. The 'NOT Gate' flips the state of the qubit (0 → 1 & 1 → 0).
108
+
-[Multi qubits gates](https://github.com/node-red-quantum/node-red-contrib-quantum/wiki/Quantum-Gate-Nodes#multi-qubits-quantum-gates) (red) receive a certain number of qubits, execute a **control operation** and output the qubits. Control operations correspond to the conditional execution of a single quantum gate. If the 'control' qubits are in the correct state, then the gate is applied on a 'target' qubit. The 'CNOT Gate', operating on 2 qubits, applies a NOT gate on the 'target' qubit if the 'control' qubit is in the '1' state.
109
+
110
+
-[Output nodes](https://github.com/node-red-quantum/node-red-contrib-quantum/wiki/Output-Nodes) (grey) are used to process the quantum circuit and generate an output. All qubits of the quantum circuit must be connected to the same output node for it to work. The output format varies between each node, please refer to the documentation. The 'Local Simulator' node simulates a quantum computer using the local Qiskit library. It runs the quantum circuit and outputs the results.
111
+
112
+
### Rules
113
+
1.**Do not duplicate qubits**
114
+
To avoid inconsistencies, there should always be 1 instance of each qubit at all times.
115
+
A node can take multiple qubits as input but only one wire should be connected to each output. To do so, always input as many qubits as the node outputs.
96
116
97
-
More information on quantum nodes can be found in the [Node-RED Quantum wiki](https://github.com/node-red-quantum/node-red-contrib-quantum/wiki/Building-Quantum-Circuits).
117
+
2.**Wait for quantum circuit to execute**
118
+
Do not double-click the inject button, wait for the circuit to have finished executing before runnning it again.
119
+
If such an issue occurs, please restart Node-RED.
120
+
121
+
| Input nodes | Qubit nodes | Single qubit gate nodes | Multi qubits gate nodes | Output nodes |
More information on *'quantum'* nodes can be found in the [Node-RED Quantum wiki](https://github.com/node-red-quantum/node-red-contrib-quantum/wiki/Building-Quantum-Circuits).
98
127
99
128
## Quantum Algorithm Nodes
100
-
To leverage the power of quantum computing in classical circuits, utilise the *'quantum algorithm'* nodes.
129
+
Node-RED Quantum includes a *'quantum algorithm'* library of nodes that can be used to leverage the power of quantum computing in classical programs.
130
+
131
+
The nodes do not require any specific quantum knowledge to be used, except for some initial knowledge on the algorithm itself to have a better understanding of its use.
132
+
133
+
Those nodes encapsulate all the quantum-related operations so that users just have to input the right data in order to receive the quantum algorithm output.
More information on quantum algorithm nodes can be found in the [Node-RED Quantum wiki](https://github.com/node-red-quantum/node-red-contrib-quantum/wiki/Quantum-Algorithm-Nodes).
140
+
More information on *'quantum algorithm'* nodes can be found in the [Node-RED Quantum wiki](https://github.com/node-red-quantum/node-red-contrib-quantum/wiki/Quantum-Algorithm-Nodes).
103
141
104
142
## Contributing
105
143
For information on how to contribute, please read the [CONTRIBUTING](CONTRIBUTING.md) guidelines.
106
144
107
145
## Acknowledgements
108
146
For details on the authors, please read the [AUTHORS](AUTHORS) file.
109
147
110
-
This Node-RED library was developed in the context of a [UCL IXN](https://www.ucl.ac.uk/computer-science/collaborate/ucl-industry-exchange-network-ucl-ixn) partnership with [IBM](https://www.ibm.com/uk-en). Defined and arranged by IBM, the project was allocated to students from UCL's Computer Science Department as part of their Master's thesis. Special thanks to John McNamara for overseeing the development of this project, to David Clark for his supervision as Academic Supervisor, and to Sieglinde Pfaendler and James Wootton for their advice and guidance as our Quantum Mentors.
148
+
This Node-RED library was developed in the context of a [UCL IXN](https://www.ucl.ac.uk/computer-science/collaborate/ucl-industry-exchange-network-ucl-ixn) partnership with [IBM](https://www.ibm.com/uk-en). Defined and arranged by IBM, the project was allocated to students from UCL's Computer Science Department as part of their Master's thesis. Special thanks to John McNamara for overseeing the development of this project, to David Clark and Rae Harbird for their supervision as Academic Supervisors, and to Sieglinde Pfaendler and James Wootton for their advice and guidance as our Quantum Mentors.
0 commit comments