@@ -269,7 +269,7 @@ def test_recursive_params():
269269
270270 # First example should behave like an X when simulated
271271 result = cirq .Simulator ().simulate (cirq .Circuit (circuitop ), param_resolver = outer_params )
272- assert np .allclose (result .state_vector (copy = False ), [0 , 1 ])
272+ assert np .allclose (result .state_vector (), [0 , 1 ])
273273
274274
275275@pytest .mark .parametrize ('add_measurements' , [True , False ])
@@ -345,9 +345,9 @@ def test_repeat_zero_times(add_measurements, use_repetition_ids, initial_reps):
345345 subcircuit .freeze (), repetitions = initial_reps , use_repetition_ids = use_repetition_ids
346346 )
347347 result = cirq .Simulator ().simulate (cirq .Circuit (op ))
348- assert np .allclose (result .state_vector (copy = False ), [0 , 1 ] if initial_reps % 2 else [1 , 0 ])
348+ assert np .allclose (result .state_vector (), [0 , 1 ] if initial_reps % 2 else [1 , 0 ])
349349 result = cirq .Simulator ().simulate (cirq .Circuit (op ** 0 ))
350- assert np .allclose (result .state_vector (copy = False ), [1 , 0 ])
350+ assert np .allclose (result .state_vector (), [1 , 0 ])
351351
352352
353353def test_no_repetition_ids ():
@@ -377,13 +377,13 @@ def test_parameterized_repeat():
377377 assert cirq .parameter_names (op ) == {'a' }
378378 assert not cirq .has_unitary (op )
379379 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 0 })
380- assert np .allclose (result .state_vector (copy = False ), [1 , 0 ])
380+ assert np .allclose (result .state_vector (), [1 , 0 ])
381381 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 1 })
382- assert np .allclose (result .state_vector (copy = False ), [0 , 1 ])
382+ assert np .allclose (result .state_vector (), [0 , 1 ])
383383 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 2 })
384- assert np .allclose (result .state_vector (copy = False ), [1 , 0 ])
384+ assert np .allclose (result .state_vector (), [1 , 0 ])
385385 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : - 1 })
386- assert np .allclose (result .state_vector (copy = False ), [0 , 1 ])
386+ assert np .allclose (result .state_vector (), [0 , 1 ])
387387 with pytest .raises (TypeError , match = 'Only integer or sympy repetitions are allowed' ):
388388 cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 1.5 })
389389 with pytest .raises (ValueError , match = 'Circuit contains ops whose symbols were not specified' ):
@@ -392,13 +392,13 @@ def test_parameterized_repeat():
392392 assert cirq .parameter_names (op ) == {'a' }
393393 assert not cirq .has_unitary (op )
394394 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 0 })
395- assert np .allclose (result .state_vector (copy = False ), [1 , 0 ])
395+ assert np .allclose (result .state_vector (), [1 , 0 ])
396396 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 1 })
397- assert np .allclose (result .state_vector (copy = False ), [0 , 1 ])
397+ assert np .allclose (result .state_vector (), [0 , 1 ])
398398 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 2 })
399- assert np .allclose (result .state_vector (copy = False ), [1 , 0 ])
399+ assert np .allclose (result .state_vector (), [1 , 0 ])
400400 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : - 1 })
401- assert np .allclose (result .state_vector (copy = False ), [0 , 1 ])
401+ assert np .allclose (result .state_vector (), [0 , 1 ])
402402 with pytest .raises (TypeError , match = 'Only integer or sympy repetitions are allowed' ):
403403 cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 1.5 })
404404 with pytest .raises (ValueError , match = 'Circuit contains ops whose symbols were not specified' ):
@@ -407,11 +407,11 @@ def test_parameterized_repeat():
407407 assert cirq .parameter_names (op ) == {'a' , 'b' }
408408 assert not cirq .has_unitary (op )
409409 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 1 , 'b' : 1 })
410- assert np .allclose (result .state_vector (copy = False ), [0 , 1 ])
410+ assert np .allclose (result .state_vector (), [0 , 1 ])
411411 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 2 , 'b' : 1 })
412- assert np .allclose (result .state_vector (copy = False ), [1 , 0 ])
412+ assert np .allclose (result .state_vector (), [1 , 0 ])
413413 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 1 , 'b' : 2 })
414- assert np .allclose (result .state_vector (copy = False ), [1 , 0 ])
414+ assert np .allclose (result .state_vector (), [1 , 0 ])
415415 with pytest .raises (TypeError , match = 'Only integer or sympy repetitions are allowed' ):
416416 cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 1.5 , 'b' : 1 })
417417 with pytest .raises (ValueError , match = 'Circuit contains ops whose symbols were not specified' ):
@@ -420,11 +420,11 @@ def test_parameterized_repeat():
420420 assert cirq .parameter_names (op ) == {'a' , 'b' }
421421 assert not cirq .has_unitary (op )
422422 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 1 , 'b' : 1 })
423- assert np .allclose (result .state_vector (copy = False ), [1 , 0 ])
423+ assert np .allclose (result .state_vector (), [1 , 0 ])
424424 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 1.5 , 'b' : 1 })
425- assert np .allclose (result .state_vector (copy = False ), [0 , 1 ])
425+ assert np .allclose (result .state_vector (), [0 , 1 ])
426426 result = cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 1 , 'b' : 1.5 })
427- assert np .allclose (result .state_vector (copy = False ), [0 , 1 ])
427+ assert np .allclose (result .state_vector (), [0 , 1 ])
428428 with pytest .raises (TypeError , match = 'Only integer or sympy repetitions are allowed' ):
429429 cirq .Simulator ().simulate (cirq .Circuit (op ), param_resolver = {'a' : 1.5 , 'b' : 1.5 })
430430 with pytest .raises (ValueError , match = 'Circuit contains ops whose symbols were not specified' ):
0 commit comments