Skip to content

Commit

Permalink
update docstring to accomodate bug in doctest_proper
Browse files Browse the repository at this point in the history
  • Loading branch information
noajshu committed Feb 29, 2024
1 parent bde9a0d commit a781240
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
5 changes: 2 additions & 3 deletions doc/python_api_reference_vDev.md
Original file line number Diff line number Diff line change
Expand Up @@ -2491,17 +2491,16 @@ def shortest_error_problem_as_wcnf_file(
... M 0
... DETECTOR rec[-1] rec[-2]
... """)
>>> print(circuit.shortest_error_problem_as_wcnf_file())
>>> print(circuit.shortest_error_problem_as_wcnf_file(), end='')
p wcnf 2 4 5
1 -1 0
1 -2 0
5 -1 0
5 2 0
>>> print(circuit.shortest_error_problem_as_wcnf_file(
... weighted=True,
... weight_scale_factor=1000
... ))
... ), end='')
p wcnf 2 4 4001
185 -1 0
1000 -2 0
Expand Down
5 changes: 2 additions & 3 deletions doc/stim.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1822,17 +1822,16 @@ class Circuit:
... M 0
... DETECTOR rec[-1] rec[-2]
... """)
>>> print(circuit.shortest_error_problem_as_wcnf_file())
>>> print(circuit.shortest_error_problem_as_wcnf_file(), end='')
p wcnf 2 4 5
1 -1 0
1 -2 0
5 -1 0
5 2 0
>>> print(circuit.shortest_error_problem_as_wcnf_file(
... weighted=True,
... weight_scale_factor=1000
... ))
... ), end='')
p wcnf 2 4 4001
185 -1 0
1000 -2 0
Expand Down
5 changes: 2 additions & 3 deletions glue/python/src/stim/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1822,17 +1822,16 @@ class Circuit:
... M 0
... DETECTOR rec[-1] rec[-2]
... """)
>>> print(circuit.shortest_error_problem_as_wcnf_file())
>>> print(circuit.shortest_error_problem_as_wcnf_file(), end='')
p wcnf 2 4 5
1 -1 0
1 -2 0
5 -1 0
5 2 0
>>> print(circuit.shortest_error_problem_as_wcnf_file(
... weighted=True,
... weight_scale_factor=1000
... ))
... ), end='')
p wcnf 2 4 4001
185 -1 0
1000 -2 0
Expand Down
5 changes: 2 additions & 3 deletions src/stim/circuit/circuit.pybind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2021,17 +2021,16 @@ void stim_pybind::pybind_circuit_methods(pybind11::module &, pybind11::class_<Ci
... M 0
... DETECTOR rec[-1] rec[-2]
... """)
>>> print(circuit.shortest_error_problem_as_wcnf_file())
>>> print(circuit.shortest_error_problem_as_wcnf_file(), end='')
p wcnf 2 4 5
1 -1 0
1 -2 0
5 -1 0
5 2 0
>>> print(circuit.shortest_error_problem_as_wcnf_file(
... weighted=True,
... weight_scale_factor=1000
... ))
... ), end='')
p wcnf 2 4 4001
185 -1 0
1000 -2 0
Expand Down

0 comments on commit a781240

Please sign in to comment.