QXel.provider.braket.openqasm._helpers.quantum module

QXel.provider.braket.openqasm._helpers.quantum.invert_phase(phase)

Invert a quantum phase

QXel.provider.braket.openqasm._helpers.quantum.is_inverted(quantum_op)

Tell whether a gate with modifiers is inverted, or if the inverse modifiers cancel out. Since inv @ ctrl U == ctrl @ inv U, we can accomplish this by only counting the inverse modifiers.

QXel.provider.braket.openqasm._helpers.quantum.is_controlled(phase)

Returns whether a quantum phase has any control modifiers. If it does, then it will be transformed by the interpreter into a controlled global phase gate.

QXel.provider.braket.openqasm._helpers.quantum.convert_phase_to_gate(controlled_phase)

Convert a controlled quantum phase into a quantum gate

QXel.provider.braket.openqasm._helpers.quantum.get_ctrl_modifiers(modifiers)

Get the control modifiers from a list of quantum gate modifiers

QXel.provider.braket.openqasm._helpers.quantum.get_pow_modifiers(modifiers)

Get the power modifiers from a list of quantum gate modifiers

QXel.provider.braket.openqasm._helpers.quantum.modify_body(body, do_invert, ctrl_modifiers, ctrl_qubits, pow_modifiers)

Apply modifiers information to the definition body of a quantum gate