q-orca 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- q_orca-0.2.0/.claude/settings.local.json +37 -0
- q_orca-0.2.0/.github/workflows/test.yml +54 -0
- q_orca-0.2.0/.github/workflows/verify-examples.yml +30 -0
- q_orca-0.2.0/.gitignore +30 -0
- q_orca-0.2.0/.mcp.json.example +12 -0
- q_orca-0.2.0/.mcp.json~ +12 -0
- q_orca-0.2.0/PKG-INFO +605 -0
- q_orca-0.2.0/README.md +573 -0
- q_orca-0.2.0/examples/.gitkeep +0 -0
- q_orca-0.2.0/examples/bell-entangler.q.orca.md +60 -0
- q_orca-0.2.0/examples/deutsch-jozsa.q.orca.md +58 -0
- q_orca-0.2.0/examples/ghz-state.q.orca.md +66 -0
- q_orca-0.2.0/examples/quantum-teleportation.q.orca.md +79 -0
- q_orca-0.2.0/examples/vqe-heisenberg.q.orca.md +96 -0
- q_orca-0.2.0/orca.yaml.example +21 -0
- q_orca-0.2.0/pyproject.toml +48 -0
- q_orca-0.2.0/q_orca/__init__.py +44 -0
- q_orca-0.2.0/q_orca/ast.py +253 -0
- q_orca-0.2.0/q_orca/cli.py +213 -0
- q_orca-0.2.0/q_orca/compiler/__init__.py +0 -0
- q_orca-0.2.0/q_orca/compiler/mermaid.py +59 -0
- q_orca-0.2.0/q_orca/compiler/qasm.py +140 -0
- q_orca-0.2.0/q_orca/compiler/qiskit.py +458 -0
- q_orca-0.2.0/q_orca/config/__init__.py +13 -0
- q_orca-0.2.0/q_orca/config/loader.py +151 -0
- q_orca-0.2.0/q_orca/config/types.py +28 -0
- q_orca-0.2.0/q_orca/llm/__init__.py +50 -0
- q_orca-0.2.0/q_orca/llm/anthropic.py +87 -0
- q_orca-0.2.0/q_orca/llm/grok.py +75 -0
- q_orca-0.2.0/q_orca/llm/ollama.py +64 -0
- q_orca-0.2.0/q_orca/llm/openai.py +83 -0
- q_orca-0.2.0/q_orca/llm/provider.py +48 -0
- q_orca-0.2.0/q_orca/mcp_server.py +265 -0
- q_orca-0.2.0/q_orca/parser/__init__.py +0 -0
- q_orca-0.2.0/q_orca/parser/markdown_parser.py +629 -0
- q_orca-0.2.0/q_orca/runtime/__init__.py +9 -0
- q_orca-0.2.0/q_orca/runtime/python.py +160 -0
- q_orca-0.2.0/q_orca/runtime/types.py +37 -0
- q_orca-0.2.0/q_orca/skills.py +567 -0
- q_orca-0.2.0/q_orca/tools.py +162 -0
- q_orca-0.2.0/q_orca/verifier/__init__.py +65 -0
- q_orca-0.2.0/q_orca/verifier/completeness.py +81 -0
- q_orca-0.2.0/q_orca/verifier/determinism.py +86 -0
- q_orca-0.2.0/q_orca/verifier/dynamic.py +391 -0
- q_orca-0.2.0/q_orca/verifier/quantum.py +256 -0
- q_orca-0.2.0/q_orca/verifier/structural.py +152 -0
- q_orca-0.2.0/q_orca/verifier/superposition.py +166 -0
- q_orca-0.2.0/q_orca/verifier/types.py +43 -0
- q_orca-0.2.0/tests/__init__.py +0 -0
- q_orca-0.2.0/tests/conftest.py +37 -0
- q_orca-0.2.0/tests/test_bell_entangler.py +139 -0
- q_orca-0.2.0/tests/test_compiler.py +440 -0
- q_orca-0.2.0/tests/test_deutsch_jozsa.py +91 -0
- q_orca-0.2.0/tests/test_examples.py +75 -0
- q_orca-0.2.0/tests/test_ghz.py +125 -0
- q_orca-0.2.0/tests/test_parser.py +201 -0
- q_orca-0.2.0/tests/test_quantum_teleportation.py +137 -0
- q_orca-0.2.0/tests/test_regression.py +575 -0
- q_orca-0.2.0/tests/test_skills.py +115 -0
- q_orca-0.2.0/tests/test_tools.py +33 -0
- q_orca-0.2.0/tests/test_verifier.py +314 -0
- q_orca-0.2.0/tests/test_vqe.py +149 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(python:*)",
|
|
5
|
+
"Bash(python3:*)",
|
|
6
|
+
"Bash(pip3 install:*)",
|
|
7
|
+
"Bash(ruff check:*)",
|
|
8
|
+
"Bash(/usr/local/opt/python@3.13/bin/python3.13 -m pip install ruff -q)",
|
|
9
|
+
"Bash(/usr/local/opt/python@3.13/bin/python3.13 -m ruff check q_orca/)",
|
|
10
|
+
"Bash(python3.13 -c \"import subprocess, sys; subprocess.run\\([sys.executable, '-m', 'ensurepip']\\)\")",
|
|
11
|
+
"Bash(pip3.13 install:*)",
|
|
12
|
+
"Bash(python3.13 -m ruff check q_orca/)",
|
|
13
|
+
"Bash(uvx ruff:*)",
|
|
14
|
+
"Bash(python3.13:*)",
|
|
15
|
+
"Bash(git add:*)",
|
|
16
|
+
"Bash(git commit:*)",
|
|
17
|
+
"Bash(gh repo:*)",
|
|
18
|
+
"Bash(gh api:*)",
|
|
19
|
+
"WebSearch",
|
|
20
|
+
"Bash(gh search:*)",
|
|
21
|
+
"Bash(/Users/allans/code/q-orca-lang/.venv/bin/q-orca-mcp --help)",
|
|
22
|
+
"Bash(printf '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"1.0\"}}}\\\\n{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}\\\\n{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/list\",\"params\":{}}\\\\n')",
|
|
23
|
+
"Bash(/Users/allans/code/q-orca-lang/.venv/bin/python -m q_orca.mcp_server)",
|
|
24
|
+
"Bash(echo \"EXIT: $?\")",
|
|
25
|
+
"Bash(/Users/allans/code/q-orca-lang/.venv/bin/q-orca-mcp)",
|
|
26
|
+
"Bash(/Users/allans/code/q-orca-lang/.venv/bin/python:*)",
|
|
27
|
+
"Bash(tail -50 ~/.claude/logs/*.log)",
|
|
28
|
+
"Read(//Users/allans/code/orca-lang/src/**)",
|
|
29
|
+
"Read(//Users/allans/code/orca-lang/packages/**)",
|
|
30
|
+
"Read(//Users/allans/code/orca-lang/**)",
|
|
31
|
+
"Bash(grep:*)",
|
|
32
|
+
"Bash(curl:*)",
|
|
33
|
+
"mcp__q-orca__server_status",
|
|
34
|
+
"mcp__q-orca__generate_machine"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
pip install -e ".[dev,quantum]"
|
|
28
|
+
|
|
29
|
+
- name: Lint with ruff
|
|
30
|
+
run: |
|
|
31
|
+
ruff check q_orca/
|
|
32
|
+
|
|
33
|
+
- name: Test with pytest
|
|
34
|
+
run: |
|
|
35
|
+
pip install pytest
|
|
36
|
+
pytest --tb=short -v
|
|
37
|
+
|
|
38
|
+
mcp-check:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
|
|
43
|
+
- name: Set up Python
|
|
44
|
+
uses: actions/setup-python@v5
|
|
45
|
+
with:
|
|
46
|
+
python-version: "3.12"
|
|
47
|
+
|
|
48
|
+
- name: Install
|
|
49
|
+
run: pip install -e ".[mcp]"
|
|
50
|
+
|
|
51
|
+
- name: Verify MCP tools
|
|
52
|
+
run: |
|
|
53
|
+
python -m q_orca.cli --tools --json | python -c "import sys,json; tools=json.load(sys.stdin); assert len(tools)==7, f'Expected 7 tools, got {len(tools)}'"
|
|
54
|
+
echo "All 7 MCP tools registered"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Verify Examples
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
verify:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up Python
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.13"
|
|
19
|
+
|
|
20
|
+
- name: Install q-orca
|
|
21
|
+
run: |
|
|
22
|
+
python -m venv .venv
|
|
23
|
+
.venv/bin/pip install -e ".[quantum]"
|
|
24
|
+
|
|
25
|
+
- name: Verify all examples
|
|
26
|
+
run: |
|
|
27
|
+
for f in examples/*.q.orca.md; do
|
|
28
|
+
echo "Verifying: $f"
|
|
29
|
+
.venv/bin/q-orca verify "$f" || exit 1
|
|
30
|
+
done
|
q_orca-0.2.0/.gitignore
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.so
|
|
5
|
+
*.egg-info/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
.venv/
|
|
9
|
+
venv/
|
|
10
|
+
*.pyc
|
|
11
|
+
|
|
12
|
+
# IDE
|
|
13
|
+
.idea/
|
|
14
|
+
.vscode/
|
|
15
|
+
*.swp
|
|
16
|
+
|
|
17
|
+
# OS
|
|
18
|
+
.DS_Store
|
|
19
|
+
Thumbs.db
|
|
20
|
+
|
|
21
|
+
# Testing
|
|
22
|
+
.pytest_cache/
|
|
23
|
+
.coverage
|
|
24
|
+
htmlcov/
|
|
25
|
+
|
|
26
|
+
# Environment / Config
|
|
27
|
+
.env
|
|
28
|
+
.env.local
|
|
29
|
+
orca.yaml
|
|
30
|
+
.mcp.json
|
q_orca-0.2.0/.mcp.json~
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"q-orca": {
|
|
4
|
+
"command": "/Users/allans/code/q-orca-lang/.venv/bin/python",
|
|
5
|
+
"args": ["-m", "q_orca.mcp_server"],
|
|
6
|
+
"env": {
|
|
7
|
+
"ORCA_PROVIDER": "minimax",
|
|
8
|
+
"ORCA_API_KEY": "sk-cp-4DPRlMOc_RYWOL0MXv5wUdrv5sj1BGwAQ1V4Ayq2nCLrKHC-xRqbQvryW3grLruWmbAlINYPDzEyX3MzRtPhmWIJlu4_A5uCrSul6ZdYrXzVRFV6nBgygv4"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|