Skip to content

Commit

Permalink
Cumulative development update (#54)
Browse files Browse the repository at this point in the history
* Added .sim_name to QOps. Added angle info to QOp.angle

* Added code to identify Clifford gates from more general gates

* Added conversion to Clifford support for RZ , RZZ, and R1XY

* Tweaking generic machine to clear state

* Add test of operation type before running qsims.

* Adding general Instr type and list types

* Adding slr code

* Updated linting/formatting

* Moving slr down to reduce nesting

* fix slr __version__

* Creating a slr.std folder to hold common extension to core to the DSL

* Fixing std import

* Adding in duration for MOps in PyPMIR

* Modifying qargs in mops appropriately.

* Moving the old cuquantum code to cuquantum_old for now...

* Updating actions/setup-python from v4 to v5

* Adding tests of SLR and gate name resolving + some fixes due to those

* Update .pre-commit-config.yaml

Co-authored-by: Kartik Singhal <[email protected]>

* Apply suggestions from code review

Co-authored-by: Kartik Singhal <[email protected]>

* Updating pre-commit / running ruff/black

* Updating the docs using autodoc

* Changing PHIR test to only have bits set by 1 or 0 (not bool)

---------

Co-authored-by: Ciaran Ryan-Anderson <[email protected]>
Co-authored-by: Ciarán Ryan-Anderson <[email protected]>
Co-authored-by: Kartik Singhal <[email protected]>
  • Loading branch information
4 people committed Mar 15, 2024
1 parent cec47a4 commit 387207e
Show file tree
Hide file tree
Showing 143 changed files with 6,662 additions and 305 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ repos:
- id: debug-statements

- repo: https://github.com/crate-ci/typos
rev: v1.16.18
rev: v1.19.0
hooks:
- id: typos
args: []

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
rev: v0.3.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.3.0
hooks:
- id: black
exclude: |
(?x)^(
python/pecos/simulators/cuquantum/custatevec/bindings.py|
python/pecos/simulators/cuquantum_old/custatevec/bindings.py|
)$
- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
rev: v0.3.9
hooks:
- id: blackdoc
additional_dependencies:
- black==23.9.1
- black==24.1.1
1 change: 1 addition & 0 deletions docs/examples/creating_qecc_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ To begin, we create an empty Python file called ``zrepetition.py`` and import so
"""
A representation of the Z-check repetition code.
"""
from pecos.circuits import QuantumCircuit
from pecos.qeccs import QECC, LogicalGate, LogicalInstruction
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/_autosummary/pecos.engines.cvm.wasm_vms.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pecos.engines.cvm.wasm\_vms
pecos.engines.cvm.wasm\_vms
===========================

.. automodule:: pecos.engines.cvm.wasm_vms
Expand Down Expand Up @@ -30,4 +30,5 @@ pecos.engines.cvm.wasm\_vms
pecos.engines.cvm.wasm_vms.pywasm
pecos.engines.cvm.wasm_vms.pywasm3
pecos.engines.cvm.wasm_vms.wasmer
pecos.engines.cvm.wasm_vms.wasmtime

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pecos.engines.cvm.wasm\_vms.wasmtime
====================================

.. automodule:: pecos.engines.cvm.wasm_vms.wasmtime







.. rubric:: Functions

.. autosummary::

read_wasmtime













1 change: 1 addition & 0 deletions docs/reference/_autosummary/pecos.error_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ pecos.error\_models
pecos.error_models.noise_impl_old
pecos.error_models.old
pecos.error_models.parent_class_error_gen
pecos.error_models.simple_depolarizing_error_model

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pecos.error\_models.simple\_depolarizing\_error\_model
======================================================

.. automodule:: pecos.error_models.simple_depolarizing_error_model











.. rubric:: Classes

.. autosummary::

SimpleDepolarizingErrorModel









Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pecos.reps.pypmir.block\_types

Block
IfBlock
QParallelBlock
SeqBlock


Expand Down
29 changes: 29 additions & 0 deletions docs/reference/_autosummary/pecos.reps.pypmir.instr_type.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pecos.reps.pypmir.instr\_type
=============================

.. automodule:: pecos.reps.pypmir.instr_type











.. rubric:: Classes

.. autosummary::

Instr









31 changes: 31 additions & 0 deletions docs/reference/_autosummary/pecos.reps.pypmir.list_types.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
pecos.reps.pypmir.list\_types
=============================

.. automodule:: pecos.reps.pypmir.list_types











.. rubric:: Classes

.. autosummary::

InstrList
OpList
QOpList









29 changes: 29 additions & 0 deletions docs/reference/_autosummary/pecos.reps.pypmir.name_resolver.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pecos.reps.pypmir.name\_resolver
================================

.. automodule:: pecos.reps.pypmir.name_resolver







.. rubric:: Functions

.. autosummary::

sim_name_resolver













5 changes: 4 additions & 1 deletion docs/reference/_autosummary/pecos.reps.pypmir.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pecos.reps.pypmir
pecos.reps.pypmir
=================

.. automodule:: pecos.reps.pypmir
Expand Down Expand Up @@ -29,6 +29,9 @@ pecos.reps.pypmir

pecos.reps.pypmir.block_types
pecos.reps.pypmir.data_types
pecos.reps.pypmir.instr_type
pecos.reps.pypmir.list_types
pecos.reps.pypmir.name_resolver
pecos.reps.pypmir.op_types
pecos.reps.pypmir.pypmir
pecos.reps.pypmir.types
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/_autosummary/pecos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@
pecos.qeccs
pecos.reps
pecos.simulators
pecos.slr
pecos.tools
pecos.typed_list

23 changes: 23 additions & 0 deletions docs/reference/_autosummary/pecos.simulators.cointoss.bindings.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pecos.simulators.cointoss.bindings
==================================

.. automodule:: pecos.simulators.cointoss.bindings



















30 changes: 30 additions & 0 deletions docs/reference/_autosummary/pecos.simulators.cointoss.gates.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pecos.simulators.cointoss.gates
===============================

.. automodule:: pecos.simulators.cointoss.gates







.. rubric:: Functions

.. autosummary::

ignore_gate
measure













33 changes: 33 additions & 0 deletions docs/reference/_autosummary/pecos.simulators.cointoss.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
pecos.simulators.cointoss
=========================

.. automodule:: pecos.simulators.cointoss



















.. rubric:: Modules

.. autosummary::
:toctree:
:recursive:

pecos.simulators.cointoss.bindings
pecos.simulators.cointoss.gates
pecos.simulators.cointoss.state

29 changes: 29 additions & 0 deletions docs/reference/_autosummary/pecos.simulators.cointoss.state.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pecos.simulators.cointoss.state
===============================

.. automodule:: pecos.simulators.cointoss.state











.. rubric:: Classes

.. autosummary::

CoinToss









4 changes: 3 additions & 1 deletion docs/reference/_autosummary/pecos.simulators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ pecos.simulators
:toctree:
:recursive:

pecos.simulators.cointoss
pecos.simulators.compile_cython
pecos.simulators.cuquantum
pecos.simulators.cuquantum_old
pecos.simulators.custatevec
pecos.simulators.cysparsesim
pecos.simulators.cysparsesim_col
pecos.simulators.cysparsesim_row
Expand Down
Loading

0 comments on commit 387207e

Please sign in to comment.