-
Notifications
You must be signed in to change notification settings - Fork 347
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
Removing unnecessary identity operation from exponential_map() #373
Conversation
the hardcoded implementation of the identity operation on the 0th qubit unnecessarily inflates circuits (even if it gets removed later in the compiler) and leads to problems when using the new ``embedding`` argument in the QAOA instance
@willzeng @ecp-rigetti and others. I think think there was a conscious decision to keep these phase factors in. It's unfortunate that it always hits the 0th qubit though. |
@mpharrigan I think it's good to remove. It was original included for testing purposes. I agree with @markf94 that these terms only inflate the circuit. |
I'm happy to see the debug |
A year and a half later, I don't recall what people cared about this phase factor for, and I'm inclined to re-open this PR for consideration. This PR doesn't get rid of the phase factor in the PauliSum itself — just in the conversion of its exponentiation to a circuit. Any interested party could still look at the PauliSum directly to discover the phase factor. |
@markf94 If you update this to also kill the |
* exponential_map of the identity applies a PHASE gate and its inverse. This was apparently for debugging purposes. This PR replaces the PHASE gates with an empty Program. * This PR moves conditionals on data that is closed over from inside the closure to outside. That is, the gate that is exponentiated is checked when the closure is created, but not when it is executed. Closes #1055. This PR obsoletes PR #373.
* exponential_map of the identity applies a PHASE gate and its inverse. This was apparently for debugging purposes. This PR replaces the PHASE gates with an empty Program. * This PR moves conditionals on data that is closed over from inside the closure to outside. That is, the gate that is exponentiated is checked when the closure is created, but not when it is executed. Closes #1055. This PR obsoletes PR #373.
* exponential_map of the identity applies a PHASE gate and its inverse. This was apparently for debugging purposes. This PR replaces the PHASE gates with an empty Program. * This PR moves conditionals on data that is closed over from inside the closure to outside. That is, the gate that is exponentiated is checked when the closure is created, but not when it is executed. Closes #1055. This PR obsoletes PR #373.
* exponential_map of the identity applies a PHASE gate and its inverse. This was apparently for debugging purposes. This PR replaces the PHASE gates with an empty Program. * This PR moves conditionals on data that is closed over from inside the closure to outside. That is, the gate that is exponentiated is checked when the closure is created, but not when it is executed. Closes #1055. This PR obsoletes PR #373.
* exponential_map of the identity applies a PHASE gate and its inverse. This was apparently for debugging purposes. This PR replaces the PHASE gates with an empty Program. * This PR moves conditionals on data that is closed over from inside the closure to outside. That is, the gate that is exponentiated is checked when the closure is created, but not when it is executed. Closes #1055. This PR obsoletes PR #373.
* exponential_map of the identity applies a PHASE gate and its inverse. This was apparently for debugging purposes. This PR replaces the PHASE gates with an empty Program. * This PR moves conditionals on data that is closed over from inside the closure to outside. That is, the gate that is exponentiated is checked when the closure is created, but not when it is executed. Closes #1055. This PR obsoletes PR #373.
* exponential_map of the identity applies a PHASE gate and its inverse. This was apparently for debugging purposes. This PR replaces the PHASE gates with an empty Program. * This PR moves conditionals on data that is closed over from inside the closure to outside. That is, the gate that is exponentiated is checked when the closure is created, but not when it is executed. Closes #1055. This PR obsoletes PR #373.
See #1182 |
The hardcoded implementation of the identity operation on the
0th qubit unnecessarily inflates circuits (even if it gets removed
later in the compiler) and leads to problems when using the new
embedding
argument in the QAOA instance (see PR #143 in grove)