It is possible to use cirq.simulate and then the final_state keyword to get the final wavefunction of the circuit, however, the circuit that I am trying to simulate is very large, and the simulation seems to take a long time. Thus, I was wondering if there was a function that would allow me to find the probability of measuring the specific state that I'm interested in, rather than calculating the entire wavefunction (in turn hopefully helping to speed up the program).


Cirq's simulator is a state vector simulator, which cannot be told to focus on the amplitude of a specific output state or combination of output states.

Some tensor network based simulators can get benefit from focusing on a specific output state, but there isn't such a simulator in Cirq.

| improve this answer | |
  • $\begingroup$ Thanks for the answer! $\endgroup$ – Jack Ceroni Sep 4 '19 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.