30 lines
924 B
Plaintext
30 lines
924 B
Plaintext
---
|
||
title: random_statevector
|
||
description: API reference for qiskit.quantum_info.random_statevector
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: function
|
||
python_api_name: qiskit.quantum_info.random_statevector
|
||
---
|
||
|
||
# qiskit.quantum\_info.random\_statevector
|
||
|
||
<Function id="qiskit.quantum_info.random_statevector" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.21/qiskit/quantum_info/states/random.py" signature="random_statevector(dims, seed=None)">
|
||
Generator a random Statevector.
|
||
|
||
The statevector is sampled from the uniform (Haar) measure.
|
||
|
||
**Parameters**
|
||
|
||
* **dims** (*int or tuple*) – the dimensions of the state.
|
||
* **seed** (*int or np.random.Generator*) – Optional. Set a fixed seed or generator for RNG.
|
||
|
||
**Returns**
|
||
|
||
the random statevector.
|
||
|
||
**Return type**
|
||
|
||
[Statevector](qiskit.quantum_info.Statevector "qiskit.quantum_info.Statevector")
|
||
</Function>
|
||
|