Skip to content

Commit

Permalink
add untrap method to Trapper class
Browse files Browse the repository at this point in the history
  • Loading branch information
dakk committed May 17, 2024
1 parent 151ae0d commit aca00dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dqpu/verifier/basictrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ def remap_trap(t):

qc.gates = gates
return (qc, traps)

def untrap(self, trapped_qc, traps: Sequence[TrapInfo]) -> Circuit:
"""Remove traps from the quantum circuits `trapped_qc`"""
raise Exception("TODO")

def verify(self, traps: Sequence[TrapInfo], results: ExperimentResult) -> bool:
"""Get bitstring result for trap qubits, and check for the result"""
Expand Down
4 changes: 4 additions & 0 deletions dqpu/verifier/trapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ def trap(
) -> Tuple[Circuit, Sequence[TrapInfo]]:
"""Add traps to the quantum circuits `qc`"""
raise Exception("Abstract")

def untrap(self, trapped_qc, traps: Sequence[TrapInfo]) -> Circuit:
"""Remove traps from the quantum circuits `trapped_qc`"""
raise Exception("Abstract")

def untrap_results(
self, traps: Sequence[TrapInfo], results: ExperimentResult
Expand Down

0 comments on commit aca00dc

Please sign in to comment.