Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.utils.validate_entangler_map

validate_entangler_map(entangler_map, num_qubits, allow_double_entanglement=False)

GitHub

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

Parameters

  • 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

Returns

Validated/converted map

Return type

list

Raises

  • 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.
Was this page helpful?
Report a bug or request content on GitHub.