-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Custom-state-representation simulator infra #5417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@95-martin-orion wdyt here? Useful, not useful? Now or post-1.0? |
Yeah, I think this is potentially interesting pre-1.0. The set of simulators it supports is rather limited [1], but there's a good number of simulators in that space and as the test shows it's quite powerful for that subset. I'll give a more detailed review in a bit. [1] The stepwise structure rules out tensor-network simulators like quimb, and the tight Cirq coupling (simulation uses |
95-martin-orion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think contrib is the right place for this so that it's clearly separate from the core simulator API, but it's a nicely encapsulated example for using the simulator internals.
Infrastructure for third-parties to easily create custom Cirq-compatible simulators. This PR makes it easy to create custom simulators that support all the advanced Cirq features such as * subcircuits * classical controls (sympy conditions, indexed conditions) * repeat_until loops * noise models * param resolvers * parameterized repetitions * product-state mode As an example in the tests, a ComputationalBasisState simulator supporting all the above can be implemented in under 20 LOC.
Infrastructure for third-parties to easily create custom Cirq-compatible simulators. This PR makes it easy to create custom simulators that support all the advanced Cirq features such as * subcircuits * classical controls (sympy conditions, indexed conditions) * repeat_until loops * noise models * param resolvers * parameterized repetitions * product-state mode As an example in the tests, a ComputationalBasisState simulator supporting all the above can be implemented in under 20 LOC.
Infrastructure for third-parties to easily create custom Cirq-compatible simulators.
This PR makes it easy to create custom simulators that support all the advanced Cirq features such as
As an example in the tests, a ComputationalBasisState simulator supporting all the above can be implemented in under 20 LOC.