Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toffoli gate in a Qiskit circuit is decomposed into H, T etcetc when converted to a QuantestPy circuit, resulting in that the PauliCircuit class cannot deal with the circuit #189

Open
junnaka51 opened this issue Jan 28, 2023 · 1 comment
Assignees

Comments

@junnaka51
Copy link
Contributor

No description provided.

@junnaka51
Copy link
Contributor Author

A Toffoli gate with a control value different from 1, in Qiskit

from qiskit import QuantumCircuit, assemble

qc = QuantumCircuit(4)
qc.ccx(0, 1, 2, "10")
qc.draw()
Out[7]: 
          
q_0: ──o──
       │  
q_1: ──■──
     ┌─┴─┐
q_2: ┤ X ├
     └───┘
q_3: ─────

qobj = assemble(qc)
qobj_dict = qobj.to_dict()
experiments = qobj_dict["experiments"][0]  # [0] changes list into dict.
gates = experiments["instructions"]
gates
Out[12]: [{'name': 'ccx_o2', 'qubits': [0, 1, 2]}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants