# What is the location of the Qiskit config file?

I'm trying to follow the instructions here https://qiskit.org/documentation/getting_started.html. It says

The default backend for qiskit.visualization.circuit_drawer() or QuantumCircuit.draw() is the text backend. However, depending on your local environment you may want to change these defaults to something better suited for your use case. This is done with the user config file. By default the user config file should be located in ~/.qiskit/settings.conf and is a .ini file.

I don't see this config file anywhere. Can anyone tell me how I can find the location of this file in order to make the change from the text based plotter to the nicer plotter?

If you are working in Windows, the default location should be C:\Users\[user]\.qiskit, which might be hidden by default. Create a text file in that folder named settings.conf and set it up how you like.

For example by default

from qiskit import *
qc = QuantumCircuit(2)
qc.h(0)
qc.x(1)
qc.draw()


produces

With settings.conf in the folder referenced above, containing the two lines

[default]
circuit_drawer=mpl


the same code produces

• Thank you very much. And since I will be using this on a Mac as well, can I ask where this file should be in a Mac? Nov 6 '19 at 22:42
• @user1936752 Sorry, I've never worked with qiskit in iOS. However, if you have your API token stored locally, you should have a file named qiskitrc in this folder already. Try doing a search for that file. Nov 6 '19 at 22:47
• @user1936752 Is it not just Users/[user]/.qiskit? If not a search for .qiskit should lead you there as well. Nov 6 '19 at 23:41
• Thank you - you were indeed correct. However it may be worth adding to your answer that this folder might be hidden! It was for me, hence the trouble finding it Nov 7 '19 at 12:01
• @user1936752 No problem! It's in there, first sentence. Nov 7 '19 at 12:29

Use the command ls -alt in Terminal on macOS to find hidden files. It's there. This should work for all Mac users.

I am still unable to see the ~/.qiskit/settings.conf file. Did the listing to show hidden files as well as created a new conda environment for a new qiskit environment.

I am on a mac and following the instructions listed here: https://qiskit.org/textbook/ch-prerequisites/setting-the-environment.html

• Hi and welcome to Quantum Computing SE. When you have enough reputation, please add posts like yours as Comment. Nov 28 '20 at 7:35
• Did you first navigate to the directory using the command: cd ~/.qiskit/ and then use the command ls -alt ? Also, how did you install python Conda? I recently ran into an issue of not having PIP installed, which is why I ask how you installed. Make sure pip is installed using: "pip --version". If it's not installed you can do so using "sudo easy_install pip" PIP is just a helpful tool to download python packages. See link: w3schools.com/python/python_pip.asp ... You can use terminal command to search for files..., but there are several files to be search... Nov 28 '20 at 21:12