Linear Pauli Rotations¶

This function performs a rotation on a series of $$m$$ target qubits, where the rotation angle is a linear function of an $$n$$-qubit control register, as follows:

$\left|x\right\rangle _{n}\left|q\right\rangle _{m}\rightarrow\left|x\right\rangle _{n}\prod_{k=1}^{m}\left(\cos\left(a_{k}x+b_{k}\right)- i\sin\left(a_{k}x+b_{k}\right)P_{k}\right)\left|q_{k}\right\rangle$

where $$\left|x\right\rangle$$ is the control register, $$\left|q\right\rangle$$ is the target register, each $$P_{k}$$ is one of the three Pauli matrices $$X$$, $$Y$$, or $$Z$$, and $$a_{k}$$, $$b_{k}$$ are the user given slopes and offsets, respectively.

For example, the operation of a linear $$Y$$ rotation on a zero-input qubit is

$\left|x\right\rangle _{n}\left|0\right\rangle \rightarrow\left|x\right\rangle _{n}\left( \cos\left(ax+b\right)\left|0\right\rangle +\sin\left(ax+b\right)\left|1\right\rangle \right)$

Such a rotation can be realized as a series of controlled rotations as follows:

$\left[R_{y}\left(2^{n-1}a\right)\right]^{x_{n-1}}\cdots \left[R_{y}\left(2^{1}a\right)\right]^{x_{1}} \left[R_{y}\left(2^{0}a\right)\right]^{x_{0}}R_{y}\left(b\right)$

Syntax¶

Function: LinearPauliRotations

Parameters:

• num_state_qubits: PositiveInt
• bases: Union[PauliLetters, List[PauliLetters]] with PauliLetters = Union['x', 'y', 'z', 'X', 'Y', 'Z']
• offsets: Union[float, List[float]]
• slopes: Union[float, List[float]]
{
"function": "LinearPauliRotations",
"function_params": {
"num_state_qubits": 3,
"bases": ["Y", "Y", "Y"],
"offsets": [0.1, 0.3, 0.33],
"slopes": [2.1, 1, 7.0]
}
}


Example: Three Y Rotations Controlled by a 6-qubit State¶

The following example generates a circuit with a $$6$$-qubit control state and $$3$$ target qubits, acted upon by Y rotations with different slopes and offsets.

{
"logic_flow":[
{
"function":"LinearPauliRotations",
"function_params":{
"num_state_qubits":6,
"bases":[
"Y",
"Y",
"Y"
],
"offsets":[
0.1,
0.3,
0.33
],
"slopes":[
2.1,
1,
7.0
]
}
}
]
}

from classiq import Model
from classiq.builtin_functions import LinearPauliRotations

NUM_STATE_QUBITS = 6
BASES = ["Y", "Y", "Y"]
OFFSETS = [0.1, 0.3, 0.33]
SLOPES = [2.1, 1, 7.0]

model = Model()
linear_pauli_rotations_params = LinearPauliRotations(
num_state_qubits=NUM_STATE_QUBITS, bases=BASES, offsets=OFFSETS, slopes=SLOPES
)
model.LinearPauliRotations(linear_pauli_rotations_params)

circuit = model.synthesize()
circuit.show_interactive()


The figure shows the resulting circuit in interactive mode, with the part acting on the first qubit decomposed to demonstrate the partition into individually controlled Y rotations.