qiskit-documentation/docs/api/qiskit/0.25/qiskit.circuit.ParameterVec...

62 lines
2.9 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: ParameterVector
description: API reference for qiskit.circuit.ParameterVector
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.circuit.ParameterVector
---
# qiskit.circuit.ParameterVector
<Class id="qiskit.circuit.ParameterVector" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/circuit/parametervector.py" signature="ParameterVector(name, length=0)" modifiers="class">
ParameterVector class to quickly generate lists of parameters.
### \_\_init\_\_
<Function id="qiskit.circuit.ParameterVector.__init__" signature="__init__(name, length=0)">
Initialize self. See help(type(self)) for accurate signature.
</Function>
## Methods
| | |
| ----------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| [`__init__`](#qiskit.circuit.ParameterVector.__init__ "qiskit.circuit.ParameterVector.__init__")(name\[, length]) | Initialize self. |
| [`index`](#qiskit.circuit.ParameterVector.index "qiskit.circuit.ParameterVector.index")(value) | Returns first index of value. |
| [`resize`](#qiskit.circuit.ParameterVector.resize "qiskit.circuit.ParameterVector.resize")(length) | Resize the parameter vector. |
## Attributes
| | |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------ |
| [`name`](#qiskit.circuit.ParameterVector.name "qiskit.circuit.ParameterVector.name") | Returns the name of the ParameterVector. |
| [`params`](#qiskit.circuit.ParameterVector.params "qiskit.circuit.ParameterVector.params") | Returns the list of parameters in the ParameterVector. |
### index
<Function id="qiskit.circuit.ParameterVector.index" signature="index(value)">
Returns first index of value.
</Function>
### name
<Attribute id="qiskit.circuit.ParameterVector.name">
Returns the name of the ParameterVector.
</Attribute>
### params
<Attribute id="qiskit.circuit.ParameterVector.params">
Returns the list of parameters in the ParameterVector.
</Attribute>
### resize
<Function id="qiskit.circuit.ParameterVector.resize" signature="resize(length)">
Resize the parameter vector.
If necessary, new elements are generated. If length is smaller than before, the previous elements are cached and not re-generated if the vector is enlarged again. This is to ensure that the parameter instances do not change.
</Function>
</Class>