@@ -211,7 +211,7 @@ def _setup_dict(array_view, view_shape, simulator, post_process):
211
211
212
212
213
213
def _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."""
215
215
x_np = _convert_complex_view_to_np (INFO_DICT ['arr' ], INFO_DICT ['shape' ])
216
216
simulator = INFO_DICT ['sim' ]
217
217
@@ -243,7 +243,7 @@ def _analytical_expectation_worker_func(indices, programs, params, ops):
243
243
continue
244
244
245
245
if old_batch_index != batch_index :
246
- # must compute a new wavefunction .
246
+ # must compute a new state vector .
247
247
qubit_oder = dict (
248
248
zip (sorted (programs [batch_index ].all_qubits ()),
249
249
list (range (len (programs [batch_index ].all_qubits ())))))
@@ -349,7 +349,7 @@ def batch_calculate_state(circuits, param_resolvers, simulator):
349
349
`cirq.ParamResolver` in `param_resolvers` was used to resolve any symbols
350
350
in it. If simulator is a `cirq.DensityMatrixSimulator` this final state will
351
351
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`
353
353
`batch_calculate_state` will use `param_resolvers[i]` to resolve the symbols
354
354
in `circuits[i]` and then place the final state in the return list at index
355
355
`i`.
@@ -445,8 +445,8 @@ def batch_calculate_expectation(circuits, param_resolvers, ops, simulator):
445
445
state .final_density_matrix , order ) for x in op ).real
446
446
elif isinstance (simulator , cirq .Simulator ):
447
447
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
450
450
else :
451
451
raise TypeError ('Simulator {} is not supported by '
452
452
'batch_calculate_expectation.' .format (type (simulator )))
@@ -620,7 +620,7 @@ def batch_sample(circuits, param_resolvers, n_samples, simulator):
620
620
repetitions = n_samples )
621
621
elif isinstance (simulator , cirq .Simulator ):
622
622
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 )
624
624
else :
625
625
raise TypeError ('Simulator {} is not supported by batch_sample.' .format (
626
626
type (simulator )))
0 commit comments