Skip to content

Replaced qdmi calls in ArchitectureFactory with sys-sage ones#17

Open
Durganshu wants to merge 3 commits into
developfrom
sys-sage-integration
Open

Replaced qdmi calls in ArchitectureFactory with sys-sage ones#17
Durganshu wants to merge 3 commits into
developfrom
sys-sage-integration

Conversation

@Durganshu
Copy link
Copy Markdown

As per discussion with @burgholzer and @lsschmid, I'm creating this draft PR to evaluate the possibility of using sys-sage for passes and maybe later on for Architecture class of QMAP.

Feel free to drop your feedback.

P.S.: As of now, I have been testing sys-sage with the QDMI's ibm-backend-testing branch. Subsequently, the implementation proposed here also uses the same branch,

@Durganshu Durganshu requested a review from burgholzer July 16, 2024 00:02
Copy link
Copy Markdown

@burgholzer burgholzer left a comment

Choose a reason for hiding this comment

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

Also here: many thanks for preparing this! 🙏
Lot's of the comments are repeated from the FoMaC PR, so do not be surprised.

The naming of these sys-sage functions might need some bike shedding. But the overall functionality looks good 👍🏻

Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread cmake/Findsys-sage.cmake Outdated
Comment thread src/ArchitectureFactory.cpp Outdated
Comment thread src/ArchitectureFactory.cpp Outdated
Comment thread src/ArchitectureFactory.cpp Outdated
// create a coupling map
err = QDMI_query_all_qubits(dev, &qubits);
// An instance to QunatumBackend for storing the topology
QuantumBackend* qc = new QuantumBackend(0, "IBM_Backend");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Instead of managing the memory manually here, couldn't the sys-sage query function simply return a QuantumBackend?
That local variable would leave the scope after the function returns and would be collected.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is a nice suggestion. Do you mean createQcTopo returns a QuantumBackend object?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yeah. Exactly 👍🏻

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