-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
Task description
Add an example python script stabilizer_stim_sim.py in /examples which showcases stabilizer circuit simulation using tc interface with stim backend.
Implementation
The script includes:
- Clifford circuit with mid-circuit measurement defined in tc
- Transform the circuit object into Stim circuit object with the helper function defined in the same script (input: tc circuit, output: stim circuit)(can utilize
c._qirandc._extra_qir, usingc.measure_instructionto get the mid circuit measurement recorded in extra_qir and usingc.mid_measurementfor the real functionality) - Simulate the circuit in stim and extract the stabilizer tableau
- Compute the entanglement entropy of the output state with the helper function defined in the same script (input: stabilizer tableau representation, output: entanglement entropy value) (see Ref 3, it would be better to try hard to accelerate this function)
- Validate the correctness by directly computing entanglement from tc (mid-circuit measurement results might require to be averaged)
References:
royess and AbdullahKazi500
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers