qiskit-documentation/docs/api/qiskit/dev/qiskit.quantum_info.pauli_b...

30 lines
1.1 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: pauli_basis (dev version)
description: API reference for qiskit.quantum_info.pauli_basis in the dev version of qiskit
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.quantum_info.pauli_basis
---
<span id="qiskit-quantum-info-pauli-basis" />
# qiskit.quantum\_info.pauli\_basis
<Function id="qiskit.quantum_info.pauli_basis" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/main/qiskit/quantum_info/operators/symplectic/pauli_utils.py#L21-L40" signature="qiskit.quantum_info.pauli_basis(num_qubits, weight=False)">
Return the ordered PauliList for the n-qubit Pauli basis.
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of qubits
* **weight** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if True optionally return the basis sorted by Pauli weight rather than lexicographic order (Default: False)
**Returns**
the Paulis for the basis
**Return type**
[PauliList](qiskit.quantum_info.PauliList "qiskit.quantum_info.PauliList")
</Function>