English
Languages
English
Japanese
German
Korean
Shortcuts

qiskit.circuit.ParameterVector

class ParameterVector(name, length=0)[source]

ParameterVector class to quickly generate lists of parameters.

__init__(name, length=0)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(name[, length])

Initialize self.

resize(length)

Resize the parameter vector.

Attributes

name

Returns the name of the ParameterVector.

params

Returns the list of parameters in the ParameterVector.

property name

Returns the name of the ParameterVector.

property params

Returns the list of parameters in the ParameterVector.

resize(length)[source]

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 enlargened again. This is to ensure that the parameter instances do not change.