Skip to content

Commit

Permalink
🐛 Fix invalid escape sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
EarlMilktea committed Sep 12, 2024
1 parent e07fc26 commit a000a74
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyzx/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ def pretty_complex(z: complex) -> str:
else:
out += f"{r:.2f}".rstrip("0").rstrip(".")
if abs(f) > 1:
out += f"\cdot 10^{{{-f}}}"
out += f"\\cdot 10^{{{-f}}}"

minus = ""
if arg < 0:
Expand Down
2 changes: 1 addition & 1 deletion pyzx/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def CNOT_HAD_PHASE_circuit(
clifford:bool=False
) -> Circuit:
"""Construct a Circuit consisting of CNOT, HAD and phase gates.
The default phase gate is the T gate, but if ``clifford=True``\ , then
The default phase gate is the T gate, but if ``clifford=True``, then
this is replaced by the S gate.
Args:
Expand Down
2 changes: 1 addition & 1 deletion pyzx/gflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""
r"""
Based on algorithm by Perdrix and Mhalla. Here is the pseudocode from
dx.doi.org/10.1007/978-3-540-70575-8_70
Expand Down
2 changes: 1 addition & 1 deletion pyzx/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""This module implements several optimization methods on ``Circuit``\ s.
"""This module implements several optimization methods on ``Circuit`` s.
The function :func:`basic_optimization` runs a set of back-and-forth gate commutation and cancellation routines.
:func:`phase_block_optimize` does phase polynomial optimization using the TODD algorithm,
and :func:`full_optimize` combines these two methods."""
Expand Down
2 changes: 1 addition & 1 deletion pyzx/todd.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def phase_gates_to_poly(gates: List[Gate], qubits: int) -> Tuple[ParityPolynomia


def xi(m: Mat2, z: List[Z2]) -> Mat2:
"""Constructs the \chi matrix from the TOpt paper."""
r"""Constructs the \chi matrix from the TOpt paper."""
arr = np.asarray(m.data)
rows = m.rows()
data = []
Expand Down

0 comments on commit a000a74

Please sign in to comment.