MatchCake

matchcake.devices.contraction_strategies package

Submodules

matchcake.devices.contraction_strategies.contraction_container module

matchcake.devices.contraction_strategies.contraction_strategy module

class matchcake.devices.contraction_strategies.contraction_strategy.ContractionStrategy(show_progress: bool = False)

Bases: ABC

ALLOWED_GATE_CLASSES = [<class 'matchcake.operations.matchgate_operation.MatchgateOperation'>, <class 'matchcake.operations.single_particle_transition_matrices.single_particle_transition_matrix.SingleParticleTransitionMatrixOperation'>]
NAME: str = 'ContractionStrategy'
__call__(operations: Sequence[Operation], **kwargs) Sequence[Operation]

Call self as a function.

__init__(show_progress: bool = False)
close_p_bar()
abstract get_container() _ContractionMatchgatesContainer
get_next_operations(operation) Sequence[Operation | None]
get_reminding()
initialize_p_bar(*args, **kwargs)
p_bar_set_n(n: int)
p_bar_set_n_p1(n: int)
reset()

matchcake.devices.contraction_strategies.forward_strategy module

class matchcake.devices.contraction_strategies.forward_strategy.ForwardContractionStrategy(show_progress: bool = False)

Bases: ContractionStrategy

NAME: str = 'Forward'
get_container()

matchcake.devices.contraction_strategies.horizontal_strategy module

class matchcake.devices.contraction_strategies.horizontal_strategy.HorizontalContractionStrategy(show_progress: bool = False)

Bases: ContractionStrategy

NAME: str = 'Horizontal'
get_container()

matchcake.devices.contraction_strategies.neighbours_strategy module

class matchcake.devices.contraction_strategies.neighbours_strategy.NeighboursContractionStrategy(show_progress: bool = False)

Bases: ContractionStrategy

NAME: str = 'Neighbours'
get_container()

matchcake.devices.contraction_strategies.none_strategy module

class matchcake.devices.contraction_strategies.none_strategy.NoneContractionStrategy(show_progress: bool = False)

Bases: ContractionStrategy

NAME: str = 'None'
__call__(operations: Sequence[Operation], **kwargs) Sequence[Operation]

Call self as a function.

get_container()
get_next_operations(operation) Sequence[Operation | None]
get_reminding()

matchcake.devices.contraction_strategies.vertical_strategy module

class matchcake.devices.contraction_strategies.vertical_strategy.VerticalContractionStrategy(show_progress: bool = False)

Bases: ContractionStrategy

NAME: str = 'Vertical'
get_container()

Module contents

matchcake.devices.contraction_strategies.get_contraction_strategy(name: str | None) ContractionStrategy