iqm.benchmarks.circuit_containers.CircuitGroup#

class iqm.benchmarks.circuit_containers.CircuitGroup(circuits: ~typing.List[~iqm.qiskit_iqm.iqm_circuit.IQMCircuit] = <factory>, name: str | None = '')#

Bases: object

Group of IQMCircuits. It represents a list of circuits with a common purpose, typically executed in a batch.

Parameters:
  • circuits (List[IQMCircuit]) –

  • name (str | None) –

circuits#

List of IQMCircuit.

Type:

List[iqm.qiskit_iqm.iqm_circuit.IQMCircuit]

name#

Name of the group.

Type:

str | None

Attributes

circuit_names

Name of all the circuits contained in the group as a string

name

qubit_layouts

The qubit layouts contained in all the circuits, where the qubits are represented by an instance of Qubit.

qubit_layouts_by_index

The qubit layouts contained in all the circuits, where the qubits are represented by an integer.

qubits

The set of active qubits in all of the circuits

circuits

Methods

__eq__(other)

Return self==value.

__getitem__(key)

__repr__()

Return repr(self).

__setitem__(key, value)

add_circuit(circuit)

Adds a circuit to the internal list

get_circuits_by_name(name)

Returns a list of the internal circuits that share the same name

property qubit_layouts_by_index: tuple[tuple[int, ...], ...]#

The qubit layouts contained in all the circuits, where the qubits are represented by an integer.

Returns:

All qubit layouts.

property qubit_layouts: tuple[tuple[Qubit, ...], ...]#

The qubit layouts contained in all the circuits, where the qubits are represented by an instance of Qubit.

Returns:

All qubit layouts.

property qubits: set[Qubit]#

The set of active qubits in all of the circuits

Returns:

A set of Qubit

add_circuit(circuit: IQMCircuit)#

Adds a circuit to the internal list

Parameters:

circuit (IQMCircuit) – Circuit to add.

property circuit_names: list[str]#

Name of all the circuits contained in the group as a string

Returns:

List of strings

get_circuits_by_name(name: str) IQMCircuit | None#

Returns a list of the internal circuits that share the same name

Parameters:

name (str) – Name of the circuit to return as a string

Returns:

The circuit with the desired name as a string, or None if they are not found.

Return type:

IQMCircuit | None