36 lines
1.3 KiB
Plaintext
36 lines
1.3 KiB
Plaintext
---
|
||
title: partial_trace (v0.26)
|
||
description: API reference for qiskit.quantum_info.partial_trace in qiskit v0.26
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: function
|
||
python_api_name: qiskit.quantum_info.partial_trace
|
||
---
|
||
|
||
<span id="qiskit-quantum-info-partial-trace" />
|
||
|
||
# qiskit.quantum\_info.partial\_trace
|
||
|
||
<Function id="qiskit.quantum_info.partial_trace" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/quantum_info/states/utils.py" signature="partial_trace(state, qargs)">
|
||
Return reduced density matrix by tracing out part of quantum state.
|
||
|
||
If all subsystems are traced over this returns the [`trace()`](qiskit.quantum_info.DensityMatrix#trace "qiskit.quantum_info.DensityMatrix.trace") of the input state.
|
||
|
||
**Parameters**
|
||
|
||
* **state** ([*Statevector*](qiskit.quantum_info.Statevector "qiskit.quantum_info.Statevector") *or*[*DensityMatrix*](qiskit.quantum_info.DensityMatrix "qiskit.quantum_info.DensityMatrix")) – the input state.
|
||
* **qargs** (*list*) – The subsystems to trace over.
|
||
|
||
**Returns**
|
||
|
||
The reduced density matrix.
|
||
|
||
**Return type**
|
||
|
||
[DensityMatrix](qiskit.quantum_info.DensityMatrix "qiskit.quantum_info.DensityMatrix")
|
||
|
||
**Raises**
|
||
|
||
**QiskitError** – if input state is invalid.
|
||
</Function>
|
||
|