35 lines
2.1 KiB
Plaintext
35 lines
2.1 KiB
Plaintext
---
|
||
title: get_subsystems_counts
|
||
description: API reference for qiskit.aqua.utils.get_subsystems_counts
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: function
|
||
python_api_name: qiskit.aqua.utils.get_subsystems_counts
|
||
---
|
||
|
||
# qiskit.aqua.utils.get\_subsystems\_counts
|
||
|
||
<Function id="qiskit.aqua.utils.get_subsystems_counts" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/aqua/utils/subsystem.py" signature="get_subsystems_counts(complete_system_counts, post_select_index=None, post_select_flag=None)">
|
||
Extract all subsystems’ counts from the single complete system count dictionary.
|
||
|
||
If multiple classical registers are used to measure various parts of a quantum system, Each of the measurement dictionary’s keys would contain spaces as delimiters to separate the various parts being measured. For example, you might have three keys ‘11 010’, ‘01 011’ and ‘11 011’, among many other, in the count dictionary of the 5-qubit complete system, and would like to get the two subsystems’ counts (one 2-qubit, and the other 3-qubit) in order to get the counts for the 2-qubit partial measurement ‘11’ or the 3-qubit partial measurement ‘011’.
|
||
|
||
If the post\_select\_index and post\_select\_flag parameter are specified, the counts are returned subject to that specific post selection, that is, the counts for all subsystems where the subsystem at index post\_select\_index is equal to post\_select\_flag.
|
||
|
||
**Parameters**
|
||
|
||
* **complete\_system\_counts** (*dict*) – The measurement count dictionary of a complete system that contains multiple classical registers for measurements s.t. the dictionary’s keys have space delimiters.
|
||
* **post\_select\_index** (*int*) – Optional, the index of the subsystem to apply the post selection to.
|
||
* **post\_select\_flag** (*str*) – Optional, the post selection value to apply to the subsystem at index post\_select\_index.
|
||
|
||
**Returns**
|
||
|
||
**A list of measurement count dictionaries corresponding to**
|
||
|
||
each of the subsystems measured.
|
||
|
||
**Return type**
|
||
|
||
list
|
||
</Function>
|
||
|