factorized
factorized
¤
FullyFactorized(num_variables, *, num_repetitions=1)
¤
Construct a region graph with fully factorized partitions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_variables
|
int
|
The number of variables in the RG. |
required |
num_repetitions
|
int
|
The number of fully factorized partitions. Defaults to 1. |
1
|
Returns:
| Name | Type | Description |
|---|---|---|
RegionGraph |
RegionGraph
|
The fully-factorized region graph. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If either the number of variables or number of reptitions are not positive. |
Source code in cirkit/templates/region_graph/algorithms/factorized.py
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 | |