qiskit-documentation/docs/api/qiskit/0.24/qiskit.aqua.utils.random_h1...

33 lines
787 B
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_h1_body
description: API reference for qiskit.aqua.utils.random_h1_body
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.aqua.utils.random_h1_body
---
<span id="qiskit-aqua-utils-random-h1-body" />
# qiskit.aqua.utils.random\_h1\_body
<Function id="qiskit.aqua.utils.random_h1_body" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.8/qiskit/aqua/utils/random_matrix_generator.py" signature="random_h1_body(N)">
Generate a random one body integrals.
**Parameters**
**N** (*int*) the number of spin orbitals.
**Returns**
a 2-D matrix with complex data type.
**Return type**
np.ndarray
**Raises**
**ValueError** invalid number of spin orbitals
</Function>