qiskit-documentation/docs/api/qiskit/0.29/qiskit.quantum_info.entangl...

37 lines
1.3 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: entanglement_of_formation (v0.29)
description: API reference for qiskit.quantum_info.entanglement_of_formation in qiskit v0.29
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.quantum_info.entanglement_of_formation
---
<span id="qiskit-quantum-info-entanglement-of-formation" />
# qiskit.quantum\_info.entanglement\_of\_formation
<Function id="qiskit.quantum_info.entanglement_of_formation" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.18/qiskit/quantum_info/states/measures.py" signature="entanglement_of_formation(state)">
Calculate the entanglement of formation of quantum state.
The input quantum state must be either a bipartite state vector, or a 2-qubit density matrix.
**Parameters**
**state** ([*Statevector*](qiskit.quantum_info.Statevector "qiskit.quantum_info.Statevector") *or*[*DensityMatrix*](qiskit.quantum_info.DensityMatrix "qiskit.quantum_info.DensityMatrix")) a 2-qubit quantum state.
**Returns**
The entanglement of formation.
**Return type**
float
**Raises**
* **QiskitError** if the input state is not a valid QuantumState.
* **QiskitError** if input is not a bipartite QuantumState.
* **QiskitError** if density matrix input is not a 2-qubit state.
</Function>