Giter VIP home page Giter VIP logo

Comments (4)

atharva-satpute avatar atharva-satpute commented on July 19, 2024

I'd like to work on this. Could you tell me what is supposed to be done? Do we need to check if _o is present in name in _assemble_op() in aer_compiler.py ?

from qiskit-aer.

hhorii avatar hhorii commented on July 19, 2024

This is not a bug. qc.cx(0, 1, ctrl_state=0) inserts cx_o0 gate which is not cx. The name is defined here. cx_o0 gate is not in basis_gates of AerSimulator. You need to transpile the circuit as follows:

qc = QuantumCircuit(2)
qc.cx(0, 1, ctrl_state=0)
qc.measure_all()

simulator = AerSimulator()
qc = transpile(qc, simulator)
simulator.run(qc).result().get_counts()

transpiler generates a sequence of x, cx, and x gates.

from qiskit-aer.

zlatko-minev avatar zlatko-minev commented on July 19, 2024

Yes, in that sense it's a feature request. In previous version Aer seems to have accepted both cx and cx_o0.

Resolving it with transpilation adds some overhead in transpiling on larger circuits, but I suppose it might not be that big of an issue. I don't have a strong opinion on this one. I guess I am fine to resolve the issue here by just leaving it as is, and using the transpiler

from qiskit-aer.

zlatko-minev avatar zlatko-minev commented on July 19, 2024

Thank you

from qiskit-aer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.