| 649 | |
| 650 | template <NumQubitsFlag Ctrls, NumQubitsFlag Targs, ArgsFlag Args> |
| 651 | void CAPTURE_RELEVANT( vector<int> ctrls, vector<int> states, vector<int> targs, auto& args ) { |
| 652 | |
| 653 | // display ctrls |
| 654 | if (Ctrls == one) |
| 655 | UNSCOPED_INFO( "control := " << ctrls[0] ); |
| 656 | if (Ctrls == any || Ctrls == anystates ) |
| 657 | UNSCOPED_INFO( "controls := " << toString(ctrls) ); |
| 658 | |
| 659 | // display states |
| 660 | if (Ctrls == anystates) |
| 661 | UNSCOPED_INFO( "states := " << toString(states) ); |
| 662 | |
| 663 | // display targs |
| 664 | if (Targs == one) |
| 665 | UNSCOPED_INFO( "target := " << targs[0] ); |
| 666 | |
| 667 | if (Targs == two) { |
| 668 | UNSCOPED_INFO( "target A := " << targs[0] ); |
| 669 | UNSCOPED_INFO( "target B := " << targs[1] ); |
| 670 | } |
| 671 | if (Targs == any) |
| 672 | UNSCOPED_INFO( "targets := " << toString(targs) ); |
| 673 | |
| 674 | // display rotation angle |
| 675 | if constexpr (Args == scalar) |
| 676 | UNSCOPED_INFO( "angle := " << std::get<0>(args) ); |
| 677 | |
| 678 | // display rotation angle and axis |
| 679 | if constexpr (Args == axisrots) { |
| 680 | UNSCOPED_INFO( "angle := " << std::get<0>(args) ); |
| 681 | UNSCOPED_INFO( "x := " << std::get<1>(args) ); |
| 682 | UNSCOPED_INFO( "y := " << std::get<2>(args) ); |
| 683 | UNSCOPED_INFO( "z := " << std::get<3>(args) ); |
| 684 | } |
| 685 | |
| 686 | // note but don't display API matrices |
| 687 | if constexpr (Args == compmatr || Args == diagmatr || Args == diagpower) |
| 688 | UNSCOPED_INFO( "matrix := (omitted)" ); |
| 689 | |
| 690 | // display exponent of diagonal matrix |
| 691 | if constexpr (Args == diagpower) { |
| 692 | qcomp p = std::get<1>(args); |
| 693 | UNSCOPED_INFO( "exponent := " << std::real(p) << " + (" << std::imag(p) << ")i" ); |
| 694 | } |
| 695 | |
| 696 | // display PauliStr |
| 697 | if constexpr (Args == paulistr || Args == pauligad) |
| 698 | UNSCOPED_INFO( "paulis := " << toString(std::get<0>(args), targs) ); |
| 699 | |
| 700 | // display PauliStr angle |
| 701 | if constexpr (Args == pauligad) |
| 702 | UNSCOPED_INFO( "angle := " << std::get<1>(args) ); |
| 703 | } |
| 704 | |
| 705 | |
| 706 | /* |
nothing calls this directly
no test coverage detected