From 75ad958b0c2121436954bc51f83925367deccdf4 Mon Sep 17 00:00:00 2001 From: Max Rossmannek Date: Mon, 4 Sep 2023 16:33:05 +0200 Subject: [PATCH] docs: add missing type hints to operator attributes --- qiskit_nature/second_q/operators/bosonic_op.py | 8 ++++---- qiskit_nature/second_q/operators/fermionic_op.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/qiskit_nature/second_q/operators/bosonic_op.py b/qiskit_nature/second_q/operators/bosonic_op.py index 0bdbada3b..e73035dcd 100644 --- a/qiskit_nature/second_q/operators/bosonic_op.py +++ b/qiskit_nature/second_q/operators/bosonic_op.py @@ -132,10 +132,10 @@ class BosonicOp(SparseLabelOp): pairs describing the terms contained in the operator. Attributes: - num_modes: the number of modes on which this operator acts. This is - considered a lower bound, which means that mathematical operations acting on two or more - operators will result in a new operator with the maximum number of modes of any - of the involved operators. + num_modes (int | None): the number of modes on which this operator acts. This is considered + a lower bound, which means that mathematical operations acting on two or more operators + will result in a new operator with the maximum number of modes of any of the involved + operators. .. note:: diff --git a/qiskit_nature/second_q/operators/fermionic_op.py b/qiskit_nature/second_q/operators/fermionic_op.py index 4c96ccaf9..f5254a8cd 100644 --- a/qiskit_nature/second_q/operators/fermionic_op.py +++ b/qiskit_nature/second_q/operators/fermionic_op.py @@ -135,10 +135,10 @@ class FermionicOp(SparseLabelOp): pairs describing the terms contained in the operator. Attributes: - num_spin_orbitals: the number of spin orbitals on which this operator acts. This is - considered a lower bound, which means that mathematical operations acting on two or more - operators will result in a new operator with the maximum number of spin orbitals of any - of the involved operators. + num_spin_orbitals (int | None): the number of spin orbitals on which this operator acts. + This is considered a lower bound, which means that mathematical operations acting on two + or more operators will result in a new operator with the maximum number of spin orbitals + of any of the involved operators. .. note::