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

update gateset #37

Merged
merged 3 commits into from
Nov 7, 2023
Merged

update gateset #37

merged 3 commits into from
Nov 7, 2023

Conversation

cqc-melf
Copy link
Collaborator

@cqc-melf cqc-melf commented Nov 6, 2023

solves #5

Add the XY gate to the gateset.

@cqc-melf cqc-melf marked this pull request as ready for review November 7, 2023 08:22
Comment on lines 112 to 116
OpType.CZ, #
OpType.Rx, #
OpType.Rz, #
OpType.Measure, #
OpType.Barrier, #
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the comment markers?

Copy link
Collaborator Author

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

c.measure_all()

h = forest_backend.process_circuit(c, 10)
forest_backend.get_result(h)
Copy link
Collaborator

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.

Copy link
Collaborator Author

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?

res = forest_backend.get_result(h)

assert res.get_shots().shape == (10, 6)
assert res.get_counts()[(0, 0, 0, 0, 0, 0)] < 10
Copy link
Collaborator

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.

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 in 5273957

@cqc-melf cqc-melf merged commit 9ebc45a into develop Nov 7, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants