---
title: ParameterVector (v2.0)
description: API reference for qiskit.circuit.ParameterVector in qiskit v2.0
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/2.0/qiskit.circuit.ParameterVector
---

# ParameterVector

*class* `qiskit.circuit.ParameterVector(name, length=0)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.0/qiskit/circuit/parametervector.py#L55-L140)

Bases: [`object`](https://docs.python.org/3/library/functions.html#object)

A container of many related [`Parameter`](/docs/api/qiskit/2.0/qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects.

This class is faster to construct than constructing many [`Parameter`](/docs/api/qiskit/2.0/qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects individually, and the individual names of the parameters will all share a common stem (the name of the vector). For a vector called `v` with length 3, the individual elements will have names `v[0]`, `v[1]` and `v[2]`.

The elements of a vector are sorted by the name of the vector, then the numeric value of their index.

This class fulfill the [`collections.abc.Sequence`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence) interface.

## Attributes

### name

The name of the [`ParameterVector`](#qiskit.circuit.ParameterVector "qiskit.circuit.ParameterVector").

### params

A list of the contained [`ParameterVectorElement`](/docs/api/qiskit/2.0/qiskit.circuit.ParameterVectorElement "qiskit.circuit.ParameterVectorElement") instances.

It is not safe to mutate this list.

## Methods

### index

`index(value)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.0/qiskit/circuit/parametervector.py#L91-L95)

Find the index of a [`ParameterVectorElement`](/docs/api/qiskit/2.0/qiskit.circuit.ParameterVectorElement "qiskit.circuit.ParameterVectorElement") within the list.

It is typically much faster to use the [`ParameterVectorElement.index`](/docs/api/qiskit/2.0/qiskit.circuit.ParameterVectorElement#index "qiskit.circuit.ParameterVectorElement.index") property.

### resize

`resize(length)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.0/qiskit/circuit/parametervector.py#L112-L140)

Resize the parameter vector. If necessary, new elements are generated.

Note that the UUID of each [`Parameter`](/docs/api/qiskit/2.0/qiskit.circuit.Parameter "qiskit.circuit.Parameter") element will be generated deterministically given the root UUID of the `ParameterVector` and the index of the element. In particular, if a `ParameterVector` is resized to be smaller and then later resized to be larger, the UUID of the later generated element at a given index will be the same as the UUID of the previous element at that index. This is to ensure that the parameter instances do not change.

```python
>>> from qiskit.circuit import ParameterVector
>>> pv = ParameterVector("theta", 20)
>>> elt_19 = pv[19]
>>> rv.resize(10)
>>> rv.resize(20)
>>> pv[19] == elt_19
True
```
