|
| 1 | +import random |
| 2 | + |
| 3 | +import torch |
| 4 | +import torchquantum as tq |
| 5 | +import torchquantum.functional as tqf |
| 6 | +import numpy as np |
| 7 | +from torchquantum.macro import F_DTYPE |
| 8 | + |
| 9 | +from typing import Union, List |
| 10 | +from collections import Counter, OrderedDict |
| 11 | + |
| 12 | +from torchquantum.functional import mat_dict |
| 13 | +# from .operator import op_name_dict, Observable |
| 14 | +import torchquantum.operator as op |
| 15 | +from copy import deepcopy |
| 16 | +import matplotlib.pyplot as plt |
| 17 | + |
| 18 | +__all__ = [ |
| 19 | + "expval_joint_sampling_grouping", |
| 20 | + "expval_joint_analytical", |
| 21 | + "expval_joint_sampling", |
| 22 | + "expval", |
| 23 | + "measure", |
| 24 | +] |
| 25 | + |
| 26 | + |
| 27 | +def measure(noisedev: tq.NoiseDevice, n_shots=1024, draw_id=None): |
| 28 | + return |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +def expval_joint_sampling_grouping( |
| 33 | + qdev: tq.NoiseDevice, |
| 34 | + observables: List[str], |
| 35 | + n_shots_per_group=1024, |
| 36 | +): |
| 37 | + return |
| 38 | + |
| 39 | + |
| 40 | +def expval_joint_sampling( |
| 41 | + qdev: tq.NoiseDevice, |
| 42 | + observable: str, |
| 43 | + n_shots=1024, |
| 44 | +): |
| 45 | + return |
| 46 | + |
| 47 | + |
| 48 | +def expval_joint_analytical( |
| 49 | + qdev: tq.NoiseDevice, |
| 50 | + observable: str, |
| 51 | +): |
| 52 | + return |
| 53 | + |
| 54 | + |
| 55 | +def expval( |
| 56 | + qdev: tq.NoiseDevice, |
| 57 | + wires: Union[int, List[int]], |
| 58 | + observables: Union[op.Observable, List[op.Observable]], |
| 59 | +): |
| 60 | + return |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +if __name__ == '__main__': |
| 69 | + print("") |
0 commit comments