Instruction stringlengths 13 145k | input_code stringlengths 35 390k | output_code stringlengths 35 390k |
|---|---|---|
Loading Qiskit with no internet results in a ConnectionError
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### What is the current behavior?
Loading Qiskit with no Internet results in a `ConnectionError`.
### Steps to repr... | qiskit/_util.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=too-many-ancestors
"""Common utilities for QISKit."""
import logging
import... | qiskit/_util.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=too-many-ancestors
"""Common utilities for QISKit."""
import logging
import... |
Speedup python local_unitary_simulator
@chriseclectic noted in #893
### What is the expected enhancement?
An important speedup by using Einstein summation for enlarging one and two qubit operations.
An example of runtime for a random circuit of 100 gates on my laptop (Macbook pro 3.1 GHz i7, 16 GB Ram):
Timin... | qiskit/backends/local/_simulatortools.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""Contains functions used by the simu... | qiskit/backends/local/_simulatortools.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""Contains functions used by the simu... |
Aqua GUI interface crashes for default OSX matplotlib backend.
@nonhermitian noted in #903:
### What is the current behavior?
Aqua GUI interface crashes for default OSX matplotlib backend.
| qiskit/__init__.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=wrong-import-order
# pylint: disable=redefined-builtin
"""Main QISKit pub... | qiskit/__init__.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=wrong-import-order
# pylint: disable=redefined-builtin
"""Main QISKit pub... |
Make plot_state automatically convert state vectors to density matrices
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
When calling the `plot_state` ... | qiskit/tools/visualization/_state_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string... | qiskit/tools/visualization/_state_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string... |
Reverse bit order in latex_circuit_drawer with conditional
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### What is the current behavior?
I found a bug in `latex_circuit_drawer` when conditional gate is drawn with `reverse... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
Latex circuit drawer fails when barrier is present.
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: latest master
- **Python version**: 3.7
- **Operating system**: OSX
### Wha... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
LaTeX Barriers are not centered between gates and measures on all columns
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: latest master
- **Python version**: 3.7
- **Operating sy... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
Need a dag visualizer
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected behavior?
A dag visualizer is important for developing transpiler passes. It should be easy to ... | qiskit/tools/visualization/__init__.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Main QISKit visualization methods."""
import sys
from qiskit._util i... | qiskit/tools/visualization/__init__.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Main Qiskit visualization methods."""
import sys
from qiskit._util i... |
follow up from #948 add a remove_all_accounts() command
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
removed many accounts are annoying we need a re... | qiskit/backends/ibmq/ibmqprovider.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Provider for remote IBMQ backends with admin features."""
from collect... | qiskit/backends/ibmq/ibmqprovider.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Provider for remote IBMQ backends with admin features."""
from collect... |
Calling IBMQ.load_accounts() twice should give warning, not exception
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: latest master
- **Python version**: 3.7
- **Operating syste... | qiskit/backends/ibmq/ibmqprovider.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Provider for remote IBMQ backends with admin features."""
from collect... | qiskit/backends/ibmq/ibmqprovider.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Provider for remote IBMQ backends with admin features."""
from collect... |
Calling IBMQ.load_accounts() twice should give warning, not exception
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: latest master
- **Python version**: 3.7
- **Operating syste... | qiskit/backends/ibmq/ibmqprovider.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Provider for remote IBMQ backends with admin features."""
from collect... | qiskit/backends/ibmq/ibmqprovider.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Provider for remote IBMQ backends with admin features."""
import warni... |
Changing style in matplotlib circuit_drawer changes the circuit layout
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: current master
- **Python version**: 3.7
- **Operating syst... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
Finalize changelog for 0.6 release
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
| qiskit/_schema_validation.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Validation module for validation against JSON schemas."""
import json
import o... | qiskit/_schema_validation.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Validation module for validation against JSON schemas."""
import json
import o... |
Using simulator instructions crashes the latex drawer
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: latest master
- **Python version**: 3.7
- **Operating system**: linux
###... | qiskit/unroll/_dagunroller.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
DAG Unroller
"""
import networkx as nx
from qiskit.unroll import Unroller
f... | qiskit/unroll/_dagunroller.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
DAG Unroller
"""
import networkx as nx
from qiskit.unroll import Unroller
f... |
_matches_coupling_map seems to check single qubit ops too and fails
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: 0.6.0
- **Python version**: 3.6
- **Operating system**: macos
... | qiskit/transpiler/_transpiler.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Tools for compiling a batch of quantum circuits."""
from copy import deepco... | qiskit/transpiler/_transpiler.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Tools for compiling a batch of quantum circuits."""
from copy import deepco... |
IBMQ Provider Documentation is unclear/incorrect
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**:0.6.1
- **Python version**:
- **Operating system**:
### What is the current beh... | qiskit/backends/ibmq/ibmqprovider.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Provider for remote IBMQ backends with admin features."""
import warni... | qiskit/backends/ibmq/ibmqprovider.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Provider for remote IBMQ backends with admin features."""
import warni... |
Add an eASCII/Unicode drawer
### What is the expected behavior?
Something along these lines, with minimal or non dependencies.
```
┌───┐
q[0] ──┤ H ├──·───m
└───┘ │ ║
q[1] ─────────┼───╫──m
│ ║ ║
q[2] ────────(+)──╫──╫──m
║ ║ ║
c[0] ─────────────╨──╫──╫──
... | qiskit/tools/visualization/__init__.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Main Qiskit visualization methods."""
import sys
from qiskit._util i... | qiskit/tools/visualization/__init__.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Main Qiskit visualization methods."""
import sys
from qiskit._util i... |
making latex_circuit_drawer and matplotlib_circuit_drawer hidden functions.
Why do we need these, can't we just give circuit_drawer and option for this with a default to latex.
```python
circuit_drawer(circuit, out_put = 'latex')
```
```python
circuit_drawer(circuit, out_put = 'python')
```
Also, why do we ... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
Issues with unified circuit drawer
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**:
- **Python version**:
- **Operating system**:
### What is the current behavior?
I think the... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
rename "python" drawer to "matplot"
The name options for the `circuit_drawer` are `['latex', 'latex_source', 'python', 'text']`. The output `python` is no very descriptive of the expected output. I suggest to rename it to `'matplot'`.
| qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
backend.view_jobs()
Many times we want to be able to view the jobs we have ran and save on the cloud.
In the spec, we defined a backend.jobs() method which returns job objects. The problem is if this returns a job object then service that requires the job to be deleted after it has been called it removes it from t... | qiskit/backends/ibmq/ibmqbackend.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""IbmQ module
This module is used for connecting to the Quantum Experienc... | qiskit/backends/ibmq/ibmqbackend.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""IbmQ module
This module is used for connecting to the Quantum Experienc... |
transpiler pass return value is still ignored
### Informations
- **Qiskit Terra version**: 0.7.0
- **Python version**: 3.7.0
- **Operating system**: Mac OS 10.13.6
### What is the current behavior?
The transpile method [here](https://github.com/Qiskit/qiskit-terra/blob/master/qiskit/transpiler/_transpiler.py... | qiskit/transpiler/_passmanager.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""PassManager class for the transpiler."""
from functools import partial
fro... | qiskit/transpiler/_passmanager.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""PassManager class for the transpiler."""
from functools import partial
fro... |
Default circuit names are not zero-based
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: latest
- **Python version**: 3.7
- **Operating system**: OSX
### What is the current b... | qiskit/_quantumcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Quantum circuit object.
"""
import itertools
from collections import OrderedDict
... | qiskit/_quantumcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Quantum circuit object.
"""
import itertools
from collections import OrderedDict
... |
DAG visualization dependence on graphviz is not mentioned
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: latest
- **Python version**: 3.7
- **Operating system**: OSX
### What... | qiskit/tools/visualization/_dag_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""
Visualization function for... | qiskit/tools/visualization/_dag_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""
Visualization function for... |
Bloch Sphere Visualization doesn't do anything with non-GUI backends
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: latest master (but should effect released versions too)
- **Py... | qiskit/tools/visualization/_state_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string... | qiskit/tools/visualization/_state_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string... |
Barrier when reversebits circuit drawer
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**:
- **Python version**:
- **Operating system**:
### What is the current behavior?
I saw ... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
Split Circuit Visualization Backends into separate modules
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
Right now we have one giant module `qiskit.... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
Text circuit output doesn't understand plotbarriers or reversebits style arguments
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: Latest master
- **Python version**: 3.7
- **Ope... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
Can not combine the Result object from the same backend (statevector)
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: the master branch
- **Python version**: 3.6.5
- **Operating ... | qiskit/backends/aer/statevector_simulator.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""
Interface to C++ quantum circu... | qiskit/backends/aer/statevector_simulator.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""
Interface to C++ quantum circu... |
Clifford simulator result() fails on any circuit
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: Latest master
- **Python version**: 3.7
- **Operating system**: Linux
### What... | qiskit/backends/aer/qasm_simulator.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Interface to C++ quantum circuit simulator with realistic noise.
"""
... | qiskit/backends/aer/qasm_simulator.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Interface to C++ quantum circuit simulator with realistic noise.
"""
... |
improve the speed of sgn_prod in pauli.py
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
Speed improvement.
Since current Pauli class use int or flo... | qiskit/tools/qi/pauli.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""
Tools for working with Pauli Operators.
A simple ... | qiskit/tools/qi/pauli.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""
Tools for working with Pauli Operators.
A simple ... |
Running on statevector_simulator alters the qobj
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**:
- **Python version**:
- **Operating system**:
### What is the current behavior... | qiskit/backends/aer/statevector_simulator.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""
Interface to C++ quantum circu... | qiskit/backends/aer/statevector_simulator.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""
Interface to C++ quantum circu... |
load_qasm_file and load_qasm_string should be part of circuits
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected behavior?
The load_qasm_* should be part of the circui... | qiskit/_quantumcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Quantum circuit object.
"""
import itertools
from collections import OrderedDict
... | qiskit/_quantumcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=cyclic-import
"""
Quantum circuit object.
"""
import itertools
fro... |
Text-based circuit drawer output is scrambled in notebook unless print is called.
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**:
- **Python version**:
- **Operating system**:
... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
removing tools/apps
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
I am going to try the issues first approach :-)
I will work on a pull request to... | qiskit/tools/apps/__init__.py
<|code_start|><|code_end|>
qiskit/tools/apps/fermion.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
A set of functions to... | qiskit/tools/apps/__init__.py
<|code_start|><|code_end|>
qiskit/tools/apps/fermion.py
<|code_start|><|code_end|>
qiskit/tools/apps/optimization.py
<|code_start|><|code_end|>
|
line_length in text drawer needs a default
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: master
- **Python version**:
- **Operating system**:
### What is the current behavio... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
Job executing problem on RBPi with Raspbian Stretch in _parallel.py
### Informations
- **Qiskit Terra version**: 0.6.1
- **Python version**: 3.6
- **Operating system**: Raspbian Stretch
### What is the current behavior?
When trying to execute job on my Raspberry Pi B I get following error in _parallel.py:
... | qiskit/_util.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=too-many-ancestors,broad-except
"""Common utilities for QISKit."""
import lo... | qiskit/_util.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=too-many-ancestors,broad-except
"""Common utilities for QISKit."""
import lo... |
test_compiler breaks AerJob status check
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: master
- **Python version**:
- **Operating system**:
### What is the current behavior?... | qiskit/backends/aer/aerjob.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""This module implements the job class used for AerBackend objects."""
import w... | qiskit/backends/aer/aerjob.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""This module implements the job class used for AerBackend objects."""
import w... |
Duplicated code in _simulatortools.py and qasm_simulator_py.py
### Informations
- **Qiskit Terra version**: 0.6.1
- **Python version**: 3.6.1
- **Operating system**: Darwin 18.0.0
### The issue
While working on #1153, @charlesastaylor found several functions duplicated in `qiskit/backends/aer/_simulatortools... | qiskit/backends/aer/_simulatortools.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""Contains functions used by the simula... | qiskit/backends/aer/_simulatortools.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""Contains functions used by the simula... |
Matplotlib circuit drawer returns NoneType rather than PIL.Image
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: master
- **Python version**:
- **Operating system**:
### What ... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... |
ConnectionRefusedError when importing from qiskit.tools.visualization
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
Qiskit 0.6.1
Python 3.5.6
MacOS Mojave 10.14.1
### What is the current behavior?
A... | qiskit/_util.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=too-many-ancestors
"""Common utilities for QISKit."""
import logging
import ... | qiskit/_util.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=too-many-ancestors,broad-except
"""Common utilities for QISKit."""
import lo... |
`qiskit.tools.visualization_state_visualization` module fails to import
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: latest master
- **Python version**: any
- **Operating syst... | qiskit/tools/visualization/_state_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string... | qiskit/tools/visualization/_state_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string... |
os.errno doesn't exists anymore in Python 3.7
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: 0.6.1
- **Python version**: 3.7.0 − Jupyter Notebook
- **Operating system**: Ubuntu ... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-stri... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Two quantum circuit drawers based on:
0. Ascii ar... |
test.python.quantum_info.test_states.TestStates.test_random_state fails by returning nan
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: master
- **Python version**: any
- **Ope... | qiskit/quantum_info/states/_states.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string
"""
A colle... | qiskit/quantum_info/states/_states.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string
"""
A colle... |
latex_source visualizer should not use transpiler(format='json')
We are going to remove the option `format='json'` from the transpiler (see #1129). For that, we need to move the visualizers into the function `get_instractions` introduced in PR #1187.
The function `_generate_latex_source` calls `transpile_dag(dag_cir... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# TODO(mtreinish): Remove after 0.7 and the deprecated met... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# TODO(mtreinish): Remove after 0.7 and the deprecated met... |
matplotlib visualizer should not use transpiler(format='json')
We are going to remove the option `format='json'` from the transpiler (see #1129). For that, we need to move the visualizers into the function `get_instractions` introduced in PR #1187.
The file `qiskit/tools/visualization//_matplotlib.py` calls `transpi... | qiskit/tools/visualization/_matplotlib.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-... | qiskit/tools/visualization/_matplotlib.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-... |
text visualizer should not use transpiler(format='json')
We are going to remove the option `format='json'` from the transpiler (see #1129). For that, we need to move the visualizers into the function `get_instractions` introduced in PR #1187.
The function `_text_circuit_drawer` calls `transpile_dag(dag_circuit, basi... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# TODO(mtreinish): Remove after 0.7 and the deprecated met... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# TODO(mtreinish): Remove after 0.7 and the deprecated met... |
Return important circuit properties from a QuantumCircuit
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
It is often of interest to compute several pro... | qiskit/_quantumcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=cyclic-import
"""
Quantum circuit object.
"""
import itertools
imp... | qiskit/_quantumcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=cyclic-import
"""
Quantum circuit object.
"""
import itertools
imp... |
update example visualizing_circuits
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected behavior?
when the ascii drawer is in place update the `visualizing_circuits.py` ... | examples/python/visualizing_circuits.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Example showing how to draw a quantum circuit using Qiskit Terra.
... | examples/python/circuit_draw.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Example showing how to draw a quantum circuit using Qiskit Terra.
"""
fro... |
load_qasm example should use the quantumcircuit
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected behavior?
Need to update the load_qasm with the new from file qasm ... | examples/python/load_qasm.py
<|code_start|>"""
Example on how to use: load_qasm_file
"""
from qiskit.wrapper import load_qasm_file
from qiskit import QISKitError, execute, Aer
try:
qc = load_qasm_file("examples/qasm/entangled_registers.qasm")
# See a list of available local simulators
print("Aer backends... | examples/python/load_qasm.py
<|code_start|>"""
Example on how to load a file into a QuantumCircuit
"""
from qiskit import QuantumCircuit
from qiskit import QISKitError, execute, Aer
try:
circ = QuantumCircuit.from_qasm_file("examples/qasm/entangled_registers.qasm")
print(circ.draw())
# See the backend
... |
credentials failed for qiskit ver 0.6.1
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: 0.6.1
- **Python version**: 3.7.0
- **Operating system**:MAC OSX 10.13.6
### What is t... | qiskit/backends/ibmq/credentials/_configrc.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Utilities for reading and writing credentials from and to con... | qiskit/backends/ibmq/credentials/_configrc.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Utilities for reading and writing credentials from and to con... |
test_qobj_to_circuits_multiple is ocassionally failing
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: latest master
- **Python version**: any
- **Operating system**: any
### ... | qiskit/dagcircuit/_dagcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Object to represent a quantum circuit as a directed acyclic graph.
The no... | qiskit/dagcircuit/_dagcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Object to represent a quantum circuit as a directed acyclic graph.
The no... |
A check_map analysis pass is needed
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
In https://github.com/Qiskit/qiskit-terra/pull/1270#issuecomment-4... | qiskit/dagcircuit/_dagcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Object to represent a quantum circuit as a directed acyclic graph.
The no... | qiskit/dagcircuit/_dagcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Object to represent a quantum circuit as a directed acyclic graph.
The no... |
Bug in drawing conditionals in latex and matplotlib
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
After #1278 and #1276, the latex and matplotlib have a bug in drawing conditional gates:
This code:
```pyt... | qiskit/tools/visualization/_latex.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-docst... | qiskit/tools/visualization/_latex.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-docst... |
_has_connection('https://qvisualization.mybluemix.net/', port=443) returns False
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Information
- **Qiskit Terra version**: master
- **Python version**: 3.7
- **Operating sys... | qiskit/tools/visualization/__init__.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""Main Qiskit visualization methods."""
... | qiskit/tools/visualization/__init__.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""Main Qiskit visualization methods."""
... |
conditional bug
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: 0.7
- **Python version**: 3.6
- **Operating system**: Mac
### What is the current behavior?
qobj without map... | examples/python/teleport.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Quantum teleportation example.
Note: if you have only cloned the Qiskit reposi... | examples/python/teleport.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Quantum teleportation example.
Note: if you have only cloned the Qiskit reposi... |
Latex visualizer confuses the qubits when measurement
### Informations
- **Qiskit Terra version**: master
### What is the current behavior?
The following code generates the following image:
```Python
q = QuantumRegister(3, 'q')
c = ClassicalRegister(1, 'c')
circ_py = QuantumCircuit(q, c)
circ_py.measure(... | qiskit/tools/visualization/_latex.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-docst... | qiskit/tools/visualization/_latex.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-docst... |
Dag equality
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
A method to check if two dags are the same.
#1363 and #1349 are holding this up
| qiskit/dagcircuit/_dagcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Object to represent a quantum circuit as a directed acyclic graph.
The no... | qiskit/dagcircuit/_dagcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Object to represent a quantum circuit as a directed acyclic graph.
The no... |
Revise the documentation TOC subsection handling
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
An issue raised during #1254:
> Also Is it possibl... | doc/conf.py
<|code_start|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Qiskit documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 25 18:13:28 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values... | doc/conf.py
<|code_start|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Qiskit documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 25 18:13:28 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values... |
Result.get_data()['unitary'] differs from Result.get_unitary()
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: Latest Master (assuming post https://github.com/Qiskit/qiskit-terra/p... | qiskit/result/result.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Model for schema-conformant Results."""
import warnings
from qiskit import QISKitE... | qiskit/result/result.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Model for schema-conformant Results."""
import warnings
from qiskit import QISKitE... |
Compile and execute use a progress bar even if a single circuit is passed.
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: master
- **Python version**: 3.7
- **Operating system**... | qiskit/transpiler/_parallel.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# This file is part of QuTiP: Quantum Toolbox in Python.
#
# Copyright (c) 20... | qiskit/transpiler/_parallel.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# This file is part of QuTiP: Quantum Toolbox in Python.
#
# Copyright (c) 20... |
Memory-related spec changes for 0.7
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
After recent discussion, the specs needs further tweaks before 0.7... | qiskit/backends/models/backendconfiguration.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Model and schema for backend configuration."""
from marshmal... | qiskit/backends/models/backendconfiguration.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Model and schema for backend configuration."""
from marshmal... |
the default decimals in get_statevector is too small
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
The original statevector simulator will return de... | qiskit/backends/ibmq/ibmqjob.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""IBMQJob module
This module is used for creating asynchronous job objects fo... | qiskit/backends/ibmq/ibmqjob.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""IBMQJob module
This module is used for creating asynchronous job objects fo... |
clean up transpile to make faster (parallel)
This is a follow-on to #1134 and #1144 and #1032 should be made on this after we have done the other two issues.
| qiskit/transpiler/_transpiler.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Tools for compiling a batch of quantum circuits."""
import logging
import w... | qiskit/transpiler/_transpiler.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Tools for compiling a batch of quantum circuits."""
import logging
import w... |
qobj_to_circuits not using the compiled qasm in the qobj header
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**:
- **Python version**:
- **Operating system**:
### What is the c... | qiskit/converters/qobj_to_circuits.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Helper function for converting qobj to a list of circuits"""
from qisk... | qiskit/converters/qobj_to_circuits.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Helper function for converting qobj to a list of circuits"""
from qis... |
crash when set initial_state with complex vector for simulator
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: the master branch (Dec. 4th)
- **Python version**: 3.7.1
- **Operat... | qiskit/qobj/_qobj.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Models for Qobj and its related components."""
from types import SimpleNamespace
impo... | qiskit/qobj/_qobj.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Models for Qobj and its related components."""
from types import SimpleNamespace
impo... |
generated circuits had the same name if circuits are created by multiprocess
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: the master branch
- **Python version**: 3.7.1
- **Ope... | qiskit/circuit/quantumcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=cyclic-import,invalid-name
"""
Quantum circuit object.
"""
... | qiskit/circuit/quantumcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=cyclic-import,invalid-name
"""
Quantum circuit object.
"""
... |
circuit.draw(output='mpl) does not draw qubit labels correctly.
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: master
- **Python version**: 3.7
- **Operating system**: osx
##... | qiskit/tools/visualization/_matplotlib.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-... | qiskit/tools/visualization/_matplotlib.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-... |
Process Tomography
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: 0.6.1
- **Python version**: 3.7
- **Operating system**: OsX
### What is the current behavior?
The process... | qiskit/tools/qcvv/tomography.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""
Quantum Tomography Module
Description:
... | qiskit/tools/qcvv/tomography.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
"""
Quantum Tomography Module
Description:
... |
Handling old-format jobs (test_get_jobs_filter_job_status)
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Information
We are experiencing some intermitent failures at `test.python.ibmq.test_ibmqjob.TestIBMQJob.test_get_j... | qiskit/backends/ibmq/ibmqbackend.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""IbmQ module
This module is used for connecting to the Quantum Experienc... | qiskit/backends/ibmq/ibmqbackend.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""IbmQ module
This module is used for connecting to the Quantum Experienc... |
BasicMapper error with measurements
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**:
- **Python version**:
- **Operating system**:
### What is the current behavior?
```python
... | qiskit/dagcircuit/_dagcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Object to represent a quantum circuit as a directed acyclic graph.
The no... | qiskit/dagcircuit/_dagcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Object to represent a quantum circuit as a directed acyclic graph.
The no... |
Handling old-format jobs (test_get_jobs_filter_job_status)
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Information
We are experiencing some intermitent failures at `test.python.ibmq.test_ibmqjob.TestIBMQJob.test_get_j... | qiskit/backends/ibmq/ibmqbackend.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""IbmQ module
This module is used for connecting to the Quantum Experienc... | qiskit/backends/ibmq/ibmqbackend.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""IbmQ module
This module is used for connecting to the Quantum Experienc... |
Review the messages encouraging the use of slower Python simulators alternatives
### What is the expected enhancement?
After #1484 Python and C++ simulators no longer live under the same `Aer` provider but they are split between `Simulators` and `LegacySimulators` providers respectively. `Simulators` make it clear th... | qiskit/backends/builtinsimulators/simulatorsprovider.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Provider for built-in simulator backends."""
from ... | qiskit/backends/builtinsimulators/simulatorsprovider.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Provider for built-in simulator backends."""
from ... |
Remove `deepcopy` from `circuit_to_dag`
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
It's very slow.
| qiskit/converters/circuit_to_dag.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Helper function for converting a circuit to a dag"""
import copy
from ... | qiskit/converters/circuit_to_dag.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Helper function for converting a circuit to a dag"""
from qiskit.circu... |
Access a job's payload through `job.qobj()`
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
One often wants to know the `job.qobj()` associated with a j... | qiskit/providers/builtinsimulators/simulatorsjob.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""This module implements the job class used by simulator b... | qiskit/providers/builtinsimulators/simulatorsjob.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""This module implements the job class used by simulator b... |
bug in latex drawer barrier
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**:
- **Python version**:
- **Operating system**:
### What is the current behavior?
When drawing this ... | qiskit/tools/visualization/_latex.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-docst... | qiskit/tools/visualization/_latex.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-docst... |
timeout setting is not passed to job submission [remote backend]
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: the newest master branch
- **Python version**: 3.6.5
- **Operatin... | qiskit/providers/ibmq/ibmqjob.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""IBMQJob module
This module is used for creating asynchronous job objects f... | qiskit/providers/ibmq/ibmqjob.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""IBMQJob module
This module is used for creating asynchronous job objects f... |
Change the name Lookaheadmapper and basicmapper
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
In the folder, it is not clear what is a mapper and what... | qiskit/transpiler/passes/__init__.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Module containing transpiler pass."""
from .cx_cancellation import CXC... | qiskit/transpiler/passes/__init__.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Module containing transpiler pass."""
from .cx_cancellation import CXC... |
interactive=True has no effect with default drawer output ('text')
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
I think we either convert the text ou... | qiskit/circuit/quantumcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=cyclic-import,invalid-name
"""
Quantum circuit object.
"""
... | qiskit/circuit/quantumcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=cyclic-import,invalid-name
"""
Quantum circuit object.
"""
... |
IBMQjob Seed
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: master
- **Python version**: 3.6.6
- **Operating system**: OSX
### What is the current behavior?
[IBMQJob `_job_d... | qiskit/providers/ibmq/ibmqjob.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""IBMQJob module
This module is used for creating asynchronous job objects f... | qiskit/providers/ibmq/ibmqjob.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""IBMQJob module
This module is used for creating asynchronous job objects f... |
BasicSwap cannot handle move_measurements.qasm
In the process to understand #1575, I noticed that `BasicSwap` also fails with that example (in which `move_measurements.qasm` tries to be mapped). I managed to extract a minimal example:
```
coupling = CouplingMap([[0, 1], [1, 2]])
qr0 = QuantumRegist... | qiskit/mapper/_layout.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
A two-ways dict that represent a layout.
Layout is the relation between virtual (... | qiskit/mapper/_layout.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
A two-ways dict that represent a layout.
Layout is the relation between virtual (... |
remove the folder wrappers (post 0.7)
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected behavior?
After 0.7 we don't this folder anymore.
| qiskit/__init__.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=wrong-import-order
"""Main Qiskit public functionality."""
import pkguti... | qiskit/__init__.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=wrong-import-order
"""Main Qiskit public functionality."""
import pkguti... |
Mapping Error in BasicAer
`'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q0[5];\ncreg c0[3];\nx q0[4];\nmeasure q0[1] -> c0[0];\nmeasure q0[3] -> c0[1];\nmeasure q0[4] -> c0[2];\n'`
The above qasm should give all shots in `100`, but they are all in `000`. Only happens in `BasicAer`, not in `Aer`.
### Informations
... | qiskit/providers/builtinsimulators/qasm_simulator.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
# pylint: disable=arguments... | qiskit/providers/builtinsimulators/qasm_simulator.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name
# pylint: disable=arguments... |
Cleanup mpl circuit_drawer module (post 0.7)
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
As pointed out in the review for https://github.com/Qiski... | qiskit/tools/visualization/_matplotlib.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-... | qiskit/tools/visualization/_matplotlib.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-... |
remove ghpages_documentation_deploy.sh
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
since all the documentation is now in qiskit/qiskit we should rem... | setup.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
from setuptools import setup, find_packages
requirements = [
"jsonschema>=2.6,<2.7",
"marshm... | setup.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
from setuptools import setup, find_packages
requirements = [
"jsonschema>=2.6,<2.7",
"marshm... |
Consistent gates order in visualizations (and DAG?)
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
As a spin-off from #1617 (thanks @Exferro!) , duri... | qiskit/converters/circuit_to_dag.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Helper function for converting a circuit to a dag"""
from qiskit.circu... | qiskit/converters/circuit_to_dag.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Helper function for converting a circuit to a dag"""
from qiskit.circu... |
BasicAer qasm_simulator not detecting that sample measurement can be used
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: 0.7.0
- **Python version**: 3.6.6
- **Operating system**... | qiskit/transpiler/_transpiler.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Tools for compiling a batch of quantum circuits."""
import logging
from qi... | qiskit/transpiler/_transpiler.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Tools for compiling a batch of quantum circuits."""
import logging
from qi... |
Removed compiled_circuit_qasm from QobjExperimentalHeader
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected behavior?
After #1629 when all the backends are Qobj 1.0 co... | qiskit/converters/circuits_to_qobj.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Compile function for converting a list of circuits to the qobj"""
impo... | qiskit/converters/circuits_to_qobj.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Compile function for converting a list of circuits to the qobj"""
impo... |
Transpiler reorders measure through barriers
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: master
- **Python version**: 3.6
- **Operating system**: MacOS
### What is the cur... | qiskit/dagcircuit/_dagcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Object to represent a quantum circuit as a directed acyclic graph.
The no... | qiskit/dagcircuit/_dagcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Object to represent a quantum circuit as a directed acyclic graph.
The no... |
Bug in drawing barriers in matplotlib circuit drawer
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: master
- **Python version**: 3.6
- **Operating system**: mac
### What is t... | qiskit/tools/visualization/_matplotlib.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-... | qiskit/tools/visualization/_matplotlib.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-... |
BackendConfiguration fails validation if backend supports pulse
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**:0.8.0
- **Python version**3.6.6
- **Operating system**:OSX
### W... | qiskit/providers/models/backendconfiguration.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Model and schema for backend configuration."""
from marshma... | qiskit/providers/models/backendconfiguration.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Model and schema for backend configuration."""
from marshma... |
StochasticSwap bug
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**:
- **Python version**: 0.7.0
- **Operating system**:
### What is the current behavior?
The stochastic swap m... | qiskit/transpiler/passes/mapping/stochastic_swap.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
A pass implementing the default Qiskit stochastic mappe... | qiskit/transpiler/passes/mapping/stochastic_swap.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
A pass implementing the default Qiskit stochastic mappe... |
Left justify the circuit in text visualizer
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
Currently when a circuit is displayed using the text drawer ... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# TODO: Remove after 0.7 and the deprecated methods are re... | qiskit/tools/visualization/_circuit_visualization.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# TODO: Remove after 0.7 and the deprecated methods are re... |
circuit.draw(output = 'latex') truncates circuit unexpectedly
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: 0.7.0
- **Python version**: 3.6.5
- **Operating system**: Windows 10... | qiskit/tools/visualization/_latex.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-docst... | qiskit/tools/visualization/_latex.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-docst... |
StochasticSwap mapper fails when given no initial_layout if qreg does not use all qubits in coupling_map
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: master
- **Python version*... | qiskit/transpiler/passes/mapping/basic_swap.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
A pass implementing a basic mapper.
The basic mapper is a m... | qiskit/transpiler/passes/mapping/basic_swap.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
A pass implementing a basic mapper.
The basic mapper is a m... |
Include a copy method for QuantumCircuit
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
This code is often repeated a lot:
```
import copy
qc_copy =... | qiskit/circuit/quantumcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Quantum circuit object.
"""
from collections import OrderedDict
from copy... | qiskit/circuit/quantumcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Quantum circuit object.
"""
from collections import OrderedDict
from copy... |
Using the rzz gate yields an error on circuit drawing
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**:
qiskit version 0.7.0
- **Python version**:
python 3.6.6
- **Operating syst... | qiskit/tools/visualization/_text.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
A module for drawing circuits in ascii art or some other text represent... | qiskit/tools/visualization/_text.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
A module for drawing circuits in ascii art or some other text represent... |
[ENH] reverse order of operations when loading OpenQASM
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
When applying an operation to a quantum registe... | qiskit/converters/dag_to_circuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Helper function for converting a dag to a circuit"""
import collections
... | qiskit/converters/dag_to_circuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Helper function for converting a dag to a circuit"""
import collections
... |
DAGCircuit node_counter variable doesn't update with transpiler passes
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: 0.7
- **Python version**: 3.6
- **Operating system**: Ubunt... | qiskit/dagcircuit/_dagcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Object to represent a quantum circuit as a directed acyclic graph.
The no... | qiskit/dagcircuit/_dagcircuit.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
Object to represent a quantum circuit as a directed acyclic graph.
The no... |
Unify basis_gates parameter handling (using a list)
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues to confirm this idea does not exist. -->
### What is the expected enhancement?
(I have the feeling there is already an issue for ... | qiskit/tools/compiler.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Helper module for simplified Qiskit usage."""
import warnings
import logging
from ... | qiskit/tools/compiler.py
<|code_start|># -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Helper module for simplified Qiskit usage."""
import warnings
import logging
from ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.