@@ -12,8 +12,6 @@ class to define your observable, and a :class:`ExpectationMeasure` to perform
12
12
13
13
import numpy as np
14
14
import numpy .typing as npt
15
- from typeguard import typechecked
16
-
17
15
from mpqp .core .instruction .gates .native_gates import SWAP
18
16
from mpqp .core .instruction .measurement .measure import Measure
19
17
from mpqp .core .instruction .measurement .pauli_string import (
@@ -25,6 +23,7 @@ class to define your observable, and a :class:`ExpectationMeasure` to perform
25
23
from mpqp .tools .errors import NumberQubitsError
26
24
from mpqp .tools .generics import Matrix , OneOrMany
27
25
from mpqp .tools .maths import is_diagonal , is_hermitian , is_power_of_two
26
+ from typeguard import typechecked
28
27
29
28
if TYPE_CHECKING :
30
29
from braket .circuits .observables import Hermitian
@@ -113,7 +112,7 @@ def __init__(self, observable: Matrix | list[Real] | PauliString):
113
112
114
113
self ._matrix = np .array (observable )
115
114
116
- # correspond to if len(shape) == 1 or isinstance(observable, list)
115
+ # correspond to isinstance(observable, list)
117
116
else :
118
117
self ._is_diagonal = True
119
118
self ._diag_elements = observable
@@ -359,17 +358,6 @@ def _check_targets_order(self):
359
358
"""Adjusted list of target qubits when they are not initially sorted and
360
359
contiguous."""
361
360
362
- print ("Checking target order:" )
363
- print ("Target size:" , self .nb_qubits )
364
- print (
365
- "Observable sizes:" ,
366
- (
367
- [obs .nb_qubits for obs in self .observable ]
368
- if isinstance (self .observable , list )
369
- else self .observable .nb_qubits
370
- ),
371
- )
372
-
373
361
def get_pauli_grouping (
374
362
self ,
375
363
method : Literal [
0 commit comments