EstimationTable Class

A table of quantum resource estimation results.

Extends list[EstimationTableEntry] and provides configurable columns for displaying estimation data. By default the table includes qubits, runtime (displayed as a pandas.Timedelta), and error columns. Additional columns can be added or inserted with add_column and insert_column.

Initialize an empty estimation table with default columns.

Constructor

EstimationTable()

Methods

add_column

Add a column to the estimation table.

add_factory_summary_column

Add a column to the estimation table that summarizes the factories used in the estimation.

add_property_column

Add a column for a specific property key from the estimation results.

add_qubit_partition_column

Add columns for the physical compute, factory, and memory qubit counts.

as_frame

Convert the estimation table to a pandas.DataFrame.

Each row corresponds to an EstimationTableEntry and each column is determined by the columns registered on this table. Column formatters, when present, are applied to the values before they are placed in the frame.

insert_column

Insert a column at the specified index in the estimation table.

plot

Plot this table's results.

Convenience wrapper around plot_estimates. All keyword arguments are forwarded.

add_column

Add a column to the estimation table.

add_column(name: str, function: Callable[[EstimationTableEntry], Any], formatter: Callable[[Any], Any] | None = None) -> None

Parameters

Name Description
name
Required
str

The name of the column.

function
Required
<xref:Callable>[[<xref:EstimationTableEntry>],<xref: Any>]

A function that takes an EstimationTableEntry and returns the value for this column.

formatter
<xref:Optional>[<xref:Callable>[[<xref:Any>],<xref: Any>]]

An optional function that formats the output of function for display purposes.

Default value: None

add_factory_summary_column

Add a column to the estimation table that summarizes the factories used in the estimation.

add_factory_summary_column() -> None

add_property_column

Add a column for a specific property key from the estimation results.

add_property_column(property_key: int, column_name: str | None = None, default_value: Any = None) -> None

Parameters

Name Description
property_key
Required
int

The property key to add as a column.

column_name
<xref:Optional>[str]

An optional name for the column. If not provided, the column will be named "property_{property_key}".

Default value: None
default_value
Any

The default value to use if the property key is not present in an entry's properties. Defaults to None.

Default value: None

add_qubit_partition_column

Add columns for the physical compute, factory, and memory qubit counts.

add_qubit_partition_column() -> None

as_frame

Convert the estimation table to a pandas.DataFrame.

Each row corresponds to an EstimationTableEntry and each column is determined by the columns registered on this table. Column formatters, when present, are applied to the values before they are placed in the frame.

as_frame()

Returns

Type Description
<xref:pandas.DataFrame>

A DataFrame representation of the estimation results.

insert_column

Insert a column at the specified index in the estimation table.

insert_column(index: int, name: str, function: Callable[[EstimationTableEntry], Any], formatter: Callable[[Any], Any] | None = None) -> None

Parameters

Name Description
index
Required
int

The index at which to insert the column.

name
Required
str

The name of the column.

function
Required
<xref:Callable>[[<xref:EstimationTableEntry>],<xref: Any>]

A function that takes an EstimationTableEntry and returns the value for this column.

formatter
<xref:Optional>[<xref:Callable>[[<xref:Any>],<xref: Any>]]

An optional function that formats the output of function for display purposes.

Default value: None

plot

Plot this table's results.

Convenience wrapper around plot_estimates. All keyword arguments are forwarded.

plot(**kwargs)

Returns

Type Description
<xref:matplotlib.figure.Figure>

The figure containing the plot.