@@ -211,7 +211,7 @@ def _setup_dict(array_view, view_shape, simulator, post_process):
211211
212212
213213def _state_worker_func (indices , programs , params ):
214- """Compute the wavefunction for each program in indices."""
214+ """Compute the state vector for each program in indices."""
215215 x_np = _convert_complex_view_to_np (INFO_DICT ['arr' ], INFO_DICT ['shape' ])
216216 simulator = INFO_DICT ['sim' ]
217217
@@ -243,7 +243,7 @@ def _analytical_expectation_worker_func(indices, programs, params, ops):
243243 continue
244244
245245 if old_batch_index != batch_index :
246- # must compute a new wavefunction .
246+ # must compute a new state vector .
247247 qubit_oder = dict (
248248 zip (sorted (programs [batch_index ].all_qubits ()),
249249 list (range (len (programs [batch_index ].all_qubits ())))))
@@ -349,7 +349,7 @@ def batch_calculate_state(circuits, param_resolvers, simulator):
349349 `cirq.ParamResolver` in `param_resolvers` was used to resolve any symbols
350350 in it. If simulator is a `cirq.DensityMatrixSimulator` this final state will
351351 be a density matrix, if simulator is a `cirq.Simulator` this final state
352- will be a wavefunction . More specifically for a given `i`
352+ will be a state vector . More specifically for a given `i`
353353 `batch_calculate_state` will use `param_resolvers[i]` to resolve the symbols
354354 in `circuits[i]` and then place the final state in the return list at index
355355 `i`.
@@ -445,8 +445,8 @@ def batch_calculate_expectation(circuits, param_resolvers, ops, simulator):
445445 state .final_density_matrix , order ) for x in op ).real
446446 elif isinstance (simulator , cirq .Simulator ):
447447 post_process = \
448- lambda op , state , order : op .expectation_from_wavefunction (
449- state .final_state , order ).real
448+ lambda op , state , order : op .expectation_from_state_vector (
449+ state .final_state_vector , order ).real
450450 else :
451451 raise TypeError ('Simulator {} is not supported by '
452452 'batch_calculate_expectation.' .format (type (simulator )))
@@ -620,7 +620,7 @@ def batch_sample(circuits, param_resolvers, n_samples, simulator):
620620 repetitions = n_samples )
621621 elif isinstance (simulator , cirq .Simulator ):
622622 post_process = lambda state , size , n_samples : cirq .sample_state_vector (
623- state .final_state , list (range (size )), repetitions = n_samples )
623+ state .final_state_vector , list (range (size )), repetitions = n_samples )
624624 else :
625625 raise TypeError ('Simulator {} is not supported by batch_sample.' .format (
626626 type (simulator )))
0 commit comments