45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
---
|
||
title: random_iqp (latest version)
|
||
description: API reference for qiskit.circuit.library.random_iqp in the latest version of qiskit
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.circuit.library.random_iqp
|
||
---
|
||
|
||
<span id="random-iqp" />
|
||
|
||
# random\_iqp
|
||
|
||
<Class id="qiskit.circuit.library.random_iqp" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/stable/1.3/qiskit/circuit/library/iqp.py#L150-L180" signature="qiskit.circuit.library.random_iqp(num_qubits, seed=None)" modifiers="class">
|
||
Bases:
|
||
|
||
A random instantaneous quantum polynomial time (IQP) circuit.
|
||
|
||
See [`iqp()`](qiskit.circuit.library.iqp_function#qiskit.circuit.library.iqp "qiskit.circuit.library.iqp") for more details on the IQP circuit.
|
||
|
||
Example:
|
||
|
||
```python
|
||
from qiskit.circuit.library import random_iqp
|
||
|
||
circuit = random_iqp(3)
|
||
circuit.draw("mpl")
|
||
```
|
||
|
||

|
||
|
||
**Parameters**
|
||
|
||
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) – The number of qubits in the circuit.
|
||
* **seed** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) – A seed for the random number generator, in case the interactions matrix is randomly generated.
|
||
|
||
**Returns**
|
||
|
||
An IQP circuit.
|
||
|
||
**Return type**
|
||
|
||
[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
|
||
</Class>
|
||
|