-
Notifications
You must be signed in to change notification settings - Fork 3
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
update gateset #37
update gateset #37
Conversation
OpType.CZ, # | ||
OpType.Rx, # | ||
OpType.Rz, # | ||
OpType.Measure, # | ||
OpType.Barrier, # |
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.
Why the comment markers?
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 was using the wrong formatter version, solved now. See 641de02
tests/qvm_backend_test.py
Outdated
c.measure_all() | ||
|
||
h = forest_backend.process_circuit(c, 10) | ||
forest_backend.get_result(h) |
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 better to assert something about the result to check that the gate is being translated correctly.
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 have expanded the testcase here to check the result, see 641de02.
Was that what you wanted to see?
tests/qvm_backend_test.py
Outdated
res = forest_backend.get_result(h) | ||
|
||
assert res.get_shots().shape == (10, 6) | ||
assert res.get_counts()[(0, 0, 0, 0, 0, 0)] < 10 |
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'd delete this line since it will fail about 0.1 % of the time and the next assert gives enough assurance.
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 in 5273957
solves #5
Add the XY gate to the gateset.