interpreter.clock package

class interpreter.clock.ClockInterpreter(locality: Literal['5', '3'] = '5', transpile_to_two=False, info=True, end_i=0, compress: Compress = 'no')

Bases: Interpreter

The interpreter built based on Section 3 (5-local) and Section 4 (3-local) from this paper: https://arxiv.org/abs/quant-ph/0405098, integrated with muiltiple options and optimizations when intialized.

Parameters:
  • locality (Literal["5", "3"], optional) – 5- or 3-local translation. Defaults to “5”.

  • transpile_to_two (bool, optional) – Transpile the input circuit to contain only 2-qubit gates. Defaults to False.

  • info (bool, optional) – Print all information. Defaults to True.

  • end_i (int, optional) – Number of identities added to the end of input circuit. Defaults to 0.

  • compress (Compress, optional) – Option to compress the input circuit. Defaults to Compress.no.

run(qc: QuantumCircuit, num_shots=1024, all_histories=False) dict

Convert and run the circuit.

Parameters:
  • qc (QuantumCircuit) – Quantum circuit to run.

  • num_shots (int, optional) – Number of shots to run the circuit for. Defaults to 1024.

  • all_histories (bool, optional) – Return uninterpreted results with clock states. Defaults to False.

Returns:

Results after running the circuit.

Return type:

dict