This PR introduces support for mid-circuit measurements and entanglement entropy computation in the tensorcircuit library. Mid-circuit measurements are a crucial feature in quantum circuit simulation, allowing for measurements to be performed at intermediate stages of circuit execution. Additionally, entanglement entropy computation provides valuable insights into the entanglement properties of quantum states, aiding in quantum error correction and algorithm development.
Key Changes:
Mid-Circuit Measurement Support:
Implemented functionality to support mid-circuit measurements in the tensorcircuit library.
Introduced a new method M to perform mid-circuit measurements on qubits.
Entanglement Entropy Computation:
Added a function compute_entanglement_entropy to compute the entanglement entropy from the stabilizer tableau extracted after circuit execution.
The function constructs a binary matrix representing the stabilizer tableau and computes its rank to determine the entanglement entropy.
FIXES #211
@refraction-ray Hi Github is not allowing me to make changes in the same PR
made a new PR To address this issue here #221
I have tried to refactor the code with the docstrings and added the changes
This PR introduces support for mid-circuit measurements and entanglement entropy computation in the tensorcircuit library. Mid-circuit measurements are a crucial feature in quantum circuit simulation, allowing for measurements to be performed at intermediate stages of circuit execution. Additionally, entanglement entropy computation provides valuable insights into the entanglement properties of quantum states, aiding in quantum error correction and algorithm development.
Key Changes:
Mid-Circuit Measurement Support:
Implemented functionality to support mid-circuit measurements in the tensorcircuit library. Introduced a new method M to perform mid-circuit measurements on qubits. Entanglement Entropy Computation:
Added a function compute_entanglement_entropy to compute the entanglement entropy from the stabilizer tableau extracted after circuit execution. The function constructs a binary matrix representing the stabilizer tableau and computes its rank to determine the entanglement entropy. FIXES #211