LogicalQ.Estimators

Functions

compute_constraint_model(hardware_model, label, ...[, ...])

Compute constraint model for a given quantum error correction code.

compute_effective_threshold(hardware_model, label, ...)

Compute effective threshold for a given quantum error correction code.

compute_gadget_costs([gadgets_library, backend, ...])

Compute the costs of a gadgets library based on a hardware model or a backend.

build_gadgets_library(min_depth, max_depth, ...)

Build a library of gadgets within the specified depth and qubit count parameters.

Module Contents

LogicalQ.Estimators.compute_constraint_model(hardware_model, label, stabilizer_tableau, optimizer=True, effective_threshold=None, gadget_costs=None, constraint_model=None)

Compute constraint model for a given quantum error correction code.

Parameters:
  • hardware_model (dict)

  • label (Iterable[int])

  • stabilizer_tableau (Iterable[str])

  • optimizer (bool)

  • effective_threshold (LogicalQ.Typing.Number | None)

  • gadget_costs (dict | None)

  • constraint_model (dict | None)

Return type:

dict

LogicalQ.Estimators.compute_effective_threshold(hardware_model, label, stabilizer_tableau, initial_states=None, min_theta=0, max_theta=np.pi / 2, n_theta=16, min_phi=0, max_phi=np.pi, n_phi=32, max_n_qec_cycles=1, shots=10000.0, threshold_conditions=None)

Compute effective threshold for a given quantum error correction code.

Parameters:
Return type:

tuple[dict, dict, float]

LogicalQ.Estimators.compute_gadget_costs(gadgets_library=None, backend=None, hardware_model=None)

Compute the costs of a gadgets library based on a hardware model or a backend.

Parameters:
Return type:

tuple[dict, dict, dict]

LogicalQ.Estimators.build_gadgets_library(min_depth, max_depth, step_depth, min_n_qubits, max_n_qubits, step_n_qubits)

Build a library of gadgets within the specified depth and qubit count parameters.

Parameters:
  • min_depth (int)

  • max_depth (int)

  • step_depth (int)

  • min_n_qubits (int)

  • max_n_qubits (int)

  • step_n_qubits (int)

Return type:

dict