Python Functions¶
Kraus¶
Parameterization of a quantum state using Kraus operators.
The evolved density matrix \(\rho\) is given by
where \(\rho_0\) is the initial density matrix and \(K_i\) are the Kraus operators.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho0 |
array
|
Initial density matrix. |
required |
K |
list
|
Kraus operators. |
required |
dK |
list
|
Derivatives of the Kraus operators with respect to the unknown parameters to be
estimated. This is a nested list where the first index corresponds to the Kraus operator
and the second index corresponds to the parameter. For example, |
required |
Returns:
Type | Description |
---|---|
tuple
|
rho (np.array): Evolved density matrix. drho (list):
Derivatives of the evolved density matrix with respect to the unknown parameters. |
Source code in quanestimation/Parameterization/NonDynamics.py
4 5 6 7 8 9 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 |
|
Metrological resources¶
Spin squeezing¶
Calculation of the spin squeezing parameter for a density matrix.
The spin squeezing parameter \(\xi\) given by Kitagawa and Ueda is defined as:
where \(J_{\vec{n}_i}\) are the collective spin operators.
The spin squeezing parameter \(\xi\) given by Wineland etal. is defined as:
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho |
array
|
Density matrix. |
required |
basis |
str
|
Basis to use: "Dicke" (default) or "Pauli". |
'Dicke'
|
output |
str
|
Type of spin squeezing to calculate: |
'KU'
|
Returns:
Type | Description |
---|---|
float
|
Spin squeezing parameter. |
Raises:
Type | Description |
---|---|
ValueError
|
If |
ValueError
|
If |
Source code in quanestimation/Resource/Resource.py
3 4 5 6 7 8 9 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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|
Target time¶
Calculation of the time to reach a given precision limit.
This function finds the earliest time \(t\) in tspan
where the objective
function func
reaches or crosses the target value \(f\). The first argument
of func must be the time variable.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
f |
float
|
The target value of the objective function. |
required |
tspan |
array
|
Time points for the evolution. |
required |
func |
callable
|
The objective function to evaluate. Must return a float. |
required |
*args |
tuple
|
Positional arguments to pass to |
()
|
**kwargs |
dict
|
Keyword arguments to pass to |
{}
|
Returns:
Type | Description |
---|---|
float
|
Time to reach the given target precision. |
Source code in quanestimation/Resource/Resource.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
|
Quantum Cramér-Rao bounds¶
Classical Fisher information matrix (CFIM)¶
Calculation of the classical Fisher information matrix for the chosen measurements.
This function computes the classical Fisher information (CFI) and classical Fisher information matrix (CFIM) for a density matrix. The entry of CFIM \(\mathcal{I}\) is defined as
Symbols
- \(p(y|\textbf{x})=\mathrm{Tr}(\rho\Pi_y)\).
- \(\rho\): the parameterized density matrix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho |
array
|
Density matrix. |
required |
drho |
list
|
List of derivative matrices of the density matrix on the unknown parameters to be estimated. For example, drho[0] is the derivative matrix on the first parameter. |
required |
M |
list
|
List of positive operator-valued measure (POVM). The default measurement is a set of rank-one symmetric informationally complete POVM (SIC-POVM). |
[]
|
eps |
float
|
Machine epsilon for numerical stability. |
1e-08
|
Returns:
Type | Description |
---|---|
float / array
|
For single parameter estimation (the length of drho is equal to one), the output is CFI and for multiparameter estimation (the length of drho is more than one), it returns CFIM. |
Raises:
Type | Description |
---|---|
TypeError
|
If drho is not a list. |
TypeError
|
If M is not a list. |
Example
rho = np.array([[0.5, 0], [0, 0.5]]);
drho = [np.array([[1, 0], [0, -1]])];
cfim = CFIM(rho, drho);
Notes
SIC-POVM is calculated by the Weyl-Heisenberg covariant SIC-POVM fiducial state which can be downloaded from here.
Source code in quanestimation/AsymptoticBound/CramerRao.py
8 9 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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
Fisher information matrix (FIM)¶
Calculation of the classical Fisher information matrix (CFIM) for a given probability distributions.
This function computes the classical Fisher information matrix (CFIM) for a given probability distributions. The entry of FIM \(I\) is defined as
Symbols
- \(\{p_y\}\): a set of the discrete probability distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
p |
array
|
The probability distribution. |
required |
dp |
list
|
Derivatives of the probability distribution on the unknown parameters to be estimated. For example, dp[0] is the derivative vector on the first parameter. |
required |
eps |
float
|
Machine epsilon. |
1e-08
|
Returns:
Type | Description |
---|---|
float / array
|
For single parameter estimation (the length of drho is equal to one), the output is CFI and for multiparameter estimation (the length of drho is more than one), it returns CFIM. |
Source code in quanestimation/AsymptoticBound/CramerRao.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
|
Fisher information (FI_Expt)¶
Calculate the classical Fisher information (CFI) based on experimental data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_true |
array
|
Experimental data obtained at the true parameter value. |
required |
data_shifted |
array
|
Experimental data obtained at parameter value shifted by delta_x. |
required |
delta_x |
float
|
Small known parameter shift. |
required |
ftype |
str
|
Probability distribution of the data. Options: |
'norm'
|
Returns:
Type | Description |
---|---|
float
|
Classical Fisher information |
Raises:
Type | Description |
---|---|
ValueError
|
If |
Notes
The current implementation may be unstable and is subject to future modification.
Source code in quanestimation/AsymptoticBound/CramerRao.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
|
Symmetric logarithmic derivative (SLD)¶
Calculation of the symmetric logarithmic derivative (SLD) for a density matrix.
This function computes the SLD operator \(L_a\), which is determined by
with \(\rho\) the parameterized density matrix. The entries of SLD can be calculated as
for \(\lambda_i~(\lambda_j) \neq 0\). If \(\lambda_i=\lambda_j=0\), the entry of SLD is set to be zero.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho |
array
|
Density matrix. |
required |
drho |
list
|
Derivatives of the density matrix on the unknown parameters to be estimated. For example, drho[0] is the derivative vector on the first parameter. |
required |
rep |
str
|
The basis for the SLDs. Options: |
'original'
|
eps |
float
|
Machine epsilon. |
1e-08
|
Returns:
Type | Description |
---|---|
array / list
|
For single parameter estimation (i.e., length of |
Raises:
Type | Description |
---|---|
TypeError
|
If |
ValueError
|
If |
Source code in quanestimation/AsymptoticBound/CramerRao.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
|
Right logarithmic derivative (RLD)¶
Calculation of the right logarithmic derivative (RLD) for a density matrix. The RLD operator \(\mathcal{R}_a\) is defined by
with \(\rho\) the parameterized density matrix. The entries of RLD can be calculated as
for \(\lambda_i\neq 0\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho |
array
|
Density matrix. |
required |
drho |
list
|
Derivatives of the density matrix on the unknown parameters to be estimated. For example, drho[0] is the derivative vector on the first parameter. |
required |
rep |
str
|
The basis for the RLD(s). Options: |
'original'
|
eps |
float
|
Machine epsilon. |
1e-08
|
Returns:
Type | Description |
---|---|
array / list
|
For single parameter estimation (i.e., length of |
Raises:
Type | Description |
---|---|
TypeError
|
If |
ValueError
|
If |
Source code in quanestimation/AsymptoticBound/CramerRao.py
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
|
Left logarithmic derivative (LLD)¶
Calculation of the left logarithmic derivative (LLD) for a density matrix \(\rho\).
The LLD operator \(\mathcal{R}_a^{\dagger}\) is defined by
The entries of LLD can be calculated as
for \(\lambda_j\neq 0\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho |
array
|
Density matrix. |
required |
drho |
list
|
Derivatives of the density matrix on the unknown parameters to be estimated. For example, drho[0] is the derivative vector on the first parameter. |
required |
rep |
str
|
The basis for the LLD(s). Options: |
'original'
|
eps |
float
|
Machine epsilon. |
1e-08
|
Returns:
Type | Description |
---|---|
array / list
|
For single parameter estimation (i.e., length of |
Raises:
Type | Description |
---|---|
TypeError
|
If |
ValueError
|
If |
Source code in quanestimation/AsymptoticBound/CramerRao.py
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 |
|
Quantum Fisher information matrix (QFIM)¶
Calculate the quantum Fisher information (QFI) and quantum Fisher information matrix (QFIM) for all types.
The entry of QFIM \(\mathcal{F}\) is defined as:
with \(L_a, L_b\) being SLD operators.
Alternatively:
with \(\mathcal{R}_a\) being the RLD or LLD operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho |
array
|
Density matrix. |
required |
drho |
list
|
Derivatives of the density matrix with respect to the unknown parameters.
Each element in the list is a matrix of the same dimension as |
required |
LDtype |
str
|
Specifies the type of logarithmic derivative to use for QFI/QFIM calculation: |
'SLD'
|
exportLD |
bool
|
Whether to export the values of logarithmic derivatives. |
False
|
eps |
float
|
Machine epsilon. |
1e-08
|
Returns:
Type | Description |
---|---|
float / array
|
For single parameter estimation (i.e., length of |
Raises:
Type | Description |
---|---|
TypeError
|
If |
ValueError
|
If |
Source code in quanestimation/AsymptoticBound/CramerRao.py
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 |
|
Quantum Fisher information matrix with Kraus operators¶
Calculation of the quantum Fisher information (QFI) and quantum Fisher information matrix (QFIM) for a quantum channel described by Kraus operators.
The quantum channel is given by
where \(\rho_0\) is the initial state and \(\{K_i\}\) are the Kraus operators.
The derivatives of the density matrix \(\partial_a\rho\) are calculated from the derivatives of the Kraus operators \(\{\partial_a K_i\}\) as
Then the QFI (QFIM) is calculated via the function QFIM
with the evolved state
\(\rho\) and its derivatives \(\{\partial_a\rho\}\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho0 |
array
|
Initial density matrix. |
required |
K |
list
|
Kraus operators. |
required |
dK |
list
|
Derivatives of the Kraus operators. It is a nested list where the first index
corresponds to the parameter and the second index corresponds to the Kraus operator index.
For example, |
required |
LDtype |
str
|
Types of QFI (QFIM) can be set as the objective function. Options: |
'SLD'
|
exportLD |
bool
|
Whether to export the values of logarithmic derivatives. |
False
|
eps |
float
|
Machine epsilon. |
1e-08
|
Returns:
Type | Description |
---|---|
float / array
|
For single parameter estimation (the length of dK is equal to one), the output is QFI and for multiparameter estimation (the length of dK is more than one), it returns QFIM. |
Source code in quanestimation/AsymptoticBound/CramerRao.py
627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 |
|
Quantum Fisher information matrix in Bloch representation¶
Calculation of the quantum Fisher information (QFI) and quantum Fisher information matrix (QFIM) in Bloch representation.
The Bloch vector representation of a quantum state is defined as
where \(\lambda_i\) are the generators of SU(d) group.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
r |
array
|
Parameterized Bloch vector. |
required |
dr |
list
|
Derivatives of the Bloch vector with respect to the unknown parameters.
Each element in the list is a vector of the same length as |
required |
eps |
float
|
Machine epsilon. |
1e-08
|
Returns:
Type | Description |
---|---|
float / array
|
For single parameter estimation (the length of |
Raises:
Type | Description |
---|---|
TypeError
|
If |
ValueError
|
If the dimension of the Bloch vector is invalid. |
Source code in quanestimation/AsymptoticBound/CramerRao.py
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 |
|
Quantum Fisher information matrix with Gaussian states¶
Calculation of the quantum Fisher information (QFI) and quantum Fisher information matrix (QFIM) for Gaussian states.
The Gaussian state is characterized by its first-order moment (displacement vector) and second-order moment (covariance matrix). The QFIM is calculated using the method described in [1].
Parameters:
Name | Type | Description | Default |
---|---|---|---|
R |
array
|
First-order moment (displacement vector). |
required |
dR |
list
|
Derivatives of the first-order moment with respect to the unknown parameters.
Each element in the list is a vector of the same length as |
required |
D |
array
|
Second-order moment (covariance matrix). |
required |
dD |
list
|
Derivatives of the second-order moment with respect to the unknown parameters.
Each element in the list is a matrix of the same dimension as |
required |
Returns:
Type | Description |
---|---|
float / array
|
For single parameter estimation (the length of |
Notes
This function follows the approach from: [1] Monras, A., Phase space formalism for quantum estimation of Gaussian states, arXiv:1303.3682 (2013).
Source code in quanestimation/AsymptoticBound/CramerRao.py
802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 |
|
Holevo Cramér-Rao bound¶
Calculate the Holevo Cramer-Rao bound (HCRB) via semidefinite programming (SDP).
The HCRB is defined as:
where \(Z_{ij} = \mathrm{Tr}(\rho X_i X_j)\) and \(V\) is the covariance matrix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho |
array
|
Density matrix. |
required |
drho |
list
|
Derivatives of the density matrix with respect to unknown parameters. |
required |
W |
array
|
Weight matrix for the bound. |
required |
eps |
float
|
Machine epsilon for numerical stability. |
1e-08
|
Returns:
Type | Description |
---|---|
float
|
The value of the Holevo Cramer-Rao bound. |
Raises:
Type | Description |
---|---|
TypeError
|
If |
Notes
In the single-parameter scenario, the HCRB is equivalent to the QFI.
For a rank-one weight matrix, the HCRB is equivalent to the inverse of the QFIM.
Source code in quanestimation/AsymptoticBound/AnalogCramerRao.py
9 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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
Nagaoka-Hayashi bound¶
Calculation of the Nagaoka-Hayashi bound (NHB) via the semidefinite program (SDP).
The NHB is defined as:
where \(Z_{ij} = \mathrm{Tr}(\rho X_i X_j)\) and \(V\) is the covariance matrix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rho |
array
|
Density matrix. |
required |
drho |
list
|
Derivatives of the density matrix with respect to unknown parameters. |
required |
W |
array
|
Weight matrix for the bound. |
required |
Returns:
Type | Description |
---|---|
float
|
The value of the Nagaoka-Hayashi bound. |
Raises:
Type | Description |
---|---|
TypeError
|
If |
Source code in quanestimation/AsymptoticBound/AnalogCramerRao.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
|
Bayesian Cramér-Rao bounds¶
Bayesian classical Fisher information matrix (BCFIM)¶
Calculation of the Bayesian classical Fisher information matrix (BCFIM).
This function computes the Bayesian classical Fisher information (BCFI) or Bayesian classical Fisher information matrix (BCFIM). The BCFIM is defined as:
where \(\mathcal{I}\) is the classical Fisher information matrix (CFIM) and \(p(\textbf{x})\) is the prior distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
list
|
Parameter regimes for integration. Each element is an array representing the values of one parameter. |
required |
p |
array
|
Prior distribution over the parameter space. Must have the same dimensions
as the product of the lengths of the arrays in |
required |
rho |
list
|
Parameterized density matrices. Each element corresponds to
a point in the parameter space defined by |
required |
drho |
list
|
Derivatives of the density matrices with respect to the parameters. For single parameter estimation (length of |
required |
M |
list
|
Positive operator-valued measure (POVM). Default is a set of rank-one symmetric informationally complete POVM (SIC-POVM). |
[]
|
eps |
float
|
Machine epsilon for numerical stability. |
1e-08
|
Returns:
Type | Description |
---|---|
float / array
|
For single parameter estimation (length of |
Raises:
Type | Description |
---|---|
TypeError
|
If |
Notes
SIC-POVM is calculated using Weyl-Heisenberg covariant SIC-POVM fiducial states available at http://www.physics.umb.edu/Research/QBism/solutions.html.
Source code in quanestimation/BayesianBound/BayesCramerRao.py
9 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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
Bayesian quantum Fisher information matrix (BQFIM)¶
Calculation of the Bayesian quantum Fisher information matrix (BQFIM).
This function computes the Bayesian quantum Fisher information (BQFI) or Bayesian quantum Fisher information matrix (BQFIM). The BQFIM is defined as:
where \(\mathcal{F}\) is the quantum Fisher information matrix (QFIM) and \(p(\textbf{x})\) is the prior distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
list
|
Parameter regimes for integration. Each element is an array representing the values of one parameter. |
required |
p |
array
|
Prior distribution over the parameter space. Must have the same dimensions
as the product of the lengths of the arrays in |
required |
rho |
list
|
Parameterized density matrices. Each element corresponds to
a point in the parameter space defined by |
required |
drho |
list
|
Derivatives of the density matrices with respect to
the parameters. |
required |
LDtype |
str
|
Type of logarithmic derivative (default: "SLD"). Options: |
'SLD'
|
eps |
float
|
Machine epsilon for numerical stability. |
1e-08
|
Returns:
Type | Description |
---|---|
float / array
|
For single parameter estimation (length of |
Source code in quanestimation/BayesianBound/BayesCramerRao.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
|
Bayesian Cramér-Rao bound (BCRB)¶
Calculation of the Bayesian Cramer-Rao bound (BCRB).
This function computes the Bayesian Cramer-Rao bound (BCRB) for single or multiple parameters.
The covariance matrix with prior distribution \(p(\textbf{x})\) is:
This function calculates three types of BCRB:
Type 1:
Type 2: $$ \mathrm{cov} \geq \mathcal{B} \mathcal{I}_{\mathrm{Bayes}}^{-1} \mathcal{B} + \int p(\textbf{x}) \textbf{b} \textbf{b}^{\mathrm{T}} \mathrm{d}\textbf{x}. $$
Type 3: $$ \mathrm{cov} \geq \int p(\textbf{x}) \mathcal{G} \left( \mathcal{I}_p + \mathcal{I} \right)^{-1} \mathcal{G}^{\mathrm{T}} \mathrm{d}\textbf{x}. $$
Symbols
- \(\textbf{b}\): bias vector
- \(\textbf{b}'\): its derivatives
- \(B\): diagonal matrix with \(B_{ii} = 1 + [\textbf{b}']_{i}\)
- \(\mathcal{I}\): classical Fisher information matrix (CFIM)
- \(\mathcal{B} = \int p(\textbf{x}) B \mathrm{d}\textbf{x}\)
- \(\mathcal{I}_{\mathrm{Bayes}} = \int p(\textbf{x}) \mathcal{I} \mathrm{d}\textbf{x}\)
- \([\mathcal{I}_{p}]_{ab} = [\partial_a \ln p(\textbf{x})][\partial_b \ln p(\textbf{x})]\)
- \(\mathcal{G}_{ab} = [\partial_b \ln p(\textbf{x})][\textbf{b}]_a + B_{aa}\delta_{ab}\)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
list
|
Parameter regimes for integration. |
required |
p |
array
|
Prior distribution over the parameter space. Must have the same dimensions
as the product of the lengths of the arrays in |
required |
dp |
list
|
Derivatives of the prior distribution with respect to the parameters. |
required |
rho |
list
|
Parameterized density matrices. Each element corresponds to
a point in the parameter space defined by |
required |
drho |
list
|
Derivatives of the density matrices with respect to
the parameters. |
required |
M |
list
|
Positive operator-valued measure (POVM). Default is a set of rank-one symmetric informationally complete POVM (SIC-POVM). |
[]
|
b |
list
|
Bias vector. Default is zero bias. |
[]
|
db |
list
|
Derivatives of the bias vector. Default is zero. |
[]
|
btype |
int
|
Type of BCRB to calculate (1, 2, or 3). |
1
|
eps |
float
|
Machine epsilon for numerical stability. |
1e-08
|
Returns:
Type | Description |
---|---|
float / array
|
For single parameter estimation (length of |
Raises:
Type | Description |
---|---|
TypeError
|
If |
NameError
|
If |
Notes
SIC-POVM is calculated using Weyl-Heisenberg covariant SIC-POVM fiducial states available at http://www.physics.umb.edu/Research/QBism/solutions.html.
Source code in quanestimation/BayesianBound/BayesCramerRao.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
|
Bayesian quantum Cramér-Rao bound (BQCRB)¶
Calculation of the Bayesian quantum Cramer-Rao bound (BQCRB).
The covariance matrix with a prior distribution \(p(\textbf{x})\) is defined as
Symbols
- \(\textbf{x}=(x_0,x_1,\dots)^{\mathrm{T}}\): the unknown parameters to be estimated and the integral \(\int\mathrm{d}\textbf{x}:=\iiint\mathrm{d}x_0\mathrm{d}x_1\cdots\).
- \(\{\Pi_y\}\): a set of positive operator-valued measure (POVM).
- \(\rho\): the parameterized density matrix.
This function calculates three types of the BQCRB. The first one is
Symbols
- \(\textbf{b}\) and \(\textbf{b}'\): the vectors of biase and its derivatives on parameters.
- \(B\): a diagonal matrix with the \(i\)th entry \(B_{ii}=1+[\textbf{b}']_{i}\)
- \(\mathcal{F}\): the QFIM for all types.
The second one is
Symbols
- \(\mathcal{B}=\int p(\textbf{x})B\mathrm{d}\textbf{x}\): the average of \(B\)
- \(\mathcal{F}_{\mathrm{Bayes}}=\int p(\textbf{x})\mathcal{F}\mathrm{d}\textbf{x}\): the average QFIM.
The third one is
Symbols
- \([\mathcal{I}_{p}]_{ab}:=[\partial_a \ln p(\textbf{x})][\partial_b \ln p(\textbf{x})]\).
- \(\mathcal{G}_{ab}:=[\partial_b\ln p(\textbf{x})][\textbf{b}]_a+B_{aa}\delta_{ab}\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
list
|
The regimes of the parameters for the integral. |
required |
p |
(array, multidimensional)
|
The prior distribution. |
required |
rho |
(list, multidimensional)
|
Parameterized density matrix. |
required |
drho |
(list, multidimensional)
|
Derivatives of the parameterized density matrix (rho) with respect to the unknown parameters to be estimated. |
required |
b |
list
|
Vector of biases of the form \(\textbf{b}=(b(x_0),b(x_1),\dots)^{\mathrm{T}}\). |
[]
|
db |
list
|
Derivatives of b with respect to the unknown parameters to be estimated, It should be expressed as \(\textbf{b}'=(\partial_0 b(x_0),\partial_1 b(x_1),\dots)^{\mathrm{T}}\). |
[]
|
btype |
int
|
Types of the BQCRB. Options are: |
1
|
LDtype |
str
|
Types of QFI (QFIM) can be set as the objective function. Options are: |
'SLD'
|
eps |
(float, optional)
|
Machine epsilon. |
1e-08
|
Returns:
Type | Description |
---|---|
float / array
|
For single parameter estimation (the length of |
Source code in quanestimation/BayesianBound/BayesCramerRao.py
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 |
|
Optimal biased bound (OBB)¶
Calculate the optimal biased bound (OBB) for single parameter estimation.
The OBB is defined as:
Symbols
- \(b\): bias, \(b'\): its derivative.
- \(F\): quantum Fisher information (QFI).
This bound is solved using a boundary value problem approach.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
array
|
Parameter regime for integration. |
required |
p |
array
|
Prior distribution. |
required |
dp |
array
|
Derivative of the prior distribution with respect to the parameter. |
required |
rho |
list
|
Parameterized density matrices. |
required |
drho |
list
|
First derivatives of the density matrices with respect to the parameter. |
required |
d2rho |
list
|
Second-order derivatives of the density matrices with respect to the parameter. |
required |
LDtype |
str
|
Type of logarithmic derivative (default: "SLD"). Options: |
'SLD'
|
eps |
float
|
Machine epsilon. |
1e-08
|
Returns:
Type | Description |
---|---|
float
|
The optimal biased bound value for single parameter estimation. |
Notes
This function uses a boundary value problem solver to compute the optimal bias function.
Source code in quanestimation/BayesianBound/BayesCramerRao.py
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 |
|
Van Trees bound (VTB)¶
Calculate the Van Trees bound (VTB), a Bayesian version of the Cramer-Rao bound.
The covariance matrix with prior distribution \(p(\textbf{x})\) is:
The VTB is given by:
Symbols
- \(\mathcal{I}_{\mathrm{prior}} = \int p(\textbf{x}) \mathcal{I}_{p} \, \mathrm{d}\textbf{x}\) is the classical Fisher information matrix (CFIM) for the prior distribution \(p(\textbf{x})\).
- \(\mathcal{I}_{\mathrm{Bayes}} = \int p(\textbf{x}) \mathcal{I} \, \mathrm{d}\textbf{x}\) is the average CFIM over the prior.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
list
|
Parameter regimes for integration. |
required |
p |
array
|
Prior distribution. |
required |
dp |
list
|
Derivatives of the prior distribution with respect to the parameters. |
required |
rho |
list
|
Parameterized density matrices. |
required |
drho |
list
|
Derivatives of the density matrices with respect to the parameters. |
required |
M |
list
|
Positive operator-valued measure (POVM). Default is SIC-POVM. |
[]
|
eps |
float
|
Machine epsilon. |
1e-08
|
Returns:
Type | Description |
---|---|
float / array
|
For single parameter: float. For multiple parameters: matrix. |
Notes
SIC-POVM uses Weyl-Heisenberg covariant fiducial states from http://www.physics.umb.edu/Research/QBism/solutions.html.
Source code in quanestimation/BayesianBound/BayesCramerRao.py
765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 |
|
Quantum Van Trees bound (QVTB)¶
Calculate the quantum Van Trees bound (QVTB), a Bayesian version of the quantum Cramer-Rao bound.
The covariance matrix with prior distribution \(p(\textbf{x})\) is:
The QVTB is given by:
$$ \mathrm{cov} \geq \left(\mathcal{I}{\mathrm{prior}} + \mathcal{F}. $$}}\right)^{-1
Symbols
- \(\mathcal{I}_{\mathrm{prior}} = \int p(\textbf{x}) \mathcal{I}_{p} \, \mathrm{d}\textbf{x}\):
the classical Fisher information matrix (CFIM) for the prior distribution \(p(\textbf{x})\). - \(\mathcal{F}_{\mathrm{Bayes}} = \int p(\textbf{x}) \mathcal{F} \, \mathrm{d}\textbf{x}\):
the average quantum Fisher information matrix (QFIM) over the prior.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
list
|
Parameter regimes for integration. |
required |
p |
array
|
Prior distribution. |
required |
dp |
list
|
Derivatives of the prior distribution with respect to the parameters. |
required |
rho |
list
|
Parameterized density matrices. |
required |
drho |
list
|
Derivatives of the density matrices with respect to the parameters. |
required |
LDtype |
string
|
Type of logarithmic derivative (default: "SLD"). Options: |
'SLD'
|
eps |
float
|
Machine epsilon. |
1e-08
|
Returns:
Type | Description |
---|---|
float / array
|
For single parameter: float. For multiple parameters: matrix. |
Source code in quanestimation/BayesianBound/BayesCramerRao.py
896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 |
|
Quantum Ziv-Zakai bound¶
Calculation of the quantum Ziv-Zakai bound (QZZB). The expression of QZZB with a prior distribution p(x) in a finite regime \([\alpha,\beta]\) is
Symbols
- \(||\cdot||\): the trace norm
- \(\mathcal{V}\): the "valley-filling" operator satisfying \(\mathcal{V}f(\tau)=\max_{h\geq 0}f(\tau+h)\).
- \(\rho(x)\): the parameterized density matrix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
list
|
The regimes of the parameters for the integral. |
required |
p |
ndarray
|
The prior distribution as a multidimensional array. |
required |
rho |
list
|
Parameterized density matrix as a multidimensional list. |
required |
eps |
float
|
Machine epsilon. Defaults to 1e-8. |
1e-08
|
Returns:
Type | Description |
---|---|
float
|
Quantum Ziv-Zakai bound (QZZB). |
Raises:
Type | Description |
---|---|
ValueError
|
If the length of x and p do not match. |
Source code in quanestimation/BayesianBound/ZivZakai.py
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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
Bayesian estimation¶
Maximum a posteriori probability (MAP)¶
Bayesian estimation. The prior distribution is updated via the posterior distribution obtained by the Bayes' rule, and the estimated value of parameters are updated via the expectation value of the distribution or maximum a posteriori probability (MAP).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
list
|
The regimes of the parameters for the integral. |
required |
p |
ndarray
|
The prior distribution as a multidimensional array. |
required |
rho |
list
|
Parameterized density matrix as a multidimensional list. |
required |
y |
ndarray
|
The experimental results obtained in practice. |
required |
M |
list
|
A set of positive operator-valued measure (POVM). Defaults to a set of rank-one symmetric informationally complete POVM (SIC-POVM). |
[]
|
estimator |
str
|
Estimators for the bayesian estimation. Options are: "mean" (default) - The expectation value of the distribution. "MAP" - Maximum a posteriori probability. |
'mean'
|
savefile |
bool
|
Whether to save all posterior distributions. If True, generates "pout.npy" and "xout.npy" containing all posterior distributions and estimated values across iterations. If False, only saves the final posterior distribution and all estimated values. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
tuple
|
pout (np.ndarray): The posterior distribution in the final iteration. xout (float/list): The estimated values in the final iteration. |
Raises:
Type | Description |
---|---|
TypeError
|
If |
ValueError
|
If estimator is not "mean" or "MAP". |
Note
SIC-POVM is calculated by the Weyl-Heisenberg covariant SIC-POVM fiducial state which can be downloaded from here.
Source code in quanestimation/BayesianBound/BayesEstimation.py
8 9 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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
|
Maximum likelihood estimation (MLE)¶
Maximum likelihood estimation (MLE) for parameter estimation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
list
|
The regimes of the parameters for the integral. |
required |
rho |
list
|
Parameterized density matrix as a multidimensional list. |
required |
y |
ndarray
|
The experimental results obtained in practice. |
required |
M |
list
|
A set of positive operator-valued measure (POVM). Defaults to a set of rank-one symmetric informationally complete POVM (SIC-POVM). |
[]
|
savefile |
bool
|
Whether to save all likelihood functions. If True, generates "Lout.npy" and "xout.npy" containing all likelihood functions and estimated values across iterations. If False, only saves the final likelihood function and all estimated values. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
tuple
|
Lout (np.ndarray): The likelihood function in the final iteration. xout (float/list): The estimated values in the final iteration. |
Raises:
Type | Description |
---|---|
TypeError
|
If |
Note
SIC-POVM is calculated by the Weyl-Heisenberg covariant SIC-POVM fiducial state which can be downloaded from here.
Source code in quanestimation/BayesianBound/BayesEstimation.py
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
|
Average Bayesian cost (BayesCost)¶
Calculation of the average Bayesian cost with a quadratic cost function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
list
|
The regimes of the parameters for the integral. |
required |
p |
array
|
The prior distribution as a multidimensional array. |
required |
xest |
list
|
The estimators. |
required |
rho |
list
|
Parameterized density matrix as a multidimensional list. |
required |
M |
list
|
A set of positive operator-valued measure (POVM). |
required |
W |
array
|
Weight matrix. Defaults to an identity matrix. |
[]
|
eps |
float
|
Machine epsilon. |
1e-08
|
Returns:
Type | Description |
---|---|
float
|
The average Bayesian cost. |
Raises:
Type | Description |
---|---|
TypeError
|
If |
Source code in quanestimation/BayesianBound/BayesEstimation.py
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
|
Bayesian cost bound (BCB)¶
Calculation of the Bayesian cost bound with a quadratic cost function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
list
|
The regimes of the parameters for the integral. |
required |
p |
array
|
The prior distribution as a multidimensional array. |
required |
rho |
list
|
Parameterized density matrix as a multidimensional list. |
required |
W |
array
|
Weight matrix. Defaults to an identity matrix. |
[]
|
eps |
float
|
Machine epsilon. Defaults to 1e-8. |
1e-08
|
Returns:
Type | Description |
---|---|
float
|
The value of the minimum Bayesian cost. |
Note
This function calculates the Bayesian cost bound for parameter estimation.
Source code in quanestimation/BayesianBound/BayesEstimation.py
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 |
|
Common utilities¶
Bayes input¶
Generate input variables for Bayesian estimation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
array
|
Parameter regimes |
required |
func |
callable
|
Function returning H or K |
required |
dfunc |
callable
|
Function returning dH or dK |
required |
channel |
str
|
"dynamics" or "Kraus" (default: "dynamics") |
'dynamics'
|
Returns:
Type | Description |
---|---|
tuple
|
Tuple of (H_list, dH_list) or (K_list, dK_list) |
Raises:
Type | Description |
---|---|
ValueError
|
For invalid channel. |
Source code in quanestimation/Common/Common.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
|
SIC-POVM¶
Generate SIC-POVM for given dimension.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dim |
float
|
Dimension of the system. |
required |
Returns:
Type | Description |
---|---|
list
|
List of SIC-POVM elements. |
Raises:
Type | Description |
---|---|
ValueError
|
If dimension > 151. |
Source code in quanestimation/Common/Common.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
|
SU(\(N\)) generators¶
Generate sorted SU(N) generators.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n |
float
|
Dimension of the system. |
required |
Returns:
Type | Description |
---|---|
list
|
List of SU(N) generators. |
Source code in quanestimation/Common/Common.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|