Skip to content

Input Nodes

Theo Reignier edited this page Sep 1, 2021 · 1 revision

Quantum Circuit

Node appearance

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
Registers are used to group bits with the same role together for circuit structuring purposes.

Then, you must inform the number of:
  • Qubits & Classical bits in Bits only mode
  • Quantum & Classical registers in Registers mode
This will define the number of outputs of the Quantum Circuit node.

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.

Input

Node input

Output

Node output

Quantum Circuit - Qiskit documentation

Quantum Register

Node appearance

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.

Input

Node input

Output

Node output

Quantum Register - Qiskit documentation

Classical Register

Node appearance

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.

Input

Node input

Classical Register - Qiskit documentation