Skip to content

Commit

Permalink
Finalizing data class contruction
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderivrii committed Jan 28, 2025
1 parent 849dede commit e92ac9d
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions qiskit/transpiler/passes/synthesis/high_level_synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,41 @@ class HLSData:
"""Internal class for keeping immutable data required by HighLevelSynthesis."""

hls_config: HLSConfig
"""The high-level-synthesis config that specifies the synthesis methods
to use for high-level-objects in the circuit.
"""

hls_plugin_manager: HighLevelSynthesisPluginManager
"""The high-level-synthesis plugin manager that specifies the synthesis methods
available for various high-level-objects.
"""

coupling_map: CouplingMap | None
"""Optional, directed graph represented as a coupling map."""

target: Target | None
"""Optional, the backend target to use for this pass. If it is specified,
it will be used instead of the coupling map.
"""

use_qubit_indices: bool
"""A flag indicating whether the qubit indices of high-level-objects in the
circuit correspond to qubit indices on the target backend.
"""

equivalence_library: EquivalenceLibrary | None
"""The equivalence library used (instructions in this library will not
be unrolled by this pass).
"""

min_qubits: int
"""The minimum number of qubits for operations in the input dag to translate."""

unroll_definitions: bool
device_insts,
"""Indicates whether to use custom definitions."""

device_insts: set
"""Supported instructions in case that target is not specified."""


class HighLevelSynthesis(TransformationPass):
Expand Down Expand Up @@ -245,7 +271,7 @@ def __init__(
if target is not None:
coupling_map = target.build_coupling_map()

unroll_definitions = not(basis_gates is None and target is None)
unroll_definitions = not (basis_gates is None and target is None)

# include path for when target exists but target.num_qubits is None (BasicSimulator)
if unroll_definitions and (target is None or target.num_qubits is None):
Expand Down

0 comments on commit e92ac9d

Please sign in to comment.