Skip to content
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

Refactor quantum trajectory simulator. #312

Merged
merged 2 commits into from
Mar 18, 2021
Merged

Conversation

sergeisakov
Copy link
Collaborator

Closes #311

@google-cla google-cla bot added the cla: yes Override CLA status to unblock PR. label Mar 17, 2021
Copy link
Collaborator

@MichaelBroughton MichaelBroughton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Collaborator

@95-martin-orion 95-martin-orion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of small nitpicks.

Thank you for the multitude of qsimcirq cleanup items in this PR as well! I think the separation of names in qtrajectory will help as well.

@@ -216,7 +216,10 @@ PYBIND11_MODULE(qsim, m) {
.def_readwrite("num_qubits", &Circuit::num_qubits)
.def_readwrite("gates", &Circuit::gates);

py::bind_vector<NoisyCircuit>(m, "NoisyCircuit");
py::class_<NoisyCircuit>(m, "NoisyCircuit")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should allow us to remove the PYBIND_MAKE_OPAQUE line at the top of the file:

PYBIND11_MAKE_OPAQUE(qsim::NoisyCircuit<qsim::Cirq::GateCirq<float>>);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Raises:
ValueError if internal keys 'c' or 'i' are included in 'qsim_options'.
ValueError if internal keys 'c', 'i' or 's'are included in 'qsim_options'.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"or 's'are" -> "or 's' are"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@95-martin-orion 95-martin-orion added the kokoro:run Trigger Kokoro builds for this PR. label Mar 18, 2021
@qsim-qsimh-bot qsim-qsimh-bot removed the kokoro:run Trigger Kokoro builds for this PR. label Mar 18, 2021
@95-martin-orion 95-martin-orion merged commit f729d83 into master Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Override CLA status to unblock PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support other for objects in qtrajectory
4 participants