Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions recirq/benchmarks/rabi_oscillations.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

from matplotlib import pyplot as plt

# this is for older systems with matplotlib <3.2 otherwise 3d projections fail
from mpl_toolkits import mplot3d # pylint: disable=unused-import
import cirq


Expand Down
1 change: 0 additions & 1 deletion recirq/benchmarks/xeb/grid_parallel_two_qubit_xeb.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
Optional,
Sequence,
Type,
TYPE_CHECKING,
Tuple,
cast,
)
Expand Down
1 change: 0 additions & 1 deletion recirq/cluster_state_mipt/cluster_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import cirq
import cirq_google as cg
import numpy as np

def get_two_qubits_6x6(d=6):
Expand Down
2 changes: 0 additions & 2 deletions recirq/cluster_state_mipt/data_collect_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
import tempfile
from unittest import mock

import cirq
import cirq_google as cg
import numpy as np
import pytest

from recirq.cluster_state_mipt import data_collect
Expand Down
4 changes: 2 additions & 2 deletions recirq/engine_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import math
import os
import uuid
from dataclasses import dataclass, field
from typing import List, Any, Optional, Callable, Dict, Union
from dataclasses import dataclass
from typing import List, Any, Optional, Callable

import numpy as np

Expand Down
2 changes: 1 addition & 1 deletion recirq/kpz/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

