From de7dd3c3d0763279c6d1df249c62f35a95d3bcbe Mon Sep 17 00:00:00 2001 From: Craig Gidney Date: Tue, 26 Mar 2024 19:59:04 -0700 Subject: [PATCH] regen --- doc/python_api_reference_vDev.md | 10 +++++----- doc/stim.pyi | 10 +++++----- glue/python/src/stim/__init__.pyi | 10 +++++----- src/stim/io/raii_file.h | 6 +++--- src/stim/py/compiled_detector_sampler.pybind.cc | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/doc/python_api_reference_vDev.md b/doc/python_api_reference_vDev.md index 904f4b8d1..68f37834e 100644 --- a/doc/python_api_reference_vDev.md +++ b/doc/python_api_reference_vDev.md @@ -4408,13 +4408,13 @@ def sample_write( self, shots: int, *, - filepath: str, - format: str = '01', + filepath: Union[str, pathlib.Path], + format: 'Literal["01", "b8", "r8", "ptb64", "hits", "dets"]' = '01', + obs_out_filepath: Optional[Union[str, pathlib.Path]] = None, + obs_out_format: 'Literal["01", "b8", "r8", "ptb64", "hits", "dets"]' = '01', prepend_observables: bool = False, append_observables: bool = False, - obs_out_filepath: str = None, - obs_out_format: str = '01', -) -> None: +): """Samples detection events from the circuit and writes them to a file. Args: diff --git a/doc/stim.pyi b/doc/stim.pyi index aeb6ec670..9b305f107 100644 --- a/doc/stim.pyi +++ b/doc/stim.pyi @@ -3367,13 +3367,13 @@ class CompiledDetectorSampler: self, shots: int, *, - filepath: str, - format: str = '01', + filepath: Union[str, pathlib.Path], + format: 'Literal["01", "b8", "r8", "ptb64", "hits", "dets"]' = '01', + obs_out_filepath: Optional[Union[str, pathlib.Path]] = None, + obs_out_format: 'Literal["01", "b8", "r8", "ptb64", "hits", "dets"]' = '01', prepend_observables: bool = False, append_observables: bool = False, - obs_out_filepath: str = None, - obs_out_format: str = '01', - ) -> None: + ): """Samples detection events from the circuit and writes them to a file. Args: diff --git a/glue/python/src/stim/__init__.pyi b/glue/python/src/stim/__init__.pyi index aeb6ec670..9b305f107 100644 --- a/glue/python/src/stim/__init__.pyi +++ b/glue/python/src/stim/__init__.pyi @@ -3367,13 +3367,13 @@ class CompiledDetectorSampler: self, shots: int, *, - filepath: str, - format: str = '01', + filepath: Union[str, pathlib.Path], + format: 'Literal["01", "b8", "r8", "ptb64", "hits", "dets"]' = '01', + obs_out_filepath: Optional[Union[str, pathlib.Path]] = None, + obs_out_format: 'Literal["01", "b8", "r8", "ptb64", "hits", "dets"]' = '01', prepend_observables: bool = False, append_observables: bool = False, - obs_out_filepath: str = None, - obs_out_format: str = '01', - ) -> None: + ): """Samples detection events from the circuit and writes them to a file. Args: diff --git a/src/stim/io/raii_file.h b/src/stim/io/raii_file.h index 280fc0811..42dba8f1f 100644 --- a/src/stim/io/raii_file.h +++ b/src/stim/io/raii_file.h @@ -23,14 +23,14 @@ namespace stim { struct RaiiFile { FILE* f; bool responsible_for_closing; - RaiiFile(const char *optional_path, const char* mode); + RaiiFile(const char* optional_path, const char* mode); RaiiFile(std::string_view optional_path, const char* mode); RaiiFile(FILE* claim_ownership); RaiiFile(const RaiiFile& other) = delete; RaiiFile(RaiiFile&& other) noexcept; ~RaiiFile(); - void open(std::string_view optional_path, const char *mode); - void open(const char *optional_path, const char *mode); + void open(std::string_view optional_path, const char* mode); + void open(const char* optional_path, const char* mode); void done(); }; diff --git a/src/stim/py/compiled_detector_sampler.pybind.cc b/src/stim/py/compiled_detector_sampler.pybind.cc index 6804f34fe..459e94acb 100644 --- a/src/stim/py/compiled_detector_sampler.pybind.cc +++ b/src/stim/py/compiled_detector_sampler.pybind.cc @@ -325,7 +325,7 @@ void stim_pybind::pybind_compiled_detector_sampler_methods( pybind11::arg("obs_out_filepath") = pybind11::none(), pybind11::arg("obs_out_format") = "01", clean_doc_string(R"DOC( - @signature def sample_write(shots: int, *, filepath: Union[str, pathlib.Path], format: 'Literal["01", "b8", "r8", "ptb64", "hits", "dets"]' = '01', obs_out_filepath: Optional[Union[str, pathlib.Path]] = None, obs_out_format: 'Literal["01", "b8", "r8", "ptb64", "hits", "dets"]' = '01', prepend_observables: bool = False, append_observables: bool = False): + @signature def sample_write(self, shots: int, *, filepath: Union[str, pathlib.Path], format: 'Literal["01", "b8", "r8", "ptb64", "hits", "dets"]' = '01', obs_out_filepath: Optional[Union[str, pathlib.Path]] = None, obs_out_format: 'Literal["01", "b8", "r8", "ptb64", "hits", "dets"]' = '01', prepend_observables: bool = False, append_observables: bool = False) -> None: Samples detection events from the circuit and writes them to a file. Args: