About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
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.
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.