Closed pgoiporia closed 4 months ago
This should work for Pauli gates. The issue here is that the gate you are controlling is Y**0.5
, which is a Clifford gate. Stim circuits don't support classically controlled Clifford gates, and therefore stimcirq can't support this gate.
There are currently no plans to add support for classically controlled Clifford gates. They break the optimization that Stim uses to do simulations so quickly. As in, simulations literally get 1000x more expensive if you allow classically controlled Cliffords. So it really is a different sort of problem to solve.
So unfortunately the answer to your question is no, there aren't plans to fix this, and I'm going to close this as WONTFIX.
Note you can use the python-driven simulations, TableauSimulator
or FlipSimulator
, to apply Cliffords conditioned on previous measurement results. The TableauSimulator is the one that's 1000x slower. The FlipSimulator is fast, but can't tell you raw measurement results; only whether they were flipped.
I was trying to simulate this teleportation circuit (https://quantumai.google/cirq/build/classical_control#basic_conditions) with
stimcirq.StimSampler
and received the following error.Is there any plan to support classical control in stimcirq?