Skip to content
Construct PsiQDK Algorithms

symbolic_paulimask

symbolic_paulimask

SymbolicPauliMask

SymbolicPauliMask(x_weight=None, z_weight=None)

Symbolic version of a PauliMask object.

For symbolics, the only relevant info one might need to extract from a PauliMask is the number of Pauli Xs and the number of Pauli Zs.

Notes

If both x_weight and z_weight default to None, other methods in classes and functions that make use of this class will assume the worse-case scenario where we have a string of Y gates on all qubits.

Parameters:

Name Type Description Default
x_weight (Optional, Parameter)

The number of Pauli Xs. Defaults to None.

None
z_weight (Optional, Parameter)

The number of Pauli Zs. Defaults to None.

None

x_weight instance-attribute

x_weight = x_weight

z_weight instance-attribute

z_weight = z_weight

SymbolicPauliSum

SymbolicPauliSum(num_terms: int | Parameter, average_x_weight: NumberOrParam = 0, average_y_weight: NumberOrParam = 0, average_z_weight: NumberOrParam = 0)

Symbolic version of a PauliSum object.

Given that we can't model exact weights in a Pauli sum symbolically, we model it using average weight values.

Notes
  • Weights used here are non-overlapping, so X weight means "X weight not overlapping with either Y or Z".

Parameters:

Name Type Description Default
num_terms int | Parameter

The number of terms in the sum of Paulis.

required
average_x_weight NumberOrParam

The (average) number of Pauli Xs. Defaults to 0.

0
average_y_weight NumberOrParam

The (average) number of Pauli Ys. Defaults to 0.

0
average_z_weight NumberOrParam

The (average) number of Pauli Zs. Defaults to 0.

0

num_terms instance-attribute

num_terms = num_terms

average_x_weight instance-attribute

average_x_weight = average_x_weight

average_y_weight instance-attribute

average_y_weight = average_y_weight

average_z_weight instance-attribute

average_z_weight = average_z_weight