89 lines
3.7 KiB
Plaintext
89 lines
3.7 KiB
Plaintext
---
|
||
title: static (v0.2)
|
||
description: API reference for qiskit_addon_mpf.static in qiskit-addon-mpf v0.2
|
||
in_page_toc_min_heading_level: 2
|
||
python_api_type: module
|
||
python_api_name: qiskit_addon_mpf.static
|
||
---
|
||
|
||
<span id="module-qiskit_addon_mpf.static" />
|
||
|
||
<span id="static-mpfs-qiskit-addon-mpf-static" />
|
||
|
||
# Static MPFs
|
||
|
||
`qiskit_addon_mpf.static`
|
||
|
||
Static MPF coefficients.
|
||
|
||
This module provides the generator function for the linear system of equations ([`LSE`](costs#lse "qiskit_addon_mpf.costs.LSE")) for computing static (that is, time-independent) MPF coefficients.
|
||
|
||
### setup\_static\_lse
|
||
|
||
<Function id="qiskit_addon_mpf.static.setup_static_lse" github="https://github.com/Qiskit/qiskit-addon-mpf/tree/stable/0.2/qiskit_addon_mpf/static.py#L31-L110" signature="setup_static_lse(trotter_steps, *, order=1, symmetric=False)">
|
||
Return the linear system of equations for computing static MPF coefficients.
|
||
|
||
This function constructs the following linear system of equations:
|
||
|
||
$$
|
||
A x = b,
|
||
$$
|
||
|
||
with
|
||
|
||
$$
|
||
\begin{split}A_{0,j} &= 1 \\
|
||
A_{i>0,j} &= k_{j}^{-(\chi + s(i-1))} \\
|
||
b_0 &= 1 \\
|
||
b_{i>0} &= 0\end{split}
|
||
$$
|
||
|
||
where \$\chi\$ is the `order`, \$s\$ is \$2\$ if `symmetric` is `True` and \$1\$ oterhwise, \$k\_\{j}\$ are the `trotter_steps`, and \$x\$ are the variables to solve for. The indices \$i\$ and \$j\$ start at \$0\$.
|
||
|
||
Here is an example:
|
||
|
||
```python
|
||
>>> from qiskit_addon_mpf.static import setup_static_lse
|
||
>>> lse = setup_static_lse([1,2,3], order=2, symmetric=True)
|
||
>>> print(lse.A)
|
||
[[1. 1. 1. ]
|
||
[1. 0.25 0.11111111]
|
||
[1. 0.0625 0.01234568]]
|
||
>>> print(lse.b)
|
||
[1. 0. 0.]
|
||
```
|
||
|
||
**Parameters**
|
||
|
||
* **trotter\_steps** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] |* [*Parameter*](https://www.cvxpy.org/api_reference/cvxpy.expressions.html#cvxpy.expressions.constants.parameter.Parameter "(in CVXPY v1.6)")) – the sequence of trotter steps from which to build \$A\$. Rather than a list of integers, this may also be a [`Parameter`](https://www.cvxpy.org/api_reference/cvxpy.expressions.html#cvxpy.expressions.constants.parameter.Parameter "(in CVXPY v1.6)") instance of the desired size. In this case, the constructed [`LSE`](costs#lse "qiskit_addon_mpf.costs.LSE") is parameterized whose values must be assigned before it can be solved.
|
||
|
||
* **order** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) – the order of the individual product formulas making up the MPF.
|
||
|
||
* **symmetric** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) –
|
||
|
||
whether the individual product formulas making up the MPF are symmetric. For example, the Lie-Trotter formula is not symmetric, while Suzuki-Trotter is.
|
||
|
||
<Admonition title="Note" type="note">
|
||
Making use of this value is equivalent to the static MPF coefficient description provided by \[1]. In contrast, \[2] disregards the symmetry of the individual product formulas, effectively always setting `symmetric=False`.
|
||
</Admonition>
|
||
|
||
**Returns**
|
||
|
||
The [`LSE`](costs#lse "qiskit_addon_mpf.costs.LSE") to find the static MPF coefficients as described above.
|
||
|
||
**Return type**
|
||
|
||
[*LSE*](costs#lse "qiskit_addon_mpf.costs.lse.LSE")
|
||
|
||
**References**
|
||
|
||
**\[1]: A. Carrera Vazquez et al., Quantum 7, 1067 (2023).**
|
||
|
||
[https://quantum-journal.org/papers/q-2023-07-25-1067/](https://quantum-journal.org/papers/q-2023-07-25-1067/)
|
||
|
||
**\[2]: S. Zhuk et al., Phys. Rev. Research 6, 033309 (2024).**
|
||
|
||
[https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.6.033309](https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.6.033309)
|
||
</Function>
|
||
|