# Petri Net Modeling for Ising Model Formulation in Quantum Annealing
## 4 Binary Quadratic Net Construction from Problem Domain Petri Nets
### Incremental Construction Based on Superposition Principle  
A binary quadratic net can be composed incrementally by combining binary quadratic subnets, each corresponding to a constraint or an objective function in the original optimization problem. This superposition principle of the net structure and weight values simplifies the binary quadratic net construction. The composition is straightforward, where we add the weight values on the places and transitions if the same places and transitions in the subnets are to be combined; otherwise, add new places and transitions with their weight values. In the previous section, we observed this process in the graph partitioning example (Example 2). Even though we did not consider the weight values, we combined the two subnets. The following definition formally represents the binary quadratic net composition. **Definition 3**. : _(Binary Quadratic Net Composition) For two given binary quadratic nets \(BQN_{h}=(\hat{\Sigma},\hat{P}_{h},\hat{T}_{h},\hat{F}_{h^{\prime}},\hat{C}_{ h})\) and \(BQN_{k}=(\hat{\Sigma},\hat{P}_{k},\hat{T}_{k},\hat{F}_{k^{\prime}},\hat{C}_{k^{ \prime}},\hat{w}_{k})\) such that the model types of both nets, Ising or QUBO, are the same, the new binary quadratic net \(BQN=(\hat{\Sigma},\hat{P},\hat{T},\hat{F},\hat{C},\widehat{w})\) is composed based on the following superposition principle:_  
\[\hat{\Sigma} \in\{\{-1,+1\},\{0,1\}\} \tag{21}\] \[\hat{P} =\hat{P}_{h}\cup\hat{P}_{k}\] (22) \[\hat{T} =\hat{T}_{h}\cup\hat{T}_{k}\] (23) \[\hat{F} :(\hat{P}\times\hat{T})\cup(\hat{T}\times\hat{P})\rightarrow \begin{cases} 1&(\hat{p}_{i},\hat{t}_{ij})\text{ and }(\hat{p}_{j},\hat{t}_{ij}),\hat{t}_{i,j}\in\hat{T},\\ 0&\text{otherwise}\end{cases} \] (24) \[\hat{C} :\hat{P}\rightarrow \begin{cases}\{-1,+1\}&\text{Ising Model}\\ \{0,1\}&\text{QUBO Model}\end{cases} \] (25) \[\widehat{w} :\hat{P}\cup\hat{T}\rightarrow \begin{cases}w_{h}(x)+w_{k}(x)&x \in\hat{P}_{h}\cup\hat{T}_{h}\text{ and }x\in\hat{P}_{k}\cup\hat{T}_{k},\\ w_{h}(x)&x\in\hat{P}_{h}\cup\hat{T}_{h}\text{ and }x\
otin\hat{P}_{k}\cup\hat{T}_{k},\\ w_{k}(x)&x\in\hat{P}_{k}\cup\hat{T}_{k}\text{ and }x\
otin\hat{P}_{h}\cup\hat{T}_{h},\\ 0&\text{otherwise}\end{cases}  \tag{26}\]  
The following proposition is a straightforward but essential property for validating our method. **Proposition 2**. : _(Superposition Property) Let \(BQN\) be composed from \(BQN_{h}\) and \(BQN_{k}\). The following properties hold._  
\[H_{BQN}(\mathbf{M}) =H_{BQN_{h}}(\mathbf{M})+H_{BQN_{k}}(\mathbf{M}), (Additivity), \tag{27}\] \[H_{A\cdot BON}(\mathbf{M}) =A\cdot H_{BQN}(\mathbf{M}), (Homogeneity), \tag{28}\]where \(A\) is a scalar, and \(H_{A\cdot B\text{QN}}(\mathbf{M})\) is the energy function of BQN, such that we replace the weight function \(\hat{w}\) with \(A\cdot\hat{w}\)._  
Proof. : In Definition 3, the energy function is defined by the net structure and weight function \(\hat{w}\). Based on the composition rules in Equations (22), (24), and (25), all structural properties of \(\text{BQN}_{h}\) and \(\text{BQN}_{k}\) are transformed into BQN. Based on the rule for the weight function (26), we can confirm that \(\hat{w}(\hat{p}_{i})\) and \(\hat{w}(\hat{t}_{i,j})\) can be divided into \(\hat{w}_{h}(\hat{p}_{i})+\hat{w}_{k}(\hat{p}_{i})\) and \(\hat{w}_{h}(\hat{t}_{i,j})+\hat{w}_{k}(\hat{t}_{i,j})\) for the common place \(\hat{p}_{i}\) and transition \(\hat{t}_{i,j}\), respectively. Therefore, the additivity in Equation (27) holds. The homogeneity property with a degree of 1 is given by Definition 2 if we replace the weight function \(\hat{w}\) with \(A\cdot\hat{w}\). Owing to the additivity and homogeneity properties in Proposition 2, we have the following corollary:  
**Corollary 1**. : _Binary quadratic nets can be composed by the incremental application of Definition 3, in which we can scale the weight function \(\hat{w}\) in subnets with a constant factor._  
In our approach, we construct a target binary quadratic net based on the incremental compositions of binary quadratic subnets.