Skip to content

Commit 18e52db

Browse files
authored
Fix typos in two files (#1096)
- This fixes two typos of "representation" caught by the CommonTypos tool
1 parent 957c13a commit 18e52db

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/openfermion/ops/representations/polynomial_tensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
12-
"""Base class for representating operators that are polynomials in the
12+
"""Base class for representing operators that are polynomials in the
1313
fermionic ladder operators."""
1414

1515
import copy

src/openfermion/ops/representations/quadratic_hamiltonian.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def ground_energy(self):
130130
return numpy.sum(orbital_energies[numpy.where(orbital_energies < 0.0)[0]]) + constant
131131

132132
def majorana_form(self):
133-
r"""Return the Majorana represention of the Hamiltonian.
133+
r"""Return the Majorana representation of the Hamiltonian.
134134
135135
Any quadratic Hamiltonian can be written in the form
136136
@@ -317,9 +317,9 @@ def index_map(i):
317317
orbital_energies = numpy.concatenate((up_orbital_energies, down_orbital_energies))
318318
diagonalizing_unitary_T = numpy.zeros((n_modes, n_modes), dtype=complex)
319319
diagonalizing_unitary_T[: n_modes // 2, : n_modes // 2] = up_diagonalizing_unitary_T
320-
diagonalizing_unitary_T[
321-
n_modes // 2 :, n_modes // 2 :
322-
] = down_diagonalizing_unitary_T
320+
diagonalizing_unitary_T[n_modes // 2 :, n_modes // 2 :] = (
321+
down_diagonalizing_unitary_T
322+
)
323323
else:
324324
orbital_energies, diagonalizing_unitary_T = numpy.linalg.eigh(matrix)
325325

src/openfermion/transforms/opconversions/qubitoperator_to_paulisum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def qubit_operator_to_pauli_sum(
4848
pauli_sum (PauliSum): cirq PauliSum object.
4949
5050
Raises:
51-
TypeError: if qubit_op is not a QubitOpertor.
51+
TypeError: if qubit_op is not a QubitOperator.
5252
"""
5353
if not isinstance(operator, QubitOperator):
5454
raise TypeError('Input must be a QubitOperator.')

0 commit comments

Comments
 (0)