Description
Is there any way to access the Qsim circuit after translating from the Cirq circuit to the Qsim Circuit?
I'm checking how different the Qsim circuit is concerning the Cirq Circuit. I also wanted to find out the depth of the Translated Qsim circuit.
It is provided that there are some functions under the Class QsimCircuit in qsim_circuit.py. I tried to access the translated circuit, which only returned a circuit object along with its memory address. There are no other functions available to find gate counts and the depth of the circuit.
The code which I have used to access the translated circuit:
import numpy as np
num_qubits = 5
s_int = 5
n_iterations = int(np.pi * np.sqrt(2 ** num_qubits) / 4)
qc = GroversSearch(num_qubits, s_int, n_iterations)
from qsimcirq import QSimCircuit
x = QSimCircuit(qc)
x.translate_cirq_to_qsim()
The output it returned:
Tuple Object
(<qsimcirq.qsim_avx2.Circuit at 0x732432cb9870>,
[5, 12, 33, 40, 61, 68, 89, 96, 117, 118])