Portuguese
Idiomas
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

Validation and handling of the arguments and its relationship.

For example, `cx([q[0],q[1]], q[2])` means `cx(q[0], q[2]); cx(q[1], q[2])`. This method yields the arguments in the right grouping. In the given example:

```in: [[q[0],q[1]], q[2]],[]
outs: [q[0], q[2]], []
[q[1], q[2]], []
```

• If len(qargs) == 1:

```[q[0], q[1]] -> [q[0]],[q[1]]
```
• If len(qargs) == 2:

```[[q[0], q[1]], [r[0], r[1]]] -> [q[0], r[0]], [q[1], r[1]]
[[q[0]], [r[0], r[1]]]       -> [q[0], r[0]], [q[0], r[1]]
[[q[0], q[1]], [r[0]]]       -> [q[0], r[0]], [q[1], r[0]]
```
• If len(qargs) >= 3:

```[q[0], q[1]], [r[0], r[1]],  ...] -> [q[0], r[0], ...], [q[1], r[1], ...]
```
Parâmetros
• qargs (list) – List of quantum bit arguments.

• cargs (list) – List of classical bit arguments.

Retorno

A tuple with single arguments.

Levanta

CircuitError – If the input is not valid. For example, the number of arguments does not match the gate expectation.

Tipo de retorno

Iterable[tuple[list, list]]