Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/python_api_reference_vDev.md
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,7 @@ def from_file(
... with open(path, 'w') as f:
... print('CNOT 4 5', file=f)
... with open(path) as f:
... circuit = stim.Circuit.from_file(path)
... circuit = stim.Circuit.from_file(f)
>>> circuit
stim.Circuit('''
CX 4 5
Expand Down Expand Up @@ -7292,7 +7292,7 @@ def from_file(
... with open(path, 'w') as f:
... print('error(0.25) D2 D3', file=f)
... with open(path) as f:
... circuit = stim.DetectorErrorModel.from_file(path)
... circuit = stim.DetectorErrorModel.from_file(f)
>>> circuit
stim.DetectorErrorModel('''
error(0.25) D2 D3
Expand Down
4 changes: 2 additions & 2 deletions doc/stim.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ class Circuit:
... with open(path, 'w') as f:
... print('CNOT 4 5', file=f)
... with open(path) as f:
... circuit = stim.Circuit.from_file(path)
... circuit = stim.Circuit.from_file(f)
>>> circuit
stim.Circuit('''
CX 4 5
Expand Down Expand Up @@ -5714,7 +5714,7 @@ class DetectorErrorModel:
... with open(path, 'w') as f:
... print('error(0.25) D2 D3', file=f)
... with open(path) as f:
... circuit = stim.DetectorErrorModel.from_file(path)
... circuit = stim.DetectorErrorModel.from_file(f)
>>> circuit
stim.DetectorErrorModel('''
error(0.25) D2 D3
Expand Down
4 changes: 2 additions & 2 deletions glue/python/src/stim/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ class Circuit:
... with open(path, 'w') as f:
... print('CNOT 4 5', file=f)
... with open(path) as f:
... circuit = stim.Circuit.from_file(path)
... circuit = stim.Circuit.from_file(f)
>>> circuit
stim.Circuit('''
CX 4 5
Expand Down Expand Up @@ -5714,7 +5714,7 @@ class DetectorErrorModel:
... with open(path, 'w') as f:
... print('error(0.25) D2 D3', file=f)
... with open(path) as f:
... circuit = stim.DetectorErrorModel.from_file(path)
... circuit = stim.DetectorErrorModel.from_file(f)
>>> circuit
stim.DetectorErrorModel('''
error(0.25) D2 D3
Expand Down
2 changes: 1 addition & 1 deletion src/stim/circuit/circuit.pybind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ void stim_pybind::pybind_circuit_methods(pybind11::module &, pybind11::class_<Ci
... with open(path, 'w') as f:
... print('CNOT 4 5', file=f)
... with open(path) as f:
... circuit = stim.Circuit.from_file(path)
... circuit = stim.Circuit.from_file(f)
>>> circuit
stim.Circuit('''
CX 4 5
Expand Down
2 changes: 1 addition & 1 deletion src/stim/dem/detector_error_model.pybind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ void stim_pybind::pybind_detector_error_model_methods(
... with open(path, 'w') as f:
... print('error(0.25) D2 D3', file=f)
... with open(path) as f:
... circuit = stim.DetectorErrorModel.from_file(path)
... circuit = stim.DetectorErrorModel.from_file(f)
>>> circuit
stim.DetectorErrorModel('''
error(0.25) D2 D3
Expand Down
Loading