loom.cliffordsim.moments.base_moment

Copyright 2024 Entropica Labs Pte Ltd

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class loom.cliffordsim.moments.base_moment.Moment(input_operations, time_step)[source]

Bases: MomentInterface

A Moment contains a set of instructions that are directly applicable on the Tableau.

transform_pf(input_pauliframes, data_store, **kwargs)[source]

Applies tranformation of Instructions on incoming PauliFrame. Also requires a DataStore that manages information keeping throughout the instruction application process and kwargs to transparently support future extensions.

Return type:

List[PauliFrame]

transform_pf_back(input_pauliframes, data_store, **kwargs)[source]

Applies backwards tranformation of Instructions on incoming PauliFrame. Also requires a DataStore that manages information keeping throughout the instruction application process and kwargs to transparently support future extensions.

Return type:

List[PauliFrame]

transform_tab(input_tableau, data_store, **kwargs)[source]

Applies tranformation of Instructions on incoming Tableau. Also requires a DataStore that manages information keeping throughout the instruction application process and kwargs to transparently support future extensions.

Return type:

Tableau

class loom.cliffordsim.moments.base_moment.MomentInterface[source]

Bases: ABC

An abstract base class for Moments.

abstractmethod transform_tab(input_tableau)[source]

Transform the input tableau and return the transformed tableau.

Return type:

ndarray