-
Notifications
You must be signed in to change notification settings - Fork 2
Input Nodes
This node initialises a quantum circuit.
To use this node, first select whether you wish to build a circuit with:
- Bits only → qubits & classical bits
- Registers & Bits → quantum & classical registers storing qubits and classical bits respectively
Then, you must inform the number of:
- Qubits & Classical bits in Bits only mode
- Quantum & Classical registers in Registers mode
In fact, the node will generate and output:
- Qubit objects in Bits only mode: to flow through the quantum gate nodes of the algorithm
- Register objects in Registers mode: must be connected to Quantum Register & Classical Register nodes
By default, qubits are initialised in the '0 state'.
To initialise the qubits in a specific state ('0' or '1'), you can pass a binary string in
msg.payload.binaryString
to the Quantum Circuit node. The string must have a length equal to the total number of qubits in the circuit: 1 bit
initialises 1 qubit (e.g. '001101' for a 6 qubits circuit). The first (visually higher) qubit will be set according to the first bit of the string, second higher qubit by the second bit, etc.
Classical bits, either in a register or as individual bits, are crucial in a quantum circuit to store the result of qubit measurements.
Quantum Circuit - Qiskit documentation
This node implements a quantum register, storing a given number of qubits, and outputs the corresponding qubit objects.
To use this node, specify the number of qubits to be stored in the quantum register and
connect it to an output of the Quantum Circuit node in 'Register' mode.
Please be aware that the number of Quantum Register and Classical Register nodes must match
the numbers specified in the Quantum Circuit node's properties.
Quantum Register - Qiskit documentation
This node implements a classical register, storing a given number of classical bits.
To use this node, specify the name of the register, the number of bits to be stored and
connect it to an output of the Quantum Circuit node in 'Register' mode.
This node does not output anything. The classical bit structure of the quantum circuit is simply saved to be used later on.
Classical bits, either in a register or as individual bits, are crucial in a quantum circuit to store the result of qubit measurements.
Please be aware that the number of Quantum Register and Classical Register nodes must match
the numbers specified in the Quantum Circuit node's properties.
For more information about Node-RED Quantum, please refer to the official documentation pages: