Skip to content

Commit

Permalink
revert pylintrc; disable pylint checks on specific lines instead
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed Jan 4, 2022
1 parent 65ac665 commit 2fbe7a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme

# Good variable names which should always be accepted, separated by a comma
# i,j,k = typical indices
# n,m,p = typical numbers
# n,m = typical numbers
# ex = for exceptions and errors
# v,w = typical vectors
# x,y,z = typical axes
Expand All @@ -118,7 +118,7 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme
# pi = the PI constant
# op = operation iterator
# b = basis iterator
good-names=i,j,k,n,m,p,ex,v,w,x,y,z,Run,_,logger,q,c,r,qr,cr,qc,nd,pi,op,b,ar,br,a,mu,
good-names=i,j,k,n,m,ex,v,w,x,y,z,Run,_,logger,q,c,r,qr,cr,qc,nd,pi,op,b,ar,br,a,mu,
__unittest,iSwapGate

# Bad variable names which should always be refused, separated by a comma
Expand Down Expand Up @@ -154,7 +154,7 @@ class-rgx=[A-Z_][a-zA-Z0-9]+$
class-name-hint=[A-Z_][a-zA-Z0-9]+$

# Regular expression matching correct function names
function-rgx=[a-z_][a-z0-9_]{2,50}$
function-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for function names
function-name-hint=[a-z_][a-z0-9_]{2,30}$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def __init__(
if not len(transformation_matrix.shape) == 2:
raise ValueError("transformation_matrix must be a 2-dimensional array.")

n, p = transformation_matrix.shape
n, p = transformation_matrix.shape # pylint: disable=invalid-name
if p != n * 2:
raise ValueError("transformation_matrix must have shape (n_orbitals, 2 * n_orbitals).")
# TODO maybe check known matrix constraints
Expand All @@ -184,7 +184,7 @@ def __init__(
raise NotImplementedError("Currently, only the Jordan-Wigner Transform is supported.")


def _prepare_slater_determinant_jordan_wigner(
def _prepare_slater_determinant_jordan_wigner( # pylint: disable=invalid-name
register: QuantumRegister, transformation_matrix: np.ndarray
) -> Iterable[Tuple[Gate, Tuple[Qubit, ...]]]:
m, n = transformation_matrix.shape
Expand Down Expand Up @@ -231,7 +231,7 @@ def _prepare_slater_determinant_jordan_wigner(
yield from reversed(decomposition)


def _prepare_fermionic_gaussian_state_jordan_wigner(
def _prepare_fermionic_gaussian_state_jordan_wigner( # pylint: disable=invalid-name
register: QuantumRegister, transformation_matrix: np.ndarray, occupied_orbitals: Sequence[int]
) -> Iterable[Tuple[Gate, Tuple[Qubit, ...]]]:
n, _ = transformation_matrix.shape
Expand Down

0 comments on commit 2fbe7a2

Please sign in to comment.