@ -1,4 +1,5 @@
{ lib
{ stdenv
, lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
@ -37,13 +38,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
pre Patch = ''
post Patch = ''
substituteInPlace requirements . txt - - replace " n e t w o r k x = = 2 . 3 " " n e t w o r k x " \
- - replace " p r o t o b u f = = 3 . 8 . 0 " " p r o t o b u f "
# Fix sympy 1.5 test failures. Should be fixed in v0.7
substituteInPlace cirq/optimizers/eject_phased_paulis_test.py - - replace " p h a s e _ e x p o n e n t = 0 . 1 2 5 + x / 8 " " p h a s e _ e x p o n e n t = 0 . 1 2 5 + x * 0 . 1 2 5 "
substituteInPlace cirq/contrib/quirk/cells/parse_test.py - - replace " p a r s e _ f o r m u l a ( ' 5 t ' ) = = 5 * t " " p a r s e _ f o r m u l a ( ' 5 t ' ) = = 5 . 0 * t "
# Fix pandas >= 1.0 error, #2886
substituteInPlace cirq/experiments/t1_decay_experiment.py - - replace " d e l t a b . c o l u m n s . n a m e " ' tab . rename_axis ( None , axis = " c o l u m n s " , inplace = True ) '
'' ;
propagatedBuildInputs = [
@ -76,6 +80,13 @@ buildPythonPackage rec {
" - - i g n o r e = d e v _ t o o l s " # Only needed when developing new code, which is out-of-scope
" - - i g n o r e = c i r q / g o o g l e / o p _ s e r i a l i z e r _ t e s t . p y " # investigating in https://github.com/quantumlib/Cirq/issues/2727
] ;
disabledTests = [
" t e s t _ c o n v e r t _ t o _ i o n _ g a t e s " # fails due to rounding error, 0.75 != 0.750...2
] ++ lib . optionals stdenv . isAarch64 [
# Seem to fail due to math issues on aarch64?
" e x p e c t a t i o n _ f r o m _ w a v e f u n c t i o n "
" t e s t _ s i n g l e _ q u b i t _ o p _ t o _ f r a m e d _ p h a s e _ f o r m _ o u t p u t _ o n _ e x a m p l e _ c a s e "
] ;
meta = with lib ; {
description = " A f r a m e w o r k f o r c r e a t i n g , e d i t i n g , a n d i n v o k i n g N o i s y I n t e r m e d i a t e S c a l e Q u a n t u m ( N I S Q ) c i r c u i t s . " ;