Skip to content

Add decompose instructions, when qiskit circuit is build.#308

Merged
David-Kreplin merged 13 commits intosQUlearn:developfrom
MHagelueken:issue-306
Dec 19, 2024
Merged

Add decompose instructions, when qiskit circuit is build.#308
David-Kreplin merged 13 commits intosQUlearn:developfrom
MHagelueken:issue-306

Conversation

@MHagelueken
Copy link
Collaborator

@MHagelueken MHagelueken commented Dec 10, 2024

transpile() with keyword optimization_level >1 can delete gates with parameters that are redundant which leads to the code not being able to map parameters of original circuit onto transpiled circuit.

closes #306

@MoritzWillmann MoritzWillmann linked an issue Dec 13, 2024 that may be closed by this pull request
@MoritzWillmann MoritzWillmann marked this pull request as ready for review December 17, 2024 12:48
Copy link
Collaborator

@MoritzWillmann MoritzWillmann left a comment

Choose a reason for hiding this comment

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

Thank you @MHagelueken for the quick fix. I have a couple of comments before we can merge this PR. Also can you please make sure the code formatting (black) checks go through 😄
Cheers Moritz

Copy link
Collaborator

@David-Kreplin David-Kreplin left a comment

Choose a reason for hiding this comment

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

Do we need a decomposition in encoding_circuit.transpiled_encodig_circuit.py:

if "optimization_level" not in kwargs:
    kwargs["optimization_level"] = 3
if "seed_transpiler" not in kwargs:
    kwargs["seed_transpiler"] = 0
self._transpiled_circuit = transpile(self._circuit, self._backend, **kwargs)

@David-Kreplin David-Kreplin merged commit 968a0d6 into sQUlearn:develop Dec 19, 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.

Qiskit v1.3 breaks QCNN example

3 participants