Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.ignis.verification.count_keys

count_keys(num_qubits)

GitHub

Return ordered count keys.

Parameters

num_qubits (int) – The number of qubits in the generated list.

Return type

List[str]

Returns

The strings of all 0/1 combinations of the given number of qubits

Example

>>> count_keys(3)
['000', '001', '010', '011', '100', '101', '110', '111']
Was this page helpful?
Report a bug or request content on GitHub.