Comments (2)
The version of the "qelib1.inc
" file you've linked here is actually a mutant version that Qiskit amended over time, and does not reflect the original definition of the file - all the gates you've commented on here are legacy Qiskit extensions to it. The qasm2.load
and qasm2.loads
parsers both treat qelib1.inc
exactly as specified in the original paper, and that documentation also explains the differences between the "real" and "legacy" versions.
Unfortunately, qiskit.qasm2.dumps
still outputs assuming the mutant version of qelib1.inc
right now - we have a discussion (#10737) on fixing that situation, but we keep struggling to find time to prioritise it. In the mean time, you can make qasm2.loads
(and load
) understand the whole legacy file by doing:
from qiskit import qasm2
qasm2.loads(program, custom_instructions=qasm2.LEGACY_CUSTOM_INSTRUCTIONS)
from qiskit.
Thank you for �the clarification. Indeed, I encountered issues when trying to dump and load QASM programs. I'll use LEGACY_CUSTOM_INSTRUCTIONS
in the meantime.
from qiskit.
Related Issues (20)
- `Pauli.evolve()` should recognize common rotations by (n*pi/2) as Clifford gates HOT 3
- `Pauli.evolve()` should recognize ECR gates as Clifford gates HOT 6
- justify keyword arg in circuit draw does not raise on bad input HOT 3
- `Pauli.evolve(qc, frame='s')` will ignore contents of qc for certain values of qc.name
- `XXPlusYYGate.to_matrix()` fails after qasm2 roundtrip HOT 2
- The synthesis function ``synth_cnot_count_full_pmh`` returns empty circuit when ``section_size`` exceeds the number of qubits HOT 8
- Adding conjugated state preparation <0|, <1| ? HOT 6
- `PauliEvolutionGate` default label can be too long to serialize via qpy HOT 2
- Investigate using faer for matmul instead of ndarray. HOT 7
- Transpilation Failure at Optimization Level 3 HOT 2
- Update existing transpiler passes to support `final_permutation`
- Update `OptimizeSwapBeforeMeasure` to use Rustworkx 0.15 reverse topological order HOT 3
- Typo: Change Block to Bloc
- Add angle to list of supported ParameterExpression functions HOT 3
- Controlled UGate with a parameterized angle fails with 4 or more controls HOT 4
- `TypeError: EvalfMixin.evalf() got an unexpected keyword argument 'real'` hit in transpile HOT 3
- Update `DAGCircuit` to use `rustworkx` 0.15 methods
- Incorrect Topological Order when Specifying a Custom-Tiebreaker HOT 7
- Making a circuit from a transpiled circuit data returning the wrong unitary HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qiskit.