Skip to content

Substates are separated after measurements, when measurements are ignored #4817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
daxfohl opened this issue Jan 9, 2022 · 0 comments · Fixed by #4816
Closed

Substates are separated after measurements, when measurements are ignored #4817

daxfohl opened this issue Jan 9, 2022 · 0 comments · Fixed by #4816
Labels
kind/bug-report Something doesn't seem to work.

Comments

@daxfohl
Copy link
Collaborator

daxfohl commented Jan 9, 2022

Description of the issue

Density matrix separates qubit states after measurement when split_untanged_states=True. However when ignore_measurement_results=True, this should not happen, as the this changes the measurement into a dephase and does not make the state separable.

For instance, when measuring a Bell state, the resulting DM should be 0.5 |00> + 0.5 |11>. However, separating those states (partial tracing each qubit) and re-kronning them gives 0.25 of each; i.e. it causes each qubit to be 0.5 |0> and 0.5 |1> independently. Therefore we need to avoid separating states after measurements if ignore_measurement_results=True.

How to reproduce the issue

def test_ignore_measurements_remains_entangled():
    q0, q1 = cirq.LineQubit.range(2)
    simulator1 = cirq.DensityMatrixSimulator(
        ignore_measurement_results=True, split_untangled_states=False
    )
    simulator2 = cirq.DensityMatrixSimulator(
        ignore_measurement_results=True, split_untangled_states=True
    )
    circuit = cirq.Circuit(
        cirq.H(q0),
        cirq.CX(q0, q1),
        cirq.measure(q0),
    )
    result1 = simulator1.simulate(circuit)
    result2 = simulator2.simulate(circuit)
    np.testing.assert_almost_equal(result2.final_density_matrix, result1.final_density_matrix)
@daxfohl daxfohl added the kind/bug-report Something doesn't seem to work. label Jan 9, 2022
CirqBot pushed a commit that referenced this issue Jan 11, 2022
Density matrix separates qubit states after measurement when split_untanged_states=True. However when ignore_measurement_results=True, this should not happen, as the this changes the measurement into a dephase and does not make the state separable.

For instance, when measuring a Bell state, the result should be 0.5 |00> + 0.5 |11>. However, separating those states (partial tracing each qubit) and re-kronning them gives 0.25 of each; i.e. it causes each qubit to be 0.5 |0> and 0.5 |1> independently. Therefore we need to avoid separating states after measurements if ignore_measurement_results=True.

This PR fixes #4817.
MichaelBroughton pushed a commit to MichaelBroughton/Cirq that referenced this issue Jan 22, 2022
)

Density matrix separates qubit states after measurement when split_untanged_states=True. However when ignore_measurement_results=True, this should not happen, as the this changes the measurement into a dephase and does not make the state separable.

For instance, when measuring a Bell state, the result should be 0.5 |00> + 0.5 |11>. However, separating those states (partial tracing each qubit) and re-kronning them gives 0.25 of each; i.e. it causes each qubit to be 0.5 |0> and 0.5 |1> independently. Therefore we need to avoid separating states after measurements if ignore_measurement_results=True.

This PR fixes quantumlib#4817.
rht pushed a commit to rht/Cirq that referenced this issue May 1, 2023
)

Density matrix separates qubit states after measurement when split_untanged_states=True. However when ignore_measurement_results=True, this should not happen, as the this changes the measurement into a dephase and does not make the state separable.

For instance, when measuring a Bell state, the result should be 0.5 |00> + 0.5 |11>. However, separating those states (partial tracing each qubit) and re-kronning them gives 0.25 of each; i.e. it causes each qubit to be 0.5 |0> and 0.5 |1> independently. Therefore we need to avoid separating states after measurements if ignore_measurement_results=True.

This PR fixes quantumlib#4817.
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this issue Oct 31, 2024
)

Density matrix separates qubit states after measurement when split_untanged_states=True. However when ignore_measurement_results=True, this should not happen, as the this changes the measurement into a dephase and does not make the state separable.

For instance, when measuring a Bell state, the result should be 0.5 |00> + 0.5 |11>. However, separating those states (partial tracing each qubit) and re-kronning them gives 0.25 of each; i.e. it causes each qubit to be 0.5 |0> and 0.5 |1> independently. Therefore we need to avoid separating states after measurements if ignore_measurement_results=True.

This PR fixes quantumlib#4817.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-report Something doesn't seem to work.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant