qiskit.circuit.library.NLocal.get_entangler_map¶
- NLocal.get_entangler_map(rep_num, block_num, num_block_qubits)[fuente]¶
Get the entangler map for in the repetition
rep_num
and the blockblock_num
.The entangler map for the current block is derived from the value of
self.entanglement
. Below the different cases are listed, wherei
andj
denote the repetition number and the block number, respectively, andn
the number of qubits in the block.entanglement type
entangler map
None
[[0, ..., n - 1]]
str
(e.g'full'
)the specified connectivity on
n
qubitsList[int]
[
entanglement
]List[List[int]]
entanglement
List[List[List[int]]]
entanglement[i]
List[List[List[List[int]]]]
entanglement[i][j]
List[str]
the connectivity specified in
entanglement[i]
List[List[str]]
the connectivity specified in
entanglement[i][j]
Callable[int, str]
same as
List[str]
Callable[int, List[List[int]]]
same as
List[List[List[int]]]
Note that all indices are to be taken modulo the length of the array they act on, i.e. no out-of-bounds index error will be raised but we re-iterate from the beginning of the list.
- Parámetros
rep_num (int) – The current repetition we are in.
block_num (int) – The block number within the entanglement layers.
num_block_qubits (int) – The number of qubits in the block.
- Devuelve
The entangler map for the current block in the current repetition.
- Muestra
ValueError – If the value of
entanglement
could not be cast to a corresponding entangler map.- Tipo del valor devuelto
Sequence[Sequence[int]]