Skip to content

Commit

Permalink
Use attrs.
Browse files Browse the repository at this point in the history
  • Loading branch information
fdmalone committed Apr 29, 2024
1 parent c70c5ce commit e65696d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions qualtran/bloqs/chemistry/sparse/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from functools import cached_property
from typing import Dict, Optional, Set, Tuple, TYPE_CHECKING

import attrs
import numpy as np
from attrs import evolve, field, frozen
from numpy.typing import NDArray

from qualtran import (
Expand Down Expand Up @@ -111,7 +111,7 @@ def _add(p_indx: int, q_indx: int, r_indx: int, s_indx: int):
return np.concatenate((tpq_indx, pqrs_indx_np)), np.concatenate((tpq_sparse, eris_eight))


@frozen
@attrs.frozen
class PrepareSparse(PrepareOracle):
r"""Prepare oracle for the sparse chemistry Hamiltonian
Expand Down Expand Up @@ -166,13 +166,13 @@ class PrepareSparse(PrepareOracle):
num_spin_orb: int
num_non_zero: int
num_bits_state_prep: int
alt_pqrs: Tuple[Tuple[int, ...], ...] = field(repr=False)
alt_theta: Tuple[int, ...] = field(repr=False)
alt_one_body: Tuple[int, ...] = field(repr=False)
ind_pqrs: Tuple[Tuple[int, ...], ...] = field(repr=False)
theta: Tuple[int, ...] = field(repr=False)
one_body: Tuple[int, ...] = field(repr=False)
keep: Tuple[int, ...] = field(repr=False)
alt_pqrs: Tuple[Tuple[int, ...], ...] = attrs.field(repr=False)
alt_theta: Tuple[int, ...] = attrs.field(repr=False)
alt_one_body: Tuple[int, ...] = attrs.field(repr=False)
ind_pqrs: Tuple[Tuple[int, ...], ...] = attrs.field(repr=False)
theta: Tuple[int, ...] = attrs.field(repr=False)
one_body: Tuple[int, ...] = attrs.field(repr=False)
keep: Tuple[int, ...] = attrs.field(repr=False)
num_bits_rot_aa: int = 8
is_adjoint: bool = False
qroam_block_size: Optional[int] = None
Expand Down

0 comments on commit e65696d

Please sign in to comment.