Skip to content

Commit a001907

Browse files
committed
Capitalize pauli
1 parent 21460ea commit a001907

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

torchquantum/plugin/cuquantum/cutn/backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def _create_expectation_module(
5252
self, circuit: ParameterizedQuantumCircuit, pauli_ops: Union[List[str], Dict[str, float]]
5353
) -> nn.Module:
5454
if self._allow_multiple_states:
55-
# In order to utilize caching feature of the network states, we need to create a seperate network state for each pauli operator.
55+
# In order to utilize caching feature of the network states, we need to create a seperate network state for each Pauli operator.
5656
# Otherwise, the network state cache will be overwritten when pauli_op changes.
5757
states = [
5858
ParameterizedNetworkState.from_parameterized_circuit(circuit, self._config)

torchquantum/plugin/cuquantum/cutn/expectation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CuTNExpectationFD(nn.Module):
1313
def __init__(self, states, pauli_ops, circuit_params, delta):
1414
super().__init__()
1515
if len(states) != len(pauli_ops):
16-
raise ValueError(f"Expected as many states as pauli operators, got {len(states)} and {len(pauli_ops)}")
16+
raise ValueError(f"Expected as many states as Pauli operators, got {len(states)} and {len(pauli_ops)}")
1717
if len(states) == 0:
1818
raise ValueError(f"Expected at least one state")
1919

torchquantum/plugin/cuquantum/expectation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class QuantumExpectation(nn.Module):
2121
circuit: The quantum circuit that prepares the state.
2222
backend: The quantum backend to use for computation.
2323
pauli_ops: List of Pauli operators to compute expectations for. Each Pauli operator can be either:
24-
- A single Pauli string specifying the pauli operator for each qubit ("I", "X", "Y", or "Z").
24+
- A single Pauli string specifying the Pauli operator for each qubit ("I", "X", "Y", or "Z").
2525
- A linear combination of Pauli strings specified as a dictionary mapping each single Pauli string to
2626
its corresponding coefficient.
2727
"""

0 commit comments

Comments
 (0)