BioCompiler API
pykoppu.biocompiler.compiler.BioCompiler
Compiler for translating problems into BioASM instructions.
Source code in pykoppu/biocompiler/compiler.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
compile(problem, strategy='annealing', duration=1000.0)
Compile a problem into a sequence of instructions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
problem
|
Any
|
The problem instance (must have J and h attributes). |
required |
strategy
|
str
|
The compilation strategy. Defaults to "annealing". |
'annealing'
|
duration
|
float
|
Total simulation duration in milliseconds. Defaults to 1000.0. |
1000.0
|
Returns:
| Type | Description |
|---|---|
List[Instruction]
|
List[Instruction]: The sequence of BioASM instructions. |
Source code in pykoppu/biocompiler/compiler.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
pykoppu.biocompiler.isa.OpCode
Bases: Enum
BioASM Operation Codes.
Source code in pykoppu/biocompiler/isa.py
11 12 13 14 15 16 17 18 19 20 21 | |
pykoppu.biocompiler.isa.Instruction
dataclass
A single BioASM instruction.
Source code in pykoppu/biocompiler/isa.py
23 24 25 26 27 28 29 30 31 32 33 | |