Density matrix simulator sometimes returns measurement results when ignore_measurement_results is True
See original GitHub issueSplit off from #2567 . Input:
import cirq
q = cirq.LineQubit(0)
circuit1 = cirq.Circuit(cirq.measure(q))
circuit2 = circuit1 + cirq.I(q)
print('Circuit 1:')
print(circuit1)
print()
print('Circuit2:')
print(circuit2)
print()
simulator = cirq.DensityMatrixSimulator(noise=cirq.X, ignore_measurement_results=True)
result1 = simulator.run(circuit1, repetitions=10)
result2 = simulator.run(circuit2, repetitions=10)
print('Result 1:')
print(result1)
print()
print('Result 2:')
print(result2)
print()
Output:
Circuit 1:
0: ───M───
Circuit2:
0: ───M───I───
Result 1:
0=1111111111
Result 2:
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
The Density Matrix & Mixed States - Qiskit
Find the corresponding density matrix for the following pure states. Use Qiskit to prepare the states, and verify your results using the quantum_info...
Read more >cirq.DensityMatrixSimulator - Google Quantum AI
A simulator for density matrices and noisy quantum circuits. ... These methods return Result s which contain both the measurement results, ...
Read more >Density matrix - Wikipedia
In quantum mechanics, a density matrix (or density operator) is a matrix that describes the quantum state of a physical system.
Read more >Lecture Notes for Ph219/CS219: Quantum Information Chapter 2
sometimes called the measurement problem of quantum theory. Seeking a ... (or density matrix) for qubit A. It is self-adjoint, positive (its eigenvalues....
Read more >Functions — QuTiP 4.7 Documentation
Returns. dmqobj. Density matrix representation of coherent state. ... A dispatch method that provides measurement results handling both observable style ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, that’s correct.
Thank you @akushnarov! It’s all yours!