loom.cliffordsim.moment_queue

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.moment_queue.MomentFactory[source]

Bases: object

This object is in charge of creating Moment Objects.

static create_moment(input_operations, time_step)[source]

Create a Moment object from a list of Operation objects.

Return type:

Moment

class loom.cliffordsim.moment_queue.MomentQueue(input_operations, parallelize=False)[source]

Bases: object

This object takes an input of a list of Operation objects, creates a Moment objects based on the list then manages the sequence of Moment objects.

The Moment objects will then be sent to the Tableau and transform the internal representation.

property input_operations: list[Operation]

The list of Operation objects that are to be converted into Moment objects.

reset_queue()[source]

Resets the queue to contain all the instructions again.