-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature/cqc conditionals #35
Feature/cqc conditionals #35
Conversation
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.
Very good Victor!
I only made a few small comments. Basically:
- Axel needs to approve all your deprecation changes
- I like your use of enums, they are much better at self documenting
Also, you will need to make the CI build pass - I assume that means you need to make all the old tests pass with your new changes. If you have time, please also add tests for your new changes. If you don't let me know about that.
Hi @VictorPrins! Could you rebase to the newest develop to fix the merge conflicts? |
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.
@VictorPrins nice work! I made some comments, mostly smaller ones. Let me know if you have time to look over these. FYI, I made some comments which start with "Nit:", those are just smaller things which you can just ignore if you don't agree.
One thing I'm missing are tests and one or two examples for how to use the new functionality. I think you already have some examples in your thesis. Could you add that to here? Have you also written some tests? I cannot find these.
cqc/pythonLib.py
Outdated
@@ -1737,13 +2110,28 @@ def _single_gate_rotation(self, command, step, notify, block): | |||
self.check_active() | |||
|
|||
if self._cqc.pend_messages: | |||
|
|||
# If we are inside a TP_MIX, then insert the CQC Type header before the command header |
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.
It would be good to put these things in functions since they can then be reused in _two_qubit_gate
, measure
reset
etc
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.
Do you mean only these two lines?
if self._cqc._inside_cqc_mix:
self._cqc._pend_type_header(CQCType.COMMAND, CQCCmdHeader.HDR_LENGTH + CQCAssignHeader.HDR_LENGTH)
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.
There is also this:
# Build command header and rotation sub header
command_header = CQCCmdHeader()
command_header.setVals(self._qID, command, notify, block)
and this
# Pend headers
self._cqc._pend_header(command_header)
self._cqc._pend_header(rot_sub_header)
copied code
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.
Done
I have processed and responded to all comments. As we agreed in the email exchange, we will write tests once a test framework has been created in the CQC-Python repo. I will write some examples later this week. |
@VictorPrins If I try to run the example https://github.com/SoftwareQuTech/CQC-Python/tree/master/examples/pythonLib/wstate I get a the error
|
The source of the error is that arbitrary rotations are not implemented in the quantum engine: see this line. This error is always raised if the rotation gates are invoked. The "Sequence not supported" line is misleading; sequences don't have anything to do with this error. The error is not due to my changes, because the same error is raised if you execute the example in the master branch. |
@VictorPrins Ah right! Sorry my bad :) |
No description provided.