Skip to content

Commit 8ceb179

Browse files
daxfohl95-martin-orion
authored andcommitted
Extract BufferedDM/SV/MPS from ActOnDM/SV/MPSArgs (quantumlib#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 <40585662+95-martin-orion@users.noreply.github.com>
1 parent 1656dbb commit 8ceb179

File tree

8 files changed

+890
-347
lines changed

8 files changed

+890
-347
lines changed

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

Lines changed: 293 additions & 129 deletions
Large diffs are not rendered by default.

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

Lines changed: 14 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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)