qiskit-documentation/docs/api/qiskit/0.31/qiskit.ignis.verification.m...

31 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: marginal_counts (v0.31)
description: API reference for qiskit.ignis.verification.marginal_counts in qiskit v0.31
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.ignis.verification.marginal_counts
---
<span id="qiskit-ignis-verification-marginal-counts" />
# qiskit.ignis.verification.marginal\_counts
<Function id="qiskit.ignis.verification.marginal_counts" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-ignis/tree/stable/0.6/qiskit/ignis/verification/tomography/data.py" signature="marginal_counts(counts, meas_qubits=True, pad_zeros=False)">
Compute marginal counts from a counts dictionary.
**Parameters**
* **counts** (`Dict`\[`str`, `int`]) a counts dictionary.
* **meas\_qubits** (`Union`\[`bool`, `List`\[`int`]]) (default: True) the qubits to NOT be marinalized over if this is True meas\_qubits will be all measured qubits.
* **pad\_zeros** (`bool`) (default: False) Include zero count outcomes in return dict.
**Return type**
`Dict`\[`str`, `int`]
**Returns**
A counts dictionary for the specified qubits. The returned dictionary will have any whitespace trimmed from the input counts keys. Thus if meas\_qubits=True the returned dictionary will have the same values as the input dictionary, but with whitespace trimmed from the keys.
</Function>