"""

from typing import Iterator, List, Set, Tuple, Union, Optional
from typing import Iterator, List, Union, Optional

import cirq
import numpy as np
Expand Down
1 change: 0 additions & 1 deletion recirq/kpz/experiment_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import cirq
import numpy as np
import pytest

from recirq.kpz import experiment as kpz

Expand Down
2 changes: 0 additions & 2 deletions recirq/lattice_gauge/lattice_gauge_grid_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

import cirq

import numpy as np
import matplotlib.pyplot as plt
from recirq.lattice_gauge.lattice_gauge_grid import LGTGrid

def test_z_plaquette_to_physical_qubit_indices():
Expand Down
1 change: 0 additions & 1 deletion recirq/qaoa/experiments/optimization_tasks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import Dict, Sequence, Optional, List, Tuple
import os
import shutil

import numpy as np
import cirq
Expand Down
11 changes: 3 additions & 8 deletions recirq/qaoa/experiments/p1_landscape_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,14 @@
import cirq
import numpy as np
import recirq
from recirq.qaoa.circuit_structure import BadlyStructuredCircuitError, \
find_circuit_structure_violations
from recirq.qaoa.classical_angle_optimization import OptimizationResult
from recirq.qaoa.experiments.angle_precomputation_tasks import AnglePrecomputationTask, \
DEFAULT_BASE_DIR as DEFAULT_PRECOMPUTATION_BASE_DIR
from recirq.qaoa.experiments.problem_generation_tasks import \
DEFAULT_BASE_DIR as DEFAULT_PROBLEM_GENERATION_BASE_DIR, ProblemGenerationTaskT, \
DEFAULT_PROBLEM_GENERATION_BASE_DIR, ProblemGenerationTaskT, \
SKProblemGenerationTask
from recirq.qaoa.gates_and_compilation import compile_to_non_negligible
from recirq.qaoa.placement import place_line_on_device
from recirq.qaoa.problem_circuits import get_compiled_hardware_grid_circuit, \
get_compiled_sk_model_circuit, get_compiled_3_regular_maxcut_circuit
from recirq.qaoa.problems import ProblemT, HardwareGridProblem, SKProblem, ThreeRegularProblem
from recirq.qaoa.problems import HardwareGridProblem, SKProblem, ThreeRegularProblem


EXPERIMENT_NAME = 'qaoa-p1-landscape'
DEFAULT_BASE_DIR = os.path.expanduser(f'~/cirq-results/{EXPERIMENT_NAME}')
Expand Down
4 changes: 2 additions & 2 deletions recirq/qaoa/experiments/precomputed_execution_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import recirq
from recirq.qaoa.circuit_structure import BadlyStructuredCircuitError, \
find_circuit_structure_violations
from recirq.qaoa.classical_angle_optimization import OptimizationResult
from recirq.qaoa.experiments.angle_precomputation_tasks import AnglePrecomputationTask, \
DEFAULT_BASE_DIR as DEFAULT_PRECOMPUTATION_BASE_DIR
from recirq.qaoa.experiments.problem_generation_tasks import \
Expand All @@ -13,7 +12,8 @@
from recirq.qaoa.placement import place_line_on_device
from recirq.qaoa.problem_circuits import get_compiled_hardware_grid_circuit, \
get_compiled_sk_model_circuit, get_compiled_3_regular_maxcut_circuit
from recirq.qaoa.problems import ProblemT, HardwareGridProblem, SKProblem, ThreeRegularProblem
from recirq.qaoa.problems import HardwareGridProblem, SKProblem, ThreeRegularProblem


EXPERIMENT_NAME = 'qaoa-precomputed'
DEFAULT_BASE_DIR = os.path.expanduser(f'~/cirq-results/{EXPERIMENT_NAME}')
Expand Down
2 changes: 1 addition & 1 deletion recirq/qaoa/placement.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# release containing routing is pushed and no previous Cirq releases that don't contain routing
# are supported in ReCirq.
try:
from cirq import RouteCQCC
from cirq import RouteCQC
except ImportError:
RouteCQC = NotImplemented
try:
Expand Down
2 changes: 0 additions & 2 deletions recirq/qaoa/placement_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
min_weight_simple_path_anneal
from recirq.qaoa.problem_circuits import get_generic_qaoa_circuit

from recirq.qaoa.placement import pytket


def permute_gate(qubits: Sequence[cirq.Qid], permutation: List[int]):
return cca.LinearPermutationGate(
Expand Down
3 changes: 1 addition & 2 deletions recirq/qcqmc/afqmc_circuits.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
"""Trial wavefunction circuit ansatz primitives."""

import itertools
from typing import Dict, Iterable, Iterator, List, Sequence, Tuple
from typing import Dict, Iterable, List, Sequence, Tuple

import attrs
import cirq
import numpy as np
import openfermion
Expand Down
2 changes: 1 addition & 1 deletion recirq/qcqmc/convert_to_ipie_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import fqe.wavefunction as fqe_wfn
import fqe.bitstring as fqe_bs

from recirq.qcqmc import analysis, convert_to_ipie
from recirq.qcqmc import convert_to_ipie


def test_rotate_wavefunction_explicitly():
Expand Down
2 changes: 1 addition & 1 deletion recirq/qcqmc/optimize_wf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import copy
import itertools
from typing import Dict, List, Mapping, Optional, Sequence, Tuple, Union
from typing import Dict, List, Mapping, Optional, Sequence, Tuple

import cirq
import fqe
Expand Down
1 change: 0 additions & 1 deletion recirq/qcqmc/optimize_wf_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import fqe
import fqe.hamiltonians.restricted_hamiltonian as fqe_hams
import fqe.wavefunction as fqe_wfn
import numpy as np
import pytest

Expand Down
1 change: 0 additions & 1 deletion recirq/qml_lfe/learn_dynamics_c_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import os
import pytest
import numpy as np
from recirq.qml_lfe import learn_dynamics_c

Expand Down
1 change: 0 additions & 1 deletion recirq/qml_lfe/learn_dynamics_q_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import os
import pytest
import numpy as np
from recirq.qml_lfe import learn_dynamics_q

Expand Down
2 changes: 0 additions & 2 deletions recirq/qml_lfe/learn_states_c_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import os
import pytest
import tempfile
import numpy as np
from recirq.qml_lfe import learn_states_c

Expand Down
1 change: 0 additions & 1 deletion recirq/qml_lfe/learn_states_q_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import pytest
import os
import numpy as np
from recirq.qml_lfe import learn_states_q
Expand Down
1 change: 0 additions & 1 deletion recirq/qml_lfe/run_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"""Runtime configuration items for excuting experiments on Weber (or sim)."""

from typing import Dict, List
import os
import cirq
import cirq_google

Expand Down
1 change: 0 additions & 1 deletion recirq/qml_lfe/run_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import pytest
import cirq
from recirq.qml_lfe import run_config
import numpy as np
Expand Down
1 change: 0 additions & 1 deletion recirq/readout_scan/run-readout-scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


from recirq.readout_scan.tasks import ReadoutScanTask, run_readout_scan
import datetime
import cirq_google as cg

MAX_N_QUBITS = 5
Expand Down
6 changes: 0 additions & 6 deletions recirq/serialization_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,9 @@

import recirq

import abc
import inspect
import io
import itertools
import textwrap

import networkx as nx
import numpy as np
import pytest

import cirq

Expand Down
2 changes: 1 addition & 1 deletion recirq/time_crystals/dtc_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import Sequence, Tuple, List, Iterator
from typing import Sequence, List, Iterator

import functools
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion recirq/time_crystals/dtc_simulation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import List, Tuple
from typing import Tuple

import numpy as np
import itertools
Expand Down
2 changes: 0 additions & 2 deletions recirq/toric_code/toric_code_state_prep_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import Tuple

import cirq
import numpy as np
import pytest
Expand Down