Skip to content

Commit

Permalink
Added name attribute to subspace classes for reference
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWeaving committed Nov 28, 2023
1 parent 4c877cc commit 39570b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions symmer/projection/contextual_subspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class ContextualSubspace(S3Projection):
5. drop the corresponding qubits from the Hamiltonian whilst
6. fixing the +/-1 eigenvalues
"""
name = 'contextual_subspace' # for reference in QubitSubspaceManager

def __init__(self,
operator: PauliwordOp,
noncontextual_strategy: str = 'diag',
Expand Down
2 changes: 2 additions & 0 deletions symmer/projection/qubit_tapering.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class QubitTapering(S3Projection):
Steps 1-2 are handled in this class whereas we defer to the parent S3Projection for 3-5.
"""
name = 'qubit_tapering' # for reference in QubitSubspaceManager

def __init__(self,
operator: PauliwordOp,
target_sqp: str = 'Z'
Expand Down

0 comments on commit 39570b2

Please sign in to comment.