qoqo.operations.MultiQubitMS
- class qoqo.operations.MultiQubitMS
The Molmer-Sorensen gate between multiple qubits.
The gate applies the rotation under the product of Pauli X operators on multiple qubits. In mathematical terms the gate applies exp(-i * theta/2 * X_i0 * X_i1 * … * X_in).
- __init__()
Methods
__init__
()circuit
()Return circuit implementing MultiQubitGateOperation
hqslang
()Returns hqslang name of Operation
List all involved Qubits
Returns true if operation contains symbolic parameters
powercf
(power)Returns Rotated gate raised to power
qubits
()Return list of qubits of the multi qubit operation in order of descending significance
remap_qubits
(mapping)Remap qubits
substitute_parameters
(substitution_parameters)Substitutes internal symbolic parameters with float values
tags
()Returns tags identifying the Operation
theta
()Returns angle of rotation
Return unitary matrix of gate.
- circuit()
Return circuit implementing MultiQubitGateOperation
- Returns:
Circuit
- hqslang()
Returns hqslang name of Operation
- Returns:
The name
- Return type:
str
- involved_qubits()
List all involved Qubits
- Returns:
The involved qubits as a set or ‘ALL’ if all qubits are involved
- Return type:
Union[set[int], str]
- is_parametrized()
Returns true if operation contains symbolic parameters
- Returns:
bool
- powercf(power)
Returns Rotated gate raised to power
- Parameters:
power (CalculatorFloat) – exponent of the power operation.
- Returns:
gate raised to the power of power
- Return type:
Self
- qubits()
Return list of qubits of the multi qubit operation in order of descending significance
- Returns:
list[int]
- remap_qubits(mapping)
Remap qubits
- Parameters:
mapping (dict[int, int]) – The mapping
- Returns:
The operation with the remapped qubits
- Return type:
Operation
- Raises:
RuntimeError – Qubit remapping failed
- substitute_parameters(substitution_parameters)
Substitutes internal symbolic parameters with float values
Only available when all symbolic expressions can be evaluated to float with the provided parameters.
- Parameters:
substitution_parameters (dict[str, float]) – The substituted free parameters
- Returns:
The operation with the parameters substituted
- Return type:
Operation
- Raises:
RuntimeError – Parameter Substitution failed
- tags()
Returns tags identifying the Operation
- Returns:
The tags identifying the operation
- Return type:
list[str]
- theta()
Returns angle of rotation
- unitary_matrix()
Return unitary matrix of gate.
- Returns:
np.ndarray
- Raises:
ValueError – Error symbolic operation cannot return float unitary matrix