Skip to content

Commit

Permalink
change apply name
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles MOUSSA committed Oct 21, 2024
1 parent 17a1c09 commit 089c309
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyqtorch/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def sample(
if self.readout_noise is None:
return counters

return self.readout_noise.apply(counters, n_shots)
return self.readout_noise.apply_on_counts(counters, n_shots)


class DropoutQuantumCircuit(QuantumCircuit):
Expand Down
4 changes: 2 additions & 2 deletions pyqtorch/noise/readout.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ def apply_on_probas(self, batch_probs: Tensor, n_shots: int = 1000) -> Tensor:
output_probs = torch.matmul(batch_probs, transition_matrix.T)
return output_probs

def apply(
def apply_on_counts(
self, counters: list[Counter | OrderedCounter] | Tensor, n_shots: int = 1000
) -> list[Counter] | Tensor:
"""_summary_
"""Apply readout on counters represented as Counters or Tensors.
Args:
counters (list[Counter | OrderedCounter] | Tensor): Samples of bit string as Counters.
Expand Down

0 comments on commit 089c309

Please sign in to comment.