Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust some more TeX expressions for rendering in web docs #6942

Merged
merged 2 commits into from
Jan 12, 2025
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
2 changes: 1 addition & 1 deletion cirq-core/cirq/experiments/qubit_characterizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def pauli_error(self) -> float:
$$r_p = (1 - 1/d^2) * (1 - p),$$
where $d = 2^N_Q$ is the Hilbert space dimension and $N_Q$ is the number of qubits.
where $d = 2^{N_Q}$ is the Hilbert space dimension and $N_Q$ is the number of qubits.
"""
opt_params, _ = self._fit_exponential()
p = opt_params[2]
Expand Down
4 changes: 2 additions & 2 deletions cirq-core/cirq/ops/common_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def p(self) -> float:
"""The probability that one of the Pauli gates is applied.
Each of the Pauli gates is applied independently with probability
$p / (4^n_qubits - 1)$.
$p / (4^n - 1)$, where $n$ is `n_qubits`.
"""
return self._p

Expand Down Expand Up @@ -372,7 +372,7 @@ def depolarize(p: float, n_qubits: int = 1) -> DepolarizingChannel:
Args:
p: The probability that one of the Pauli gates is applied. Each of
the Pauli gates is applied independently with probability
$p / (4^n - 1)$.
$p / (4^n - 1)$, where $n$ is n_qubits.
n_qubits: The number of qubits.
Raises:
Expand Down
2 changes: 1 addition & 1 deletion cirq-core/cirq/ops/phased_x_z_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def from_zyz_angles(cls, z0_rad: float, y_rad: float, z1_rad: float) -> 'cirq.Ph
def from_zyz_exponents(cls, z0: float, y: float, z1: float) -> 'cirq.PhasedXZGate':
"""Create a PhasedXZGate from ZYZ exponents.

The returned gate is equivalent to $Z^z0 Y^y Z^z1$ (in time order).
The returned gate is equivalent to $Z^{z0} Y^y Z^{z1}$ (in time order).
"""
return PhasedXZGate(axis_phase_exponent=-z0 + 0.5, x_exponent=y, z_exponent=z0 + z1)

Expand Down
4 changes: 2 additions & 2 deletions cirq-core/cirq/testing/sample_gates.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _matrix_for_phasing_state(num_qubits, phase_state, phase):

@dataclasses.dataclass(frozen=True)
class PhaseUsingCleanAncilla(ops.Gate):
r"""Phases the state $|phase_state>$ by $\exp(1j * \pi * \theta)$ using one clean ancilla."""
r"""Phases the state $|phase\_state>$ by $\exp(1j * \pi * \theta)$ using one clean ancilla."""

theta: float
phase_state: int = 1
Expand All @@ -56,7 +56,7 @@ def narrow_unitary(self) -> np.ndarray:

@dataclasses.dataclass(frozen=True)
class PhaseUsingDirtyAncilla(ops.Gate):
r"""Phases the state $|phase_state>$ by -1 using one dirty ancilla."""
r"""Phases the state $|phase\_state>$ by -1 using one dirty ancilla."""

phase_state: int = 1
target_bitsize: int = 1
Expand Down