30 lines
813 B
Plaintext
30 lines
813 B
Plaintext
---
|
||
title: random_state
|
||
description: API reference for qiskit.quantum_info.random_state
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: function
|
||
python_api_name: qiskit.quantum_info.random_state
|
||
---
|
||
|
||
<span id="qiskit-quantum-info-random-state" />
|
||
|
||
# qiskit.quantum\_info.random\_state
|
||
|
||
<Function id="qiskit.quantum_info.random_state" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.16/qiskit/quantum_info/states/random.py" signature="random_state(dim, seed=None)">
|
||
DEPRECATED Return a random quantum state.
|
||
|
||
**Parameters**
|
||
|
||
* **dim** (*int*) – the dim of the state space
|
||
* **seed** (*int or np.random.Generator*) – Optional. Set a fixed seed or generator for RNG.
|
||
|
||
**Returns**
|
||
|
||
state(2\*\*num) a random quantum state.
|
||
|
||
**Return type**
|
||
|
||
ndarray
|
||
</Function>
|
||
|