From e7e2489beab8e6a56f694c6ee732cd200f956259 Mon Sep 17 00:00:00 2001 From: Jake Lishman Date: Fri, 5 Jan 2024 13:08:21 +0000 Subject: [PATCH] Update qiskit/circuit/parametertable.py Co-authored-by: Julien Gacon --- qiskit/circuit/parametertable.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qiskit/circuit/parametertable.py b/qiskit/circuit/parametertable.py index 71659aa6474d..15a0ad7c4e6a 100644 --- a/qiskit/circuit/parametertable.py +++ b/qiskit/circuit/parametertable.py @@ -169,12 +169,14 @@ def get_names(self): return self._names.keys() def parameter_from_name(self, name: str, default: typing.Any = None): - """Get a :class:`.Parameter` with references in this table by its string name, or return the - default if not present. + """Get a :class:`.Parameter` with references in this table by its string name. + + If the parameter is not present, return the ``default`` value. Args: - name: the name of the :class:`.Parameter` - default: the object that should be returned if the parameter is missing.""" + name: The name of the :class:`.Parameter` + default: The object that should be returned if the parameter is missing. + """ return self._names.get(name, default) def discard_references(self, expression, key):