qiskit-documentation/docs/api/qiskit/0.31/qiskit.quantum_info.random_...

31 lines
1.0 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: random_pauli (v0.31)
description: API reference for qiskit.quantum_info.random_pauli in qiskit v0.31
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.quantum_info.random_pauli
---
<span id="qiskit-quantum-info-random-pauli" />
# qiskit.quantum\_info.random\_pauli
<Function id="qiskit.quantum_info.random_pauli" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.18/qiskit/quantum_info/operators/symplectic/random.py" signature="random_pauli(num_qubits, group_phase=False, seed=None)">
Return a random Pauli.
**Parameters**
* **num\_qubits** (*int*) the number of qubits.
* **group\_phase** (*bool*) Optional. If True generate random phase. Otherwise the phase will be set so that the Pauli coefficient is +1 (default: False).
* **seed** (*int or np.random.Generator*) Optional. Set a fixed seed or generator for RNG.
**Returns**
a random Pauli
**Return type**
[Pauli](qiskit.quantum_info.Pauli "qiskit.quantum_info.Pauli")
</Function>