Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1e90c46c2d98
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e79d1e83f91b
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Apr 21, 2020

  1. python3Packages.cirq: fix test failures (ZHF)

    Also build on aarch64 by disabling a few failing tests.
    
    (cherry picked from commit 02a5282c4f544dcc6c32cfeb1c4acd4a07615786)
    drewrisinger authored and FRidh committed Apr 21, 2020
    Copy the full SHA
    85895aa View commit details
  2. Copy the full SHA
    e79d1e8 View commit details
Showing with 13 additions and 3 deletions.
  1. +13 −3 pkgs/development/python-modules/cirq/default.nix
16 changes: 13 additions & 3 deletions pkgs/development/python-modules/cirq/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ lib
{ stdenv
, lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
@@ -38,13 +39,16 @@ buildPythonPackage rec {

# Cirq 0.6 requires networkx==2.3 only for optional qiskit dependency/test, disable this to avoid networkx version conflicts. https://github.com/quantumlib/Cirq/issues/2368
# Cirq locks protobuf==3.8.0, but tested working with default pythonPackages.protobuf (3.7). This avoids overrides/pythonPackages.protobuf conflicts
prePatch = ''
postPatch = ''
substituteInPlace requirements.txt --replace "networkx==2.3" "networkx" \
--replace "protobuf==3.8.0" "protobuf"
# Fix sympy 1.5 test failures. Should be fixed in v0.7
substituteInPlace cirq/optimizers/eject_phased_paulis_test.py --replace "phase_exponent=0.125 + x / 8" "phase_exponent=0.125 + x * 0.125"
substituteInPlace cirq/contrib/quirk/cells/parse_test.py --replace "parse_formula('5t') == 5 * t" "parse_formula('5t') == 5.0 * t"
# Fix pandas >= 1.0 error, #2886
substituteInPlace cirq/experiments/t1_decay_experiment.py --replace "del tab.columns.name" 'tab.rename_axis(None, axis="columns", inplace=True)'
'';

propagatedBuildInputs = [
@@ -77,12 +81,18 @@ buildPythonPackage rec {
"--ignore=dev_tools" # Only needed when developing new code, which is out-of-scope
"--ignore=cirq/google/op_serializer_test.py" # investigating in https://github.com/quantumlib/Cirq/issues/2727
];
disabledTests = [
"test_convert_to_ion_gates" # fails due to rounding error, 0.75 != 0.750...2
] ++ lib.optionals stdenv.isAarch64 [
# Seem to fail due to math issues on aarch64?
"expectation_from_wavefunction"
"test_single_qubit_op_to_framed_phase_form_output_on_example_case"
];

meta = with lib; {
description = "A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.";
homepage = "http://github.com/quantumlib/cirq";
license = licenses.asl20;
maintainers = with maintainers; [ drewrisinger ];
broken = isPy38;
};
}