> ## Documentation Index
> Fetch the complete documentation index at: https://docs.classiq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Automatic Registers Resolution

The Classiq engine supports the automatic merging of registers. This means that the quantum program opens with all the known registers already collapsed.
This feature completes the merging-wires-into-registers feature.

## Introduction

Each function contains information on its registers, which is mainly provided by the synthesis engine.
The information includes the register type (input, output, zero, auxiliary), the name, and the qubits it contains.

You can get information about the function's registers by clicking the function and looking in the **Information**
tab.

<img src="https://mintcdn.com/classiq/W-R807dENt_9x691/user-guide/resources/registers_tab_better.gif?s=8e822aa2d731b9ee2b345ac617cd0b18" alt="Opening info tab" width="640" height="366" data-path="user-guide/resources/registers_tab_better.gif" />

## Wire Merging Criteria

Two or more wires can be merged only if:

1. The wire's source and destination are the same gates.
2. The wires operate on sequential qubits.
   For example, a register merges if the wires are between qubits 4, 5, and 6, but a register with wires on qubits
   1, 4, and 5 does not merge.

## Input Registers

Currently, the platform only supports input registers. To see if a register is an input register, look in the **Information** tab.

<img src="https://mintcdn.com/classiq/W-R807dENt_9x691/user-guide/resources/single_register_info.png?fit=max&auto=format&n=W-R807dENt_9x691&q=85&s=6bd56170d58a93467a290a92a2840991" alt="Register info" width="390" height="203" data-path="user-guide/resources/single_register_info.png" />

If a gate's input register meets the merge criteria, wires are automatically merged when a quantum program loads.
Output registers may be supported in future Classiq versions.

Visual cues:

* label - a label appears on the **right** of the wire next to the gate (left of the gate),
  containing the register's name
* color - wires are color-coded as described below

<img src="https://mintcdn.com/classiq/xLAFEkBDpT-na34E/user-guide/resources/circuit_with_registers.png?fit=max&auto=format&n=xLAFEkBDpT-na34E&q=85&s=a1170285cc6df3fda688738a1cb08c30" alt="QuantumProgram" width="1107" height="810" data-path="user-guide/resources/circuit_with_registers.png" />

If the engine cannot merge wires, it displays them separately.

<img src="https://mintcdn.com/classiq/xLAFEkBDpT-na34E/user-guide/resources/disjoint_wires.png?fit=max&auto=format&n=xLAFEkBDpT-na34E&q=85&s=aabd2489460cb191e7fe6dd9247bf31c" alt="Disjoint case" width="597" height="320" data-path="user-guide/resources/disjoint_wires.png" />

Special registers:

* Zero - A register that always contains the |0⟩ state appears with the color <span style={{color: "green"}}>**green**</span>
* Auxiliary - A register that is used as a helper to a function appears with the color <span style={{color: "red"}}>**red**</span>

## Disclaimer

This is an experimental feature. Your feedback is appreciated.
