Skip to content

Commit 7b97ead

Browse files
authored
Fix density matrix references in other simulators (#6537)
- These simulators do not use density matrices. Fixes: #6225
1 parent fc3cc70 commit 7b97ead

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: cirq-core/cirq/sim/simulation_state.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def get_axes(self, qubits: Sequence['cirq.Qid']) -> List[int]:
111111
return [self.qubit_map[q] for q in qubits]
112112

113113
def _perform_measurement(self, qubits: Sequence['cirq.Qid']) -> List[int]:
114-
"""Delegates the call to measure the density matrix."""
114+
"""Delegates the call to measure the `QuantumStateRepresentation`."""
115115
if self._state is not None:
116116
return self._state.measure(self.get_axes(qubits), self.prng)
117117
raise NotImplementedError()

Diff for: cirq-core/cirq/sim/state_vector_simulation_state.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ def create(
6060
This initializer creates the buffer if necessary.
6161
6262
Args:
63-
initial_state: The density matrix, must be correctly formatted. The data is not
63+
initial_state: The state vector, must be correctly formatted. The data is not
6464
checked for validity here due to performance concerns.
65-
qid_shape: The shape of the density matrix, if the initial state is provided as an int.
66-
dtype: The dtype of the density matrix, if the initial state is provided as an int.
67-
buffer: Optional, must be length 3 and same shape as the density matrix. If not
65+
qid_shape: The shape of the state vector, if the initial state is provided as an int.
66+
dtype: The dtype of the state vector, if the initial state is provided as an int.
67+
buffer: Optional, must be length 3 and same shape as the state vector. If not
6868
provided, a buffer will be created automatically.
6969
Raises:
7070
ValueError: If initial state is provided as integer, but qid_shape is not provided.

0 commit comments

Comments
 (0)