Universal Ordered Set Translator

The UniversalOrderedSetTranslator implements blind transpilation using ordered universal resource sets.

Overview

This translator performs blind delegation using ordered universal gate decompositions.

The implementation follows:

  • Liu et al. (2020)

Features

  • ordered-set decomposition

  • universal blind delegation

  • full-blind computation

  • homomorphic-style decryption reuse

Supported Gates

Supported gates include:

  • H

  • S

  • CX

  • CZ

  • CCX

Relationship to Homomorphic Translation

This translator reuses several decryption principles from the HomomorphicTranslator.

The primary difference is the use of a universal ordered resource set.

Handling Parametric Gates

Arbitrary rotations are approximated using:

  • Qiskit’s SolovayKitaev transpilation pass

Applications

Suitable for:

  • universal blind quantum computation

  • ordered resource delegation

  • non-parametric blind computation

  • full-blind delegation

Module Documentation

class blind_transpiler.translators.universalOrderedSetTranslator.UniversalOrderedSetTranslator[source]

Bases: BaseTranslator

Library class implementing Full-Blind Quantum Computation (FDQC).

Built on top of the HomomorphicTranslation class. Although inheritance from this class is possible, it may not always be desirable due to protocol-specific assumptions.

The implementation is based on:

Liu, Wen-Jie, et al. “Full-blind delegating private quantum computation.” arXiv preprint arXiv:2002.00464 (2020).

Notes

Assumes a constant compute space of 11 ancilla qubits.

The resource set additionally includes the rz gate, which was not explicitly present in the original literature. This enables more practical universal computation.

If the compute-space assumptions are modified here, corresponding updates should also be made to BQC.fdqc().constant_compute_space.

ccx(key, qargs, gate_seq)[source]

Encryption and decryption logic of ‘ccx’ gate for fdqc. Needed size of encryption key = 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 - SwapGate

cx(key, qargs, gate_seq)[source]

Encryption and decryption logic of ‘cx’ gate for fdqc. Needed size of encryption key = 4

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 - SwapGate

cz(key, qargs, gate_seq)[source]

Encryption and decryption logic of ‘cz’ gate for fdqc. Needed size of encryption key = 4

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 - SwapGate

h(key, qargs, gate_seq)[source]

Encryption and decryption logic of ‘h’ gate for fdqc. Needed size of encryption key = 2

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 - SwapGate

s(key, qargs, gate_seq)[source]

Encryption and decryption logic of ‘s’ gate for fdqc. Needed size of encryption key = 2 Different optimized way of running sdg = s.s.s = z.s (take 1 gates and keys = 2)

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

sdg(key, qargs, gate_seq)[source]

Encryption and decryption logic of ‘s’ gate for fdqc. Needed size of encryption key = 2*3 (no. of keys in s + times the s need to run (sdg = s^3))

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 fdqc. Needed size of encryption key = 4 Note: has a temporary fix

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 - SwapGate, IGate

tdg(key, qargs, gate_seq)[source]

Encryption and decryption logic of ‘t’ gate for fdqc. Needed size of encryption key = 4*7 (no. of keys in t + times the t need to run (tdg = t^7)). Different optimized way of running tdg = s.s.s.t = z.s.t (take 2 gates and keys = 2+4=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