A subcircuit is a quantum circuit on its own that is put into a box within other circuits. It has input, output, and also internal wires. Subcircuits may be declared on-the-fly if they are used only once, but there should also be the option to globally declare subcircuits and use them at any time. As with ordinary quantum circuits, everything in a subcircuit should be allowed to have a name. If the subcircuit itself is then also named, those inner names should be made available (prefixed with the subcircuit’s name), to the outer circuit. Subcircuits may also contain subcircuits. While the number of input registers should match, a subcircuit may have more, less or different output registers. The language needs to be extended to somehow allow for this. Subcircuits will typically be multi-qubit elements that, at least if internal wires are used, may significantly increase the required height for an individual register. Hence, the internal height calculations must be adapted. This will be particularly problematic if the subcircuit targets non-adjacent wires.
A subcircuit is a quantum circuit on its own that is put into a box within other circuits. It has input, output, and also internal wires. Subcircuits may be declared on-the-fly if they are used only once, but there should also be the option to globally declare subcircuits and use them at any time. As with ordinary quantum circuits, everything in a subcircuit should be allowed to have a name. If the subcircuit itself is then also named, those inner names should be made available (prefixed with the subcircuit’s name), to the outer circuit. Subcircuits may also contain subcircuits. While the number of input registers should match, a subcircuit may have more, less or different output registers. The language needs to be extended to somehow allow for this. Subcircuits will typically be multi-qubit elements that, at least if internal wires are used, may significantly increase the required height for an individual register. Hence, the internal height calculations must be adapted. This will be particularly problematic if the subcircuit targets non-adjacent wires.