Skip to content

Commit e0a64dd

Browse files
Extract BufferedDM/SV/MPS from ActOnDM/SV/MPSArgs (#4979)
* Extract BufferedDensityMatrix from ActOnDensityMatrixArgs * state vector * clean up code * clean up code * clean up code * format * docs * test * coverage * improve state vector * improve state vector * replace deleted functions * replace deleted functions * replace deleted functions * replace deleted functions * lint * mps quantum state * mps quantum state * mps quantum state * mps quantum state * mps quantum state * mps quantum state * mps quantum state * mps quantum state * coverage * fix merge errors * Code review comments * Remove todo Co-authored-by: Orion Martin <[email protected]>
1 parent d3c4853 commit e0a64dd

8 files changed

+890
-347
lines changed

cirq-core/cirq/contrib/quimb/mps_simulator.py

+293-129
Large diffs are not rendered by default.

cirq-core/cirq/contrib/quimb/mps_simulator_test.py

+14
Original file line numberDiff line numberDiff line change
@@ -569,3 +569,17 @@ def test_act_on_gate():
569569
args.state_vector().reshape((2, 2, 2)),
570570
cirq.one_hot(index=(0, 1, 0), shape=(2, 2, 2), dtype=np.complex64),
571571
)
572+
573+
574+
def test_deprectated():
575+
q0 = cirq.LineQubit(0)
576+
prng = np.random.RandomState(0)
577+
args = ccq.mps_simulator.MPSState(
578+
qubits=cirq.LineQubit.range(3),
579+
prng=prng,
580+
log_of_measurement_results={},
581+
)
582+
with cirq.testing.assert_deprecated(deadline='0.15'):
583+
args.perform_measurement([q0], prng)
584+
with cirq.testing.assert_deprecated(deadline='0.15'):
585+
args.apply_op(cirq.X(q0), prng)

cirq-core/cirq/protocols/json_test_data/spec.py

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
'ActOnArgsContainer',
8686
'ActOnCliffordTableauArgs',
8787
'ActOnDensityMatrixArgs',
88+
'ActOnStabilizerArgs',
8889
'ActOnStabilizerCHFormArgs',
8990
'ActOnStateVectorArgs',
9091
'ApplyChannelArgs',

0 commit comments

Comments
 (0)