Universal Fixed Rotation Translator¶
The UniversalFixedRotationTranslator implements
blind delegation using fixed π/4 rotation
equivalents.
Overview¶
This translator converts quantum gates into equivalent fixed-angle rotation decompositions.
The implementation follows the universal blind computation approach proposed by:
Zhang et al. (2018)
Features¶
fixed-angle decomposition
universal gate replacement
trap gate insertion
non-parametric delegation
Supported Gates¶
Supported gates include:
HSS†TT†CXCZCCX
Handling Parametric Gates¶
This translator does not directly support arbitrary parametric rotations.
Parametric gates are approximated using:
Qiskit’s
SolovayKitaevtranspilation pass
Applications¶
Suitable for:
fixed-resource delegation models
trap-based blindness
non-parametric secure delegation
universal fixed-angle computation
Module Documentation¶
- class blind_transpiler.translators.universalFixedRotationTranslator.UniversalFixedRotationTranslator[source]¶
Bases:
BaseTranslatorLibrary class for Rotation based full-blind quantum computation. Logic is based on paper:
‘Zhang, Xiaoqian, et al. “Single-server blind quantum computation with quantum circuit model.” Quantum Information Processing 17 (2018): 1-18.’.
NOTE: Following changes have been made from the original defined algorithm. complete angle of trap == 4pi (not 2pi as defined in the paper, which creates the phase interference in many algorithms) changes RZ gates to PhaseGate - due to difference of phase in implementation of these gates in qiskit Also, note, if some future problems arise due to RY gate, they should also be changes to iRY() gates using PhaseGate(pi/2)
Assumes variable compute space of 3*n ancilla qubits, where n is the no. of qubits in original circuit.
- ccx(key, qargs, gate_seq)[source]¶
Encryption and decryption logic of ‘ccx’ gate for rotation-based fdqc. Needed size of encryption key = 18: (Need hidden conditionals for decrypting one CZ and two CX = 6 + 1*4 + 2*4 = 18)
- Parameters:
key – list[int] - contains randomly generated binary keys, each element can be 0 or 1.
qargs – list[int] - contains the argument on which the key has to be applied.
gate_seq – int - used to store the information of which gate from original circuit, this translation is coming from.
- Returns:
Tuple[BOP] - tuple of BOP class object sequence needed for encryption, compute and decryption of the ‘ccx’ gate.
- Raises:
None –
- Library Dependency:
qiksit.circuit.library - XGate, ZGate math - pi
- cx(key, qargs, gate_seq)[source]¶
Encryption and decryption logic of ‘cx’ gate for rotation-based fdqc. Needed size of encryption key = 6
- Parameters:
key – list[int] - contains randomly generated binary keys, each element can be 0 or 1.
qargs – list[int] - contains the argument on which the key has to be applied.
gate_seq – int - used to store the information of which gate from original circuit, this translation is coming from.
- Returns:
Tuple[BOP] - tuple of BOP class object sequence needed for encryption, compute and decryption of the ‘cx’ gate.
- Raises:
None –
- Library Dependency:
qiksit.circuit.library - XGate, ZGate math - pi
- cz(key, qargs, gate_seq)[source]¶
Encryption and decryption logic of ‘cz’ gate for rotation-based fdqc. Needed size of encryption key = 6
- Parameters:
key – list[int] - contains randomly generated binary keys, each element can be 0 or 1.
qargs – list[int] - contains the argument on which the key has to be applied.
gate_seq – int - used to store the information of which gate from original circuit, this translation is coming from.
- Returns:
Tuple[BOP] - tuple of BOP class object sequence needed for encryption, compute and decryption of the ‘cz’ gate.
- Raises:
None –
- Library Dependency:
qiksit.circuit.library - XGate, ZGate math - pi
- h(key, qargs, gate_seq)[source]¶
Encryption and decryption logic of ‘h’ gate for rotation-based fdqc. Needed size of encryption key = 6
- Parameters:
key – list[int] - contains randomly generated binary keys, each element can be 0 or 1.
qargs – list[int] - contains the argument on which the key has to be applied.
gate_seq – int - used to store the information of which gate from original circuit, this translation is coming from.
- Returns:
Tuple[BOP] - tuple of BOP class object sequence needed for encryption, compute and decryption of the ‘h’ gate.
- Raises:
None –
- Library Dependency:
qiksit.circuit.library - XGate, ZGate math - pi
- s(key, qargs, gate_seq)[source]¶
Encryption and decryption logic of ‘s’ gate for rotation-based fdqc. Needed size of encryption key = 6
- Parameters:
key – list[int] - contains randomly generated binary keys, each element can be 0 or 1.
qargs – list[int] - contains the argument on which the key has to be applied.
gate_seq – int - used to store the information of which gate from original circuit, this translation is coming from.
- Returns:
Tuple[BOP] - tuple of BOP class object sequence needed for encryption, compute and decryption of the ‘s’ gate.
- Raises:
None –
- Library Dependency:
qiksit.circuit.library - XGate, ZGate math - pi
- sdg(key, qargs, gate_seq)[source]¶
Encryption and decryption logic of ‘s’ gate for fdqc. Needed size of encryption key = 6*3 (no. of keys in s + times the s need to run (sdg = s^3)). Different optimized way of running sdg = s.s.s = z.s (take 1 gates and keys = 6)
- Parameters:
key – list[int] - contains randomly generated binary keys, each element can be 0 or 1.
qargs – list[int] - contains the argument on which the key has to be applied.
gate_seq – int - used to store the information of which gate from original circuit, this translation is coming from.
- Returns:
Tuple[BOP] - tuple of BOP class object sequence needed for encryption, compute and decryption of the ‘s’ gate.
- Raises:
None –
- Library Dependency:
qiksit.circuit.library - SwapGate
- t(key, qargs, gate_seq)[source]¶
Encryption and decryption logic of ‘t’ gate for rotation-based fdqc. Needed size of encryption key = 8
- Parameters:
key – list[int] - contains randomly generated binary keys, each element can be 0 or 1.
qargs – list[int] - contains the argument on which the key has to be applied.
gate_seq – int - used to store the information of which gate from original circuit, this translation is coming from.
- Returns:
Tuple[BOP] - tuple of BOP class object sequence needed for encryption, compute and decryption of the ‘t’ gate.
- Raises:
None –
- Library Dependency:
qiksit.circuit.library - XGate, ZGate math - pi
- tdg(key, qargs, gate_seq)[source]¶
Encryption and decryption logic of ‘t’ gate for ssdqc. Needed size of encryption key = 8*7 (no. of keys in t + times the t need to run (tdg = t^7)). Different optimized way of running tdg = z.s.t (take 2 gates and keys = 6+8=14)
- Parameters:
key – list[int] - contains randomly generated binary keys, each element can be 0 or 1.
qargs – list[int] - contains the argument on which the key has to be applied.
gate_seq – int - used to store the information of which gate from original circuit, this translation is coming from.
- Returns:
Tuple[BOP] - tuple of BOP class object sequence needed for encryption, compute and decryption of the ‘s’ gate.
- Raises:
None –
- Library Dependency:
qiksit.circuit.library - SwapGate