Japanese
言語
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.utils.validate_entangler_map

validate_entangler_map(entangler_map, num_qubits, allow_double_entanglement=False)[ソース]

Validate a user supplied entangler map and converts entries to ints.

パラメータ
  • entangler_map (list[list]) – An entangler map, keys are source qubit index (int), value is array of target qubit index(es) (int)

  • num_qubits (int) – Number of qubits

  • allow_double_entanglement (bool) – If we allow in two qubits can be entangled each other

戻り値

Validated/converted map

戻り値の型

list

例外
  • TypeError – entangler map is not list type or list of list

  • ValueError – the index of entangler map is out of range

  • ValueError – the qubits are cross-entangled.