Skip to content

Commit 329bdfe

Browse files
fix: deps for cvxpy (amazon-braket#105)
* fix: deps for cvxpy * add cvxpy dep, remove install from notebook * Remove package installation details cell
1 parent d80d1f7 commit 329bdfe

File tree

2 files changed

+10
-24
lines changed

2 files changed

+10
-24
lines changed

environment.yml

+2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ dependencies:
3434
- amazon-braket-pennylane-plugin
3535
- amazon-braket-schemas
3636
- amazon-braket-sdk
37+
- cvxpy==1.1.17
3738
- dask==2.30.0
3839
- dwave-ocean-sdk==3.3.0
40+
- ecos==2.0.7.post1
3941
- jax==0.2.21
4042
- keras==2.6.0
4143
- openfermion==1.0.0

examples/advanced_circuits_algorithms/Randomness/Randomness_Generation.ipynb

+8-24
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,9 @@
4949
"cell_type": "code",
5050
"execution_count": 1,
5151
"metadata": {},
52-
"outputs": [
53-
{
54-
"name": "stdout",
55-
"output_type": "stream",
56-
"text": [
57-
"Requirement already satisfied: cvxpy in /home/ec2-user/anaconda3/envs/Braket/lib/python3.7/site-packages (1.1.15)\r\n",
58-
"Requirement already satisfied: numpy>=1.15 in /home/ec2-user/anaconda3/envs/Braket/lib/python3.7/site-packages (from cvxpy) (1.19.2)\r\n",
59-
"Requirement already satisfied: ecos>=2 in /home/ec2-user/anaconda3/envs/Braket/lib/python3.7/site-packages (from cvxpy) (2.0.7.post1)\r\n",
60-
"Requirement already satisfied: osqp>=0.4.1 in /home/ec2-user/anaconda3/envs/Braket/lib/python3.7/site-packages (from cvxpy) (0.6.2.post0)\r\n",
61-
"Requirement already satisfied: scs>=1.1.6 in /home/ec2-user/anaconda3/envs/Braket/lib/python3.7/site-packages (from cvxpy) (2.1.4)\r\n",
62-
"Requirement already satisfied: scipy>=1.1.0 in /home/ec2-user/anaconda3/envs/Braket/lib/python3.7/site-packages (from cvxpy) (1.5.2)\r\n",
63-
"Requirement already satisfied: qdldl in /home/ec2-user/anaconda3/envs/Braket/lib/python3.7/site-packages (from osqp>=0.4.1->cvxpy) (0.1.5.post0)\r\n"
64-
]
65-
}
66-
],
52+
"outputs": [],
6753
"source": [
6854
"# AWS imports: Import Braket SDK modules\n",
69-
"!pip install cvxpy\n",
7055
"from braket.circuits import Circuit\n",
7156
"from braket.devices import LocalSimulator\n",
7257
"from braket.aws import AwsDevice, AwsQuantumTask\n",
@@ -82,10 +67,6 @@
8267
"# magic word for producing visualizations in notebook\n",
8368
"%matplotlib inline\n",
8469
"\n",
85-
"# install a pip package in the current Jupyter kernel\n",
86-
"#import sys\n",
87-
"#!{sys.executable} -m pip install cvxpy\n",
88-
"\n",
8970
"# import convex solver\n",
9071
"import cvxpy as cp"
9172
]
@@ -552,7 +533,7 @@
552533
"(CVXPY) Aug 26 08:35:40 PM: Optimal value: 6.075e-01\n",
553534
"(CVXPY) Aug 26 08:35:40 PM: Compilation took 2.013e-02 seconds\n",
554535
"(CVXPY) Aug 26 08:35:40 PM: Solver (including time spent in interface) took 3.882e-02 seconds\n",
555-
"\u001B[1mThe coditional min-entropy is: 0.7190228620489293\n",
536+
"\u001b[1mThe coditional min-entropy is: 0.7190228620489293\n",
556537
"As a comparison, the unconditional min-entropy is: 0.9439714610772487\n"
557538
]
558539
}
@@ -903,10 +884,13 @@
903884
}
904885
],
905886
"metadata": {
887+
"interpreter": {
888+
"hash": "88fa568089e50b9e3b8fc07b1f035315d2ef539d9a4b33ba4bd65e10c3c73513"
889+
},
906890
"kernelspec": {
907891
"display_name": "conda_braket",
908892
"language": "python",
909-
"name": "conda_braket"
893+
"name": "python3"
910894
},
911895
"language_info": {
912896
"codemirror_mode": {
@@ -918,9 +902,9 @@
918902
"name": "python",
919903
"nbconvert_exporter": "python",
920904
"pygments_lexer": "ipython3",
921-
"version": "3.7.10"
905+
"version": "3.7.12"
922906
}
923907
},
924908
"nbformat": 4,
925909
"nbformat_minor": 4
926-
}
910+
}

0 commit comments

Comments
 (0)