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

Feat/fix printing of IRCode #10

Closed
wants to merge 1 commit into from

Conversation

contra-bit
Copy link
Contributor

Previous wrong output

 1 ─     return nothing                                                                    │
 , 3, Chain(YaoHIR.Gate(H, Locations(1)), YaoHIR.Gate(H, Locations(2)), YaoHIR.Gate(X, Locations(3)), YaoHIR.Gate(H, Locations(3)), YaoHIR.Ctrl(YaoHIR.Gate(X, Locations(3)), CtrlLocations(1)), YaoHIR.Gate(H, Locations(1)), YaoHIR.Ctrl(YaoHIR.Gate(X, Locations(3)), CtrlLocations(2)), YaoHIR.Gate(H, Locations(2))))

Correct Output

Chain(Gate(X, Locations(1)), %1, Ctrl(Gate(:(%1), Locations(3)), CtrlLocations(2)))Test Summary: | Pass  Total  Time
bir = BlockIR(nothing, 3, Chain(Gate(H, Locations(1)), Gate(H, Locations(2)), Gate(X, Locations(3)), Gate(H, Locations(3)), Ctrl(Gate(X, Locations(3)), CtrlLocations(1)), Gate(H, Locations(1)), Ctrl(Gate(X, Locations(3)), CtrlLocations(2)), Gate(H, Locations(2))))

@Roger-luo
Copy link
Member

I believe this is piracy on Base because IRCode has its own show implemented in Core. What you want to do is probably try to fix things there (I won't recommend right now since we won't depend on internals in the future).

However you can pirate this method for your own purposes

@contra-bit contra-bit closed this Aug 29, 2024
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