Compare commits
No commits in common. "aa54c5dd98309e3ae931407e05fb731ded6b3d18" and "ba54939a3bc6053d44b77df540748dff29648eaa" have entirely different histories.
aa54c5dd98
...
ba54939a3b
@ -27,6 +27,7 @@ lorem>=0.1.1
|
|||||||
safetywrap>=1.5.0
|
safetywrap>=1.5.0
|
||||||
typing>=3.7.4.3
|
typing>=3.7.4.3
|
||||||
nptyping>=2.1.1
|
nptyping>=2.1.1
|
||||||
|
typing-extensions>=3.10.0.2
|
||||||
|
|
||||||
# config
|
# config
|
||||||
python-dotenv>=0.20.0
|
python-dotenv>=0.20.0
|
||||||
@ -45,4 +46,4 @@ matplotlib>=3.5.1
|
|||||||
pandas>=1.4.2
|
pandas>=1.4.2
|
||||||
tabulate>=0.8.10
|
tabulate>=0.8.10
|
||||||
# array-to-latex>=0.82 # <- has issues
|
# array-to-latex>=0.82 # <- has issues
|
||||||
# qiskit[visualization]>=0.38.0
|
qiskit[visualization]>=0.38.0
|
||||||
|
32
src/thirdparty/db.py
vendored
32
src/thirdparty/db.py
vendored
@ -1,32 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
# IMPORTS
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
import sqlite3;
|
|
||||||
from sqlite3 import Binary;
|
|
||||||
from sqlite3 import Connection;
|
|
||||||
from sqlite3 import connect;
|
|
||||||
from sqlite3 import Cursor;
|
|
||||||
from sqlite3 import PARSE_DECLTYPES;
|
|
||||||
from sqlite3 import register_adapter;
|
|
||||||
from sqlite3 import register_converter;
|
|
||||||
import pandas as pd;
|
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
# EXPORTS
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
__all__ = [
|
|
||||||
'Binary',
|
|
||||||
'Connection',
|
|
||||||
'Cursor',
|
|
||||||
'PARSE_DECLTYPES',
|
|
||||||
'connect',
|
|
||||||
'pd',
|
|
||||||
'register_adapter',
|
|
||||||
'register_converter',
|
|
||||||
'sqlite3',
|
|
||||||
];
|
|
2
src/thirdparty/maths.py
vendored
2
src/thirdparty/maths.py
vendored
@ -9,7 +9,6 @@ from fractions import Fraction;
|
|||||||
import math;
|
import math;
|
||||||
import numpy as np;
|
import numpy as np;
|
||||||
import random;
|
import random;
|
||||||
from collections import deque as Stack;
|
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# EXPORTS
|
# EXPORTS
|
||||||
@ -20,5 +19,4 @@ __all__ = [
|
|||||||
'math',
|
'math',
|
||||||
'np',
|
'np',
|
||||||
'random',
|
'random',
|
||||||
'Stack',
|
|
||||||
];
|
];
|
||||||
|
139
src/thirdparty/plots.py
vendored
139
src/thirdparty/plots.py
vendored
@ -1,139 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
# IMPORTS
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
from enum import Enum;
|
|
||||||
from matplotlib import pyplot as mplot;
|
|
||||||
from matplotlib import colors as mcolours;
|
|
||||||
from matplotlib import ticker as mticker;
|
|
||||||
from matplotlib.figure import Figure;
|
|
||||||
from matplotlib.axes import Axes;
|
|
||||||
from matplotlib.patches import Polygon;
|
|
||||||
from matplotlib.patches import FancyArrowPatch;
|
|
||||||
import plotly;
|
|
||||||
import plotly.express as px;
|
|
||||||
import plotly.graph_objects as pgo;
|
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
# MODIFICATIONS
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
class PLOTLY_COLOUR_SCHEME(Enum):
|
|
||||||
'''
|
|
||||||
Colour schemes for Plotly <https://plotly.com/python/builtin-colorscales>
|
|
||||||
'''
|
|
||||||
AGGRNYL = 'aggrnyl';
|
|
||||||
AGSUNSET = 'agsunset';
|
|
||||||
ALGAE = 'algae';
|
|
||||||
AMP = 'amp';
|
|
||||||
ARMYROSE = 'armyrose';
|
|
||||||
BALANCE = 'balance';
|
|
||||||
BLACKBODY = 'blackbody';
|
|
||||||
BLUERED = 'bluered';
|
|
||||||
BLUES = 'blues';
|
|
||||||
BLUGRN = 'blugrn';
|
|
||||||
BLUYL = 'bluyl';
|
|
||||||
BRBG = 'brbg';
|
|
||||||
BRWNYL = 'brwnyl';
|
|
||||||
BUGN = 'bugn';
|
|
||||||
BUPU = 'bupu';
|
|
||||||
BURG = 'burg';
|
|
||||||
BURGYL = 'burgyl';
|
|
||||||
CIVIDIS = 'cividis';
|
|
||||||
CURL = 'curl';
|
|
||||||
DARKMINT = 'darkmint';
|
|
||||||
DEEP = 'deep';
|
|
||||||
DELTA = 'delta';
|
|
||||||
DENSE = 'dense';
|
|
||||||
EARTH = 'earth';
|
|
||||||
EDGE = 'edge';
|
|
||||||
ELECTRIC = 'electric';
|
|
||||||
EMRLD = 'emrld';
|
|
||||||
FALL = 'fall';
|
|
||||||
GEYSER = 'geyser';
|
|
||||||
GNBU = 'gnbu';
|
|
||||||
GRAY = 'gray';
|
|
||||||
GREENS = 'greens';
|
|
||||||
GREYS = 'greys';
|
|
||||||
HALINE = 'haline';
|
|
||||||
HOT = 'hot';
|
|
||||||
HSV = 'hsv';
|
|
||||||
ICE = 'ice';
|
|
||||||
ICEFIRE = 'icefire';
|
|
||||||
INFERNO = 'inferno';
|
|
||||||
JET = 'jet';
|
|
||||||
MAGENTA = 'magenta';
|
|
||||||
MAGMA = 'magma';
|
|
||||||
MATTER = 'matter';
|
|
||||||
MINT = 'mint';
|
|
||||||
MRYBM = 'mrybm';
|
|
||||||
MYGBM = 'mygbm';
|
|
||||||
ORANGES = 'oranges';
|
|
||||||
ORRD = 'orrd';
|
|
||||||
ORYEL = 'oryel';
|
|
||||||
OXY = 'oxy';
|
|
||||||
PEACH = 'peach';
|
|
||||||
PHASE = 'phase';
|
|
||||||
PICNIC = 'picnic';
|
|
||||||
PINKYL = 'pinkyl';
|
|
||||||
PIYG = 'piyg';
|
|
||||||
PLASMA = 'plasma';
|
|
||||||
PLOTLY3 = 'plotly3';
|
|
||||||
PORTLAND = 'portland';
|
|
||||||
PRGN = 'prgn';
|
|
||||||
PUBU = 'pubu';
|
|
||||||
PUBUGN = 'pubugn';
|
|
||||||
PUOR = 'puor';
|
|
||||||
PURD = 'purd';
|
|
||||||
PURP = 'purp';
|
|
||||||
PURPLES = 'purples';
|
|
||||||
PURPOR = 'purpor';
|
|
||||||
RAINBOW = 'rainbow';
|
|
||||||
RDBU = 'rdbu';
|
|
||||||
RDGY = 'rdgy';
|
|
||||||
RDPU = 'rdpu';
|
|
||||||
RDYLBU = 'rdylbu';
|
|
||||||
RDYLGN = 'rdylgn';
|
|
||||||
REDOR = 'redor';
|
|
||||||
REDS = 'reds';
|
|
||||||
SOLAR = 'solar';
|
|
||||||
SPECTRAL = 'spectral';
|
|
||||||
SPEED = 'speed';
|
|
||||||
SUNSET = 'sunset';
|
|
||||||
SUNSETDARK = 'sunsetdark';
|
|
||||||
TEAL = 'teal';
|
|
||||||
TEALGRN = 'tealgrn';
|
|
||||||
TEALROSE = 'tealrose';
|
|
||||||
TEMPO = 'tempo';
|
|
||||||
TEMPS = 'temps';
|
|
||||||
THERMAL = 'thermal';
|
|
||||||
TROPIC = 'tropic';
|
|
||||||
TURBID = 'turbid';
|
|
||||||
TURBO = 'turbo';
|
|
||||||
TWILIGHT = 'twilight';
|
|
||||||
VIRIDIS = 'viridis';
|
|
||||||
YLGN = 'ylgn';
|
|
||||||
YLGNBU = 'ylgnbu';
|
|
||||||
YLORBR = 'ylorbr';
|
|
||||||
YLORRD = 'ylorrd';
|
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
# EXPORTS
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
__all__ = [
|
|
||||||
'Axes',
|
|
||||||
'FancyArrowPatch',
|
|
||||||
'Figure',
|
|
||||||
'Polygon',
|
|
||||||
'mcolours',
|
|
||||||
'mplot',
|
|
||||||
'mticker',
|
|
||||||
'pgo',
|
|
||||||
'PLOTLY_COLOUR_SCHEME',
|
|
||||||
'plotly',
|
|
||||||
'px',
|
|
||||||
];
|
|
6
src/thirdparty/render.py
vendored
6
src/thirdparty/render.py
vendored
@ -11,8 +11,7 @@ from IPython.display import display_png;
|
|||||||
from IPython.display import display_markdown;
|
from IPython.display import display_markdown;
|
||||||
from IPython.display import display;
|
from IPython.display import display;
|
||||||
# from array_to_latex import to_ltx as array_to_latex; # <- has issues
|
# from array_to_latex import to_ltx as array_to_latex; # <- has issues
|
||||||
# from qiskit.visualization import array_to_latex;
|
from qiskit.visualization import array_to_latex;
|
||||||
from tabulate import tabulate;
|
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# EXPORTS
|
# EXPORTS
|
||||||
@ -24,6 +23,5 @@ __all__ = [
|
|||||||
'display_latex',
|
'display_latex',
|
||||||
'display_png',
|
'display_png',
|
||||||
'display_markdown',
|
'display_markdown',
|
||||||
# 'array_to_latex',
|
'array_to_latex',
|
||||||
'tabulate',
|
|
||||||
];
|
];
|
||||||
|
62
src/thirdparty/types.py
vendored
62
src/thirdparty/types.py
vendored
@ -32,55 +32,53 @@ from typing import Any;
|
|||||||
from typing import Awaitable;
|
from typing import Awaitable;
|
||||||
from typing import Callable;
|
from typing import Callable;
|
||||||
from typing import ClassVar;
|
from typing import ClassVar;
|
||||||
from typing import Concatenate;
|
|
||||||
from typing import Coroutine;
|
from typing import Coroutine;
|
||||||
from typing import Generator;
|
from typing import Generator;
|
||||||
from typing import Generic;
|
from typing import Generic;
|
||||||
from typing import Literal;
|
|
||||||
from typing import Optional;
|
from typing import Optional;
|
||||||
from typing import ParamSpec;
|
|
||||||
from typing import Type;
|
from typing import Type;
|
||||||
from typing import TypeVar;
|
from typing import TypeVar;
|
||||||
|
from typing_extensions import Concatenate;
|
||||||
|
from typing_extensions import ParamSpec;
|
||||||
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# EXPORTS
|
# EXPORTS
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'Any',
|
|
||||||
'Awaitable',
|
|
||||||
'Bool',
|
|
||||||
'BytesIO',
|
|
||||||
'Callable',
|
|
||||||
'ClassVar',
|
|
||||||
'complex128',
|
|
||||||
'complex64',
|
|
||||||
'Concatenate',
|
|
||||||
'conint',
|
|
||||||
'Coroutine',
|
|
||||||
'Enum',
|
'Enum',
|
||||||
'Float',
|
'BytesIO',
|
||||||
'Float32',
|
|
||||||
'float32',
|
|
||||||
'Float64',
|
|
||||||
'float64',
|
|
||||||
'Generator',
|
|
||||||
'Generic',
|
|
||||||
'Int',
|
|
||||||
'Int32',
|
|
||||||
'int32',
|
|
||||||
'Int64',
|
|
||||||
'int64',
|
|
||||||
'Literal',
|
|
||||||
'NDArray',
|
'NDArray',
|
||||||
'Optional',
|
|
||||||
'ParamSpec',
|
|
||||||
'Shape',
|
'Shape',
|
||||||
'Type',
|
'Bool',
|
||||||
'TypeVar',
|
|
||||||
'UInt',
|
'UInt',
|
||||||
|
'UInt8',
|
||||||
'UInt32',
|
'UInt32',
|
||||||
'UInt64',
|
'UInt64',
|
||||||
'UInt8',
|
'Int',
|
||||||
|
'Int32',
|
||||||
|
'Int64',
|
||||||
|
'Float',
|
||||||
|
'Float32',
|
||||||
|
'Float64',
|
||||||
'uint8',
|
'uint8',
|
||||||
|
'int32',
|
||||||
|
'int64',
|
||||||
|
'float32',
|
||||||
|
'float64',
|
||||||
|
'complex64',
|
||||||
|
'complex128',
|
||||||
|
'conint',
|
||||||
|
'Any',
|
||||||
|
'Awaitable',
|
||||||
|
'Callable',
|
||||||
|
'ClassVar',
|
||||||
|
'Coroutine',
|
||||||
|
'Generator',
|
||||||
|
'Generic',
|
||||||
|
'Optional',
|
||||||
|
'Type',
|
||||||
|
'TypeVar',
|
||||||
|
'Concatenate',
|
||||||
|
'ParamSpec',
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user