Skip to content

PCVL 1169 CompiledCircuit identifier#719

Open
Benoit-F-Q wants to merge 2 commits intoQuandela:release/1.2.0from
Benoit-F-Q:PCVL_1169_CompiledCircuit_identifier
Open

PCVL 1169 CompiledCircuit identifier#719
Benoit-F-Q wants to merge 2 commits intoQuandela:release/1.2.0from
Benoit-F-Q:PCVL_1169_CompiledCircuit_identifier

Conversation

@Benoit-F-Q
Copy link
Copy Markdown
Contributor

No description provided.

from perceval.utils.matrix import Matrix

class CompiledCircuit(ACircuit):
class Version:
Copy link
Copy Markdown
Contributor

@Aubaert Aubaert Mar 5, 2026

Choose a reason for hiding this comment

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

In python, this is weird to put classes inside other classes as this is not practical to use.

Also, I think you might benefit from using a @dataclasses.dataclass for this class, which will provide automatically the __str__, __repr__ and __eq__, as well as other methods like __ne__

self.carac_version = packaging.version.Version('0')
self.phase_at_output = True
self.empty_mode_list = []
self.matrix_uuid = uuid.UUID(int=0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the purpose of this UUID ?
A int representing the hash of a unitary might be better suited

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