I am trying to use the cirq_google library in Python but I receive an error:

# from cirq        import Simulator
# !pip install cirq_google 
from cirq_google import XmonSimulator
ImportError: cannot import name 'XmonSimulator' from 'cirq_google' (unknown location)

What should I do?


1 Answer 1


The XmonSimulator is no longer supported: #1978, #1993.

You should instead use cirq.Simulator: #3277.

  • $\begingroup$ You mean the first commented line? $\endgroup$
    – Hamideh
    Jun 23, 2022 at 13:14
  • $\begingroup$ Yes, the first line $\endgroup$
    – ryanhill1
    Jun 23, 2022 at 17:35

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.