The documentation for Cirq mentions the possibility to step through a circuit's moments, and access the exact wavefunction via step.state_vector()
, and edit set it via step.set_state()
. In the API documentation, neither function is documented. While the former seems to work anyway, the latter (setting the state) gives an AttributeError. I am using Cirq 0.9.1.
How can I change the wavefunction used for the next moment simulation